local o={}o.__index=o function o.CreateGuiObjects(W,o)W.ChatBarParentFrame=o local x=7 local t=5 local k=Instance.new("\070\114\097\109\101")k.Selectable=false k.BackgroundTransparency=.6 k.BorderSizePixel=0 k.BackgroundColor3=ChatSettings.ChatBarBackGroundColor k.Size=UDim2.new(1,0,0,46)k.Parent=o local h=Instance.new("\070\114\097\109\101")h.Selectable=false h.Name="\066\111\120\070\114\097\109\101"h.BackgroundTransparency=.6 h.BorderSizePixel=0 h.BackgroundColor3=ChatSettings.ChatBarBoxColor h.Size=UDim2.new(1,-x*2,1,-x*2)h.Position=UDim2.new(0,x,0,x)h.Parent=k local C=Instance.new("\070\114\097\109\101")C.BackgroundTransparency=1 C.Size=UDim2.new(1,-t*2,1,-t*2)C.Position=UDim2.new(0,t,0,t)C.Parent=h local F=Instance.new("\084\101\120\116\066\111\120")F.Selectable=ChatSettings.GamepadNavigationEnabled F.Name="\067\104\097\116\066\097\114"F.BackgroundTransparency=1 F.Size=UDim2.new(1,0,1,0)F.Position=UDim2.new(0,0,0,0)F.TextSize=ChatSettings.ChatBarTextSize F.Font=ChatSettings.ChatBarFont F.TextColor3=ChatSettings.ChatBarTextColor F.TextTransparency=.4 F.TextStrokeTransparency=1 F.ClearTextOnFocus=false F.TextXAlignment=Enum.TextXAlignment.Left F.TextYAlignment=Enum.TextYAlignment.Top F.TextWrapped=true F.Text=""F.Parent=C local S=Instance.new("\084\101\120\116\066\117\116\116\111\110")S.Selectable=false S.Name="\077\101\115\115\097\103\101\077\111\100\101"S.BackgroundTransparency=1 S.Position=UDim2.new(0,0,0,0)S.TextSize=ChatSettings.ChatBarTextSize S.Font=ChatSettings.ChatBarFont S.TextXAlignment=Enum.TextXAlignment.Left S.TextWrapped=true S.Text=""S.Size=UDim2.new(0,0,0,0)S.TextYAlignment=Enum.TextYAlignment.Center S.TextColor3=W:GetDefaultChannelNameColor()S.Visible=true S.Parent=C local b=Instance.new("\084\101\120\116\076\097\098\101\108")b.Selectable=false b.TextWrapped=true b.BackgroundTransparency=1 b.Size=F.Size b.Position=F.Position b.TextSize=F.TextSize b.Font=F.Font b.TextColor3=F.TextColor3 b.TextTransparency=F.TextTransparency b.TextStrokeTransparency=F.TextStrokeTransparency b.TextXAlignment=F.TextXAlignment b.TextYAlignment=F.TextYAlignment b.Text="\046\046\046"b.Parent=C W.GuiObject=k W.TextBox=F W.TextLabel=b W.GuiObjects.BaseFrame=k W.GuiObjects.TextBoxFrame=h W.GuiObjects.TextBox=F W.GuiObjects.TextLabel=b W.GuiObjects.MessageModeTextButton=S W:AnimGuiObjects()W:SetUpTextBoxEvents(F,b,S)if W.UserHasChatOff then W:DoLockChatBar()end W.eGuiObjectsChanged:Fire()end

local methods = {}
methods.__index = methods

