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