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