local V={}V.__index=V function V.CreateGuiObjects(A,V)A.ChatBarParentFrame=V local T=7 local F=5 local n=Instance.new("\070\114\097\109\101")n.Selectable=false n.Size=UDim2.new(1,0,1,0)n.BackgroundTransparency=.6 n.BorderSizePixel=0 n.BackgroundColor3=ChatSettings.ChatBarBackGroundColor n.Parent=V 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,-T*2,1,-T*2)j.Position=UDim2.new(0,T,0,T)j.Parent=n local s=Instance.new("\070\114\097\109\101")s.BackgroundTransparency=1 s.Size=UDim2.new(1,-F*2,1,-F*2)s.Position=UDim2.new(0,F,0,F)s.Parent=j local y=Instance.new("\084\101\120\116\066\111\120")y.Selectable=ChatSettings.GamepadNavigationEnabled y.Name="\067\104\097\116\066\097\114"y.BackgroundTransparency=1 y.Size=UDim2.new(1,0,1,0)y.Position=UDim2.new(0,0,0,0)y.TextSize=ChatSettings.ChatBarTextSize y.Font=ChatSettings.ChatBarFont y.TextColor3=ChatSettings.ChatBarTextColor y.TextTransparency=.4 y.TextStrokeTransparency=1 y.ClearTextOnFocus=false y.TextXAlignment=Enum.TextXAlignment.Left y.TextYAlignment=Enum.TextYAlignment.Top y.TextWrapped=true y.Text=""y.Parent=s local x=Instance.new("\084\101\120\116\066\117\116\116\111\110")x.Selectable=false x.Name="\077\101\115\115\097\103\101\077\111\100\101"x.BackgroundTransparency=1 x.Position=UDim2.new(0,0,0,0)x.TextSize=ChatSettings.ChatBarTextSize x.Font=ChatSettings.ChatBarFont x.TextXAlignment=Enum.TextXAlignment.Left x.TextWrapped=true x.Text=""x.Size=UDim2.new(0,0,0,0)x.TextYAlignment=Enum.TextYAlignment.Center x.TextColor3=A:GetDefaultChannelNameColor()x.Visible=true x.Parent=s local q=Instance.new("\084\101\120\116\076\097\098\101\108")q.Selectable=false q.TextWrapped=true q.BackgroundTransparency=1 q.Size=y.Size q.Position=y.Position q.TextSize=y.TextSize q.Font=y.Font q.TextColor3=y.TextColor3 q.TextTransparency=y.TextTransparency q.TextStrokeTransparency=y.TextStrokeTransparency q.TextXAlignment=y.TextXAlignment q.TextYAlignment=y.TextYAlignment q.Text="\084\104\105\115 \118\097\108\117\101 \110\101\101\100\115 \116\111 \098\101 \115\101\116 \119\105\116\104 \058\083\101\116\084\101\120\116\076\097\098\101\108\084\101\120\116\040\041"q.Parent=s A.GuiObject=n A.TextBox=y A.TextLabel=q A.GuiObjects.BaseFrame=n A.GuiObjects.TextBoxFrame=j A.GuiObjects.TextBox=y A.GuiObjects.TextLabel=q A.GuiObjects.MessageModeTextButton=x A:AnimGuiObjects()A:SetUpTextBoxEvents(y,q,x)if A.UserHasChatOff then A:DoLockChatBar()end A.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 = "This value needs to be set with :SetTextLabelText()"
	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