function methods:CreateGuiObjects(targetParent)
	self.ChatBarParentFrame = targetParent

	local backgroundImagePixelOffset = 7
	local textBoxPixelOffset = 5

	local BaseFrame = Instance.new("Frame")
		
	BaseFrame.Selectable = false
	BaseFrame.BackgroundTransparency = 0.6
	BaseFrame.BorderSizePixel = 0
	BaseFrame.BackgroundColor3 = ChatSettings.ChatBarBackGroundColor
	BaseFrame.Size = UDim2.new(1, 0, 0, 46)
	BaseFrame.Parent = targetParent
	
	local BoxFrame = Instance.new("Frame")
	BoxFrame.Selectable = false
	BoxFrame.Name = "BoxFrame"
	BoxFrame.BackgroundTransparency = 0.6
	BoxFrame.BorderSizePixel = 0
	BoxFrame.BackgroundColor3 = ChatSettings.ChatBarBoxColor
	BoxFrame.Size = UDim2.new(1, -backgroundImagePixelOffset * 2, 1, -backgroundImagePixelOffset * 2)
	BoxFrame.Position = UDim2.new(0, backgroundImagePixelOffset, 0, backgroundImagePixelOffset)
	BoxFrame.Parent = BaseFrame

	local TextBoxHolderFrame = Instance.new("Frame")
	TextBoxHolderFrame.BackgroundTransparency = 1
	TextBoxHolderFrame.Size = UDim2.new(1, -textBoxPixelOffset * 2, 1, -textBoxPixelOffset * 2)
	TextBoxHolderFrame.Position = UDim2.new(0, textBoxPixelOffset, 0, textBoxPixelOffset)
	TextBoxHolderFrame.Parent = BoxFrame

	local TextBox = Instance.new("TextBox")
	TextBox.Selectable = ChatSettings.GamepadNavigationEnabled
	TextBox.Name = "ChatBar"
	TextBox.BackgroundTransparency = 1
	TextBox.Size = UDim2.new(1, 0, 1, 0)
	TextBox.Position = UDim2.new(0, 0, 0, 0)
	TextBox.TextSize = ChatSettings.ChatBarTextSize
	TextBox.Font = ChatSettings.ChatBarFont
	TextBox.TextColor3 = ChatSettings.ChatBarTextColor
	TextBox.TextTransparency = 0.4
	TextBox.TextStrokeTransparency = 1
	TextBox.ClearTextOnFocus = false
	TextBox.TextXAlignment = Enum.TextXAlignment.Left
	TextBox.TextYAlignment = Enum.TextYAlignment.Top
	TextBox.TextWrapped = true
	TextBox.Text = ""
	TextBox.Parent = TextBoxHolderFrame

	local MessageModeTextButton = Instance.new("TextButton")
	MessageModeTextButton.Selectable = false
	MessageModeTextButton.Name = "MessageMode"
	MessageModeTextButton.BackgroundTransparency = 1
	MessageModeTextButton.Position = UDim2.new(0, 0, 0, 0)
	MessageModeTextButton.TextSize = ChatSettings.ChatBarTextSize
	MessageModeTextButton.Font = ChatSettings.ChatBarFont
	MessageModeTextButton.TextXAlignment = Enum.TextXAlignment.Left
	MessageModeTextButton.TextWrapped = true
	MessageModeTextButton.Text = ""
	MessageModeTextButton.Size = UDim2.new(0, 0, 0, 0)
	MessageModeTextButton.TextYAlignment = Enum.TextYAlignment.Center
	MessageModeTextButton.TextColor3 = self:GetDefaultChannelNameColor()
	MessageModeTextButton.Visible = true
	MessageModeTextButton.Parent = TextBoxHolderFrame

	local TextLabel = Instance.new("TextLabel")
	TextLabel.Selectable = false
	TextLabel.TextWrapped = true
	TextLabel.BackgroundTransparency = 1
	TextLabel.Size = TextBox.Size
	TextLabel.Position = TextBox.Position
	TextLabel.TextSize = TextBox.TextSize
	TextLabel.Font = TextBox.Font
	TextLabel.TextColor3 = TextBox.TextColor3
	TextLabel.TextTransparency = TextBox.TextTransparency
	TextLabel.TextStrokeTransparency = TextBox.TextStrokeTransparency
	TextLabel.TextXAlignment = TextBox.TextXAlignment
	TextLabel.TextYAlignment = TextBox.TextYAlignment
	TextLabel.Text = "..."
	TextLabel.Parent = TextBoxHolderFrame

	self.GuiObject = BaseFrame
	self.TextBox = TextBox
	self.TextLabel  = TextLabel

	self.GuiObjects.BaseFrame = BaseFrame
	self.GuiObjects.TextBoxFrame = BoxFrame
	self.GuiObjects.TextBox = TextBox
	self.GuiObjects.TextLabel = TextLabel
	self.GuiObjects.MessageModeTextButton = MessageModeTextButton

	self:AnimGuiObjects()
	self:SetUpTextBoxEvents(TextBox, TextLabel, MessageModeTextButton)
	if self.UserHasChatOff then
		self:DoLockChatBar()
	end
	self.eGuiObjectsChanged:Fire()
end
