local N={}N.__index=N function N.CreateGuiObjects(U,N)U.ChatBarParentFrame=N local F=7 local J=5 local O=Instance.new("\070\114\097\109\101")O.Selectable=false O.Size=UDim2.new(1,0,1,0)O.BackgroundTransparency=.6 O.BorderSizePixel=0 O.BackgroundColor3=ChatSettings.ChatBarBackGroundColor O.Parent=N local M=Instance.new("\070\114\097\109\101")M.Selectable=false M.Name="\066\111\120\070\114\097\109\101"M.BackgroundTransparency=.6 M.BorderSizePixel=0 M.BackgroundColor3=ChatSettings.ChatBarBoxColor M.Size=UDim2.new(1,-F*2,1,-F*2)M.Position=UDim2.new(0,F,0,F)M.Parent=O local z=Instance.new("\070\114\097\109\101")z.BackgroundTransparency=1 z.Size=UDim2.new(1,-J*2,1,-J*2)z.Position=UDim2.new(0,J,0,J)z.Parent=M local e=Instance.new("\084\101\120\116\066\111\120")e.Selectable=ChatSettings.GamepadNavigationEnabled e.Name="\067\104\097\116\066\097\114"e.BackgroundTransparency=1 e.Size=UDim2.new(1,0,1,0)e.Position=UDim2.new(0,0,0,0)e.TextSize=ChatSettings.ChatBarTextSize e.Font=ChatSettings.ChatBarFont e.TextColor3=ChatSettings.ChatBarTextColor e.TextTransparency=.4 e.TextStrokeTransparency=1 e.ClearTextOnFocus=false e.TextXAlignment=Enum.TextXAlignment.Left e.TextYAlignment=Enum.TextYAlignment.Top e.TextWrapped=true e.Text=""e.Parent=z local v=Instance.new("\084\101\120\116\066\117\116\116\111\110")v.Selectable=false v.Name="\077\101\115\115\097\103\101\077\111\100\101"v.BackgroundTransparency=1 v.Position=UDim2.new(0,0,0,0)v.TextSize=ChatSettings.ChatBarTextSize v.Font=ChatSettings.ChatBarFont v.TextXAlignment=Enum.TextXAlignment.Left v.TextWrapped=true v.Text=""v.Size=UDim2.new(0,0,0,0)v.TextYAlignment=Enum.TextYAlignment.Center v.TextColor3=U:GetDefaultChannelNameColor()v.Visible=true v.Parent=z local w=Instance.new("\084\101\120\116\076\097\098\101\108")w.Selectable=false w.TextWrapped=true w.BackgroundTransparency=1 w.Size=e.Size w.Position=e.Position w.TextSize=e.TextSize w.Font=e.Font w.TextColor3=e.TextColor3 w.TextTransparency=e.TextTransparency w.TextStrokeTransparency=e.TextStrokeTransparency w.TextXAlignment=e.TextXAlignment w.TextYAlignment=e.TextYAlignment w.Text="\046\046\046"w.Parent=z U.GuiObject=O U.TextBox=e U.TextLabel=w U.GuiObjects.BaseFrame=O U.GuiObjects.TextBoxFrame=M U.GuiObjects.TextBox=e U.GuiObjects.TextLabel=w U.GuiObjects.MessageModeTextButton=v U:AnimGuiObjects()U:SetUpTextBoxEvents(e,w,v)if U.UserHasChatOff then U:DoLockChatBar()end U.eGuiObjectsChanged:Fire()end
--////////////////////////////// Methods
--//////////////////////////////////////
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.Size = UDim2.new(1, 0, 1, 0)
	BaseFrame.BackgroundTransparency = 0.6
	BaseFrame.BorderSizePixel = 0
	BaseFrame.BackgroundColor3 = ChatSettings.ChatBarBackGroundColor
	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
