local e={}local l=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local Z=game:GetService("\082\117\110\083\101\114\118\105\099\101")local j=game:GetService("\080\108\097\121\101\114\115")local v=game:GetService("\084\101\120\116\083\101\114\118\105\099\101")local D=j.LocalPlayer while not D do j.PlayerAdded:wait()D=j.LocalPlayer end local q=game:GetService("\067\104\097\116")local h=script.Parent local c=require((q:WaitForChild("\067\108\105\101\110\116\067\104\097\116\077\111\100\117\108\101\115")):WaitForChild("\067\104\097\116\083\101\116\116\105\110\103\115"))local Y=require(h:WaitForChild("\067\117\114\118\101\085\116\105\108"))local X=require(h:WaitForChild("\077\101\115\115\097\103\101\083\101\110\100\101\114"))local I=nil pcall(function()I=require((game:GetService("\067\104\097\116")).ClientChatModules.ChatLocalization)end)if I==nil then I={Get=function(e,l,Z)return Z end}end local Q={}Q.__index=Q function Q.CreateGuiObjects(e,l)e.ChatBarParentFrame=l local Z=Instance.new("\070\114\097\109\101")Z.Selectable=false Z.Size=UDim2.new(1,0,1,0)Z.BackgroundTransparency=.6 Z.BorderSizePixel=0 Z.BackgroundColor3=c.ChatBarBackGroundColor Z.Parent=l 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=c.ChatBarBoxColor j.Size=UDim2.new(1,-14,1,-14)j.Position=UDim2.new(0,7,0,7)j.Parent=Z local v=Instance.new("\070\114\097\109\101")v.BackgroundTransparency=1 v.Size=UDim2.new(1,-10,1,-10)v.Position=UDim2.new(0,5,0,5)v.Parent=j local D=Instance.new("\084\101\120\116\066\111\120")D.Selectable=c.GamepadNavigationEnabled D.Name="\067\104\097\116\066\097\114"D.BackgroundTransparency=1 D.Size=UDim2.new(1,0,1,0)D.Position=UDim2.new(0,0,0,0)D.TextSize=c.ChatBarTextSize D.Font=c.ChatBarFont D.TextColor3=c.ChatBarTextColor D.TextTransparency=.4 D.TextStrokeTransparency=1 D.ClearTextOnFocus=false D.TextXAlignment=Enum.TextXAlignment.Left D.TextYAlignment=Enum.TextYAlignment.Top D.TextWrapped=true D.Text=""D.Parent=v local q=Instance.new("\084\101\120\116\066\117\116\116\111\110")q.Selectable=false q.Name="\077\101\115\115\097\103\101\077\111\100\101"q.BackgroundTransparency=1 q.Position=UDim2.new(0,0,0,0)q.TextSize=c.ChatBarTextSize q.Font=c.ChatBarFont q.TextXAlignment=Enum.TextXAlignment.Left q.TextWrapped=true q.Text=""q.Size=UDim2.new(0,0,0,0)q.TextYAlignment=Enum.TextYAlignment.Center q.TextColor3=e:GetDefaultChannelNameColor()q.Visible=true q.Parent=v local h=Instance.new("\084\101\120\116\076\097\098\101\108")h.Selectable=false h.TextWrapped=true h.BackgroundTransparency=1 h.Size=D.Size h.Position=D.Position h.TextSize=D.TextSize h.Font=D.Font h.TextColor3=D.TextColor3 h.TextTransparency=D.TextTransparency h.TextStrokeTransparency=D.TextStrokeTransparency h.TextXAlignment=D.TextXAlignment h.TextYAlignment=D.TextYAlignment h.Text="\046\046\046"h.Parent=v e.GuiObject=Z e.TextBox=D e.TextLabel=h e.GuiObjects.BaseFrame=Z e.GuiObjects.TextBoxFrame=j e.GuiObjects.TextBox=D e.GuiObjects.TextLabel=h e.GuiObjects.MessageModeTextButton=q e:AnimGuiObjects()e:SetUpTextBoxEvents(D,h,q)if e.UserHasChatOff then e:DoLockChatBar()end e.eGuiObjectsChanged:Fire()end function Q.DoLockChatBar(e)if e.TextLabel then if D.UserId>0 then e.TextLabel.Text=I:Get("\071\097\109\101\067\104\097\116\095\067\104\097\116\077\101\115\115\097\103\101\086\097\108\105\100\097\116\111\114\095\083\101\116\116\105\110\103\115\069\114\114\111\114","\084\111 \099\104\097\116 \105\110 \103\097\109\101\044 \116\117\114\110 \111\110 \099\104\097\116 \105\110 \121\111\117\114 \080\114\105\118\097\099\121 \083\101\116\116\105\110\103\115\046")else e.TextLabel.Text=I:Get("\071\097\109\101\067\104\097\116\095\083\119\097\108\108\111\119\071\117\101\115\116\067\104\097\116\095\077\101\115\115\097\103\101","\083\105\103\110 \117\112 \116\111 \099\104\097\116 \105\110 \103\097\109\101\046")end e:CalculateSize()end if e.TextBox then e.TextBox.Active=false e.TextBox.Focused:connect(function()e.TextBox:ReleaseFocus()end)end end function Q.SetUpTextBoxEvents(e,Z,j,v)for l,Z in pairs(e.TextBoxConnections)do Z:disconnect()e.TextBoxConnections[l]=nil end e.TextBoxConnections.UserInputBegan=l.InputBegan:connect(function(l,j)if l.KeyCode==Enum.KeyCode.Backspace and(e:IsFocused()and Z.Text=="")then e:SetChannelTarget(c.GeneralChannelName)end end)e.TextBoxConnections.TextBoxChanged=Z.Changed:connect(function(l)local j=nil if l=="\065\098\115\111\108\117\116\101\083\105\122\101"then e:CalculateSize()return end if l~="\084\101\120\116"then return end e:CalculateSize()if c.MaximumMessageLength<string.len(Z.Text)then Z.Text=string.sub(Z.Text,1,c.MaximumMessageLength)return end if not e.InCustomState then j=e.CommandProcessor:ProcessInProgressChatMessage(Z.Text,e.ChatWindow,e)if not j then return end else e.CustomState:TextUpdated()return end e.InCustomState=true e.CustomState=j end)e.TextBoxConnections.MessageModeClick=v.MouseButton1Click:connect(function()if v.Text~=""then e:SetChannelTarget(c.GeneralChannelName)end end)e.TextBoxConnections.TextBoxFocused=Z.Focused:connect(function()if not e.UserHasChatOff then e:CalculateSize()j.Visible=false end end)e.TextBoxConnections.TextBoxFocusLost=Z.FocusLost:connect(function(l,v)e:CalculateSize()if v and v.KeyCode==Enum.KeyCode.Escape then Z.Text=""end if Z.Text~=""then j.Visible=false return end j.Visible=true end)end function Q.GetTextBox(e)return e.TextBox end function Q.GetMessageModeTextButton(e)return e.GuiObjects.MessageModeTextButton end function Q.GetMessageModeTextLabel(e)return e:GetMessageModeTextButton()end function Q.IsFocused(e)if e.UserHasChatOff then return false end return(e:GetTextBox()):IsFocused()end function Q.GetVisible(e)return e.GuiObject.Visible end function Q.CaptureFocus(e)if not e.UserHasChatOff then(e:GetTextBox()):CaptureFocus()end end function Q.ReleaseFocus(e,l)(e:GetTextBox()):ReleaseFocus(l)end function Q.ResetText(e)(e:GetTextBox()).Text=""end function Q.SetText(e,l)(e:GetTextBox()).Text=l end function Q.GetEnabled(e)return e.GuiObject.Visible end function Q.SetEnabled(e,l)if e.UserHasChatOff then e.GuiObject.Visible=true return end e.GuiObject.Visible=l end function Q.SetTextLabelText(e,l)if not e.UserHasChatOff then e.TextLabel.Text=l end end function Q.SetTextBoxText(e,l)e.TextBox.Text=l end function Q.GetTextBoxText(e)return e.TextBox.Text end function Q.ResetSize(e)e.TargetYSize=0 e:TweenToTargetYSize()end function Q.CalculateSize(e)if e.CalculatingSizeLock then return end e.CalculatingSizeLock=true if e:IsFocused()or e.TextBox.Text~=""then local l=e.TextBox.TextSize local Z=e.TextBox local j=(v:GetTextSize(Z.Text,Z.TextSize,Z.Font,Vector2.new(Z.AbsoluteSize.X,10000))).Y else v22=e.TextLabel.TextSize local l=e.TextLabel v24=(v:GetTextSize(l.Text,l.TextSize,l.Font,Vector2.new(l.AbsoluteSize.X,10000))).Y end local l=v24-v22 if e.TargetYSize~=l then e.TargetYSize=l e:TweenToTargetYSize()end e.CalculatingSizeLock=false end function Q.TweenToTargetYSize(e)local l=UDim2.new(1,0,1,e.TargetYSize)e.GuiObject.Size=l e.GuiObject.Size=e.GuiObject.Size local Z=math.min(1,math.abs(e.GuiObject.AbsoluteSize.Y-e.GuiObject.AbsoluteSize.Y)*(1/e.TweenPixelsPerSecond))if not pcall(function()e.GuiObject:TweenSize(l,Enum.EasingDirection.Out,Enum.EasingStyle.Quad,Z,true)end)then e.GuiObject.Size=l end end function Q.SetTextSize(e,l)if not e:IsInCustomState()then if e.TextBox then e.TextBox.TextSize=l end if e.TextLabel then e.TextLabel.TextSize=l end end end function Q.GetDefaultChannelNameColor(e)if not c.DefaultChannelNameColor then return Color3.fromRGB(35,76,142)end return c.DefaultChannelNameColor end function Q.SetChannelTarget(e,l)local Z=e.GuiObjects.MessageModeTextButton local j=e.TextBox local v=e.TextLabel e.TargetChannel=l if not e:IsInCustomState()then if l==c.GeneralChannelName then Z.Text=""Z.Size=UDim2.new(0,0,0,0)j.Size=UDim2.new(1,0,1,0)j.Position=UDim2.new(0,0,0,0)v.Size=UDim2.new(1,0,1,0)v.Position=UDim2.new(0,0,0,0)return end else return end Z.Size=UDim2.new(0,1000,1,0)Z.Text=string.format("\091\037\115\093 ",l)local D=e:GetChannelNameColor(l)if D then Z.TextColor3=D else Z.TextColor3=e:GetDefaultChannelNameColor()end local q=Z.TextBounds.X Z.Size=UDim2.new(0,q,1,0)j.Size=UDim2.new(1,-q,1,0)j.Position=UDim2.new(0,q,0,0)v.Size=UDim2.new(1,-q,1,0)v.Position=UDim2.new(0,q,0,0)end function Q.IsInCustomState(e)return e.InCustomState end function Q.ResetCustomState(e)if e.InCustomState then e.CustomState:Destroy()e.CustomState=nil e.InCustomState=false e.ChatBarParentFrame:ClearAllChildren()e:CreateGuiObjects(e.ChatBarParentFrame)e:SetTextLabelText(I:Get("\071\097\109\101\067\104\097\116\095\067\104\097\116\077\097\105\110\095\067\104\097\116\066\097\114\084\101\120\116","\084\111 \099\104\097\116 \099\108\105\099\107 \104\101\114\101 \111\114 \112\114\101\115\115 \"\047\" \107\101\121"))end end function Q.GetCustomMessage(e)if not e.InCustomState then return nil end return e.CustomState:GetMessage()end function Q.CustomStateProcessCompletedMessage(e,l)if not e.InCustomState then return false end return e.CustomState:ProcessCompletedMessage()end function Q.FadeOutBackground(e,l)e.AnimParams.Background_TargetTransparency=1 e.AnimParams.Background_NormalizedExptValue=Y:NormalizedDefaultExptValueInSeconds(l)e:FadeOutText(l)end function Q.FadeInBackground(e,l)e.AnimParams.Background_TargetTransparency=.6 e.AnimParams.Background_NormalizedExptValue=Y:NormalizedDefaultExptValueInSeconds(l)e:FadeInText(l)end function Q.FadeOutText(e,l)e.AnimParams.Text_TargetTransparency=1 e.AnimParams.Text_NormalizedExptValue=Y:NormalizedDefaultExptValueInSeconds(l)end function Q.FadeInText(e,l)e.AnimParams.Text_TargetTransparency=.4 e.AnimParams.Text_NormalizedExptValue=Y:NormalizedDefaultExptValueInSeconds(l)end function Q.AnimGuiObjects(e)e.GuiObject.BackgroundTransparency=e.AnimParams.Background_CurrentTransparency e.GuiObjects.TextBoxFrame.BackgroundTransparency=e.AnimParams.Background_CurrentTransparency e.GuiObjects.TextLabel.TextTransparency=e.AnimParams.Text_CurrentTransparency e.GuiObjects.TextBox.TextTransparency=e.AnimParams.Text_CurrentTransparency e.GuiObjects.MessageModeTextButton.TextTransparency=e.AnimParams.Text_CurrentTransparency end function Q.InitializeAnimParams(e)e.AnimParams.Text_TargetTransparency=.4 e.AnimParams.Text_CurrentTransparency=.4 e.AnimParams.Text_NormalizedExptValue=1 e.AnimParams.Background_TargetTransparency=.6 e.AnimParams.Background_CurrentTransparency=.6 e.AnimParams.Background_NormalizedExptValue=1 end function Q.Update(e,l)e.AnimParams.Text_CurrentTransparency=Y:Expt(e.AnimParams.Text_CurrentTransparency,e.AnimParams.Text_TargetTransparency,e.AnimParams.Text_NormalizedExptValue,l)e.AnimParams.Background_CurrentTransparency=Y:Expt(e.AnimParams.Background_CurrentTransparency,e.AnimParams.Background_TargetTransparency,e.AnimParams.Background_NormalizedExptValue,l)e:AnimGuiObjects()end function Q.SetChannelNameColor(e,l,Z)e.ChannelNameColors[l]=Z if e.GuiObjects.MessageModeTextButton.Text==l then e.GuiObjects.MessageModeTextButton.TextColor3=Z end end function Q.GetChannelNameColor(e,l)return e.ChannelNameColors[l]end function e.new(e,l)local j=setmetatable({},Q)j.GuiObject=nil j.ChatBarParentFrame=nil j.TextBox=nil j.TextLabel=nil j.GuiObjects={}j.eGuiObjectsChanged=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")j.GuiObjectsChanged=j.eGuiObjectsChanged.Event j.TextBoxConnections={}j.InCustomState=false j.CustomState=nil j.TargetChannel=nil j.CommandProcessor=e j.ChatWindow=l j.TweenPixelsPerSecond=500 j.TargetYSize=0 j.AnimParams={}j.CalculatingSizeLock=false j.ChannelNameColors={}j.UserHasChatOff=false j:InitializeAnimParams()c.SettingsChanged:connect(function(e,l)if e=="\067\104\097\116\066\097\114\084\101\120\116\083\105\122\101"then j:SetTextSize(l)end end);(coroutine.wrap(function()local e,l=pcall(function()return q:CanUserChatAsync(D.UserId)end)if(e and(Z:IsStudio()and l))==false then j.UserHasChatOff=true j:DoLockChatBar()end end))()return j end return e


local v1 = {};
local l__UserInputService__2 = game:GetService("UserInputService");
local l__RunService__3 = game:GetService("RunService");
local l__Players__4 = game:GetService("Players");
local l__TextService__5 = game:GetService("TextService");
local v6 = l__Players__4.LocalPlayer;
while not v6 do
	l__Players__4.PlayerAdded:wait();
	v6 = l__Players__4.LocalPlayer;
end;
local l__Chat__7 = game:GetService("Chat");
local l__Parent__8 = script.Parent;
local v9 = require(l__Chat__7:WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"));
local v10 = require(l__Parent__8:WaitForChild("CurveUtil"));
local v11 = require(l__Parent__8:WaitForChild("MessageSender"));
local u1 = nil;
pcall(function()
	u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
end);
if u1 == nil then
	u1 = {
		Get = function(p1, p2, p3)
			return p3;
		end
	};
end;
local v12 = {};
v12.__index = v12;
function v12.CreateGuiObjects(p4, p5)
	p4.ChatBarParentFrame = p5;
	local v13 = Instance.new("Frame");
	v13.Selectable = false;
	v13.Size = UDim2.new(1, 0, 1, 0);
	v13.BackgroundTransparency = 0.6;
	v13.BorderSizePixel = 0;
	v13.BackgroundColor3 = v9.ChatBarBackGroundColor;
	v13.Parent = p5;
	local v14 = Instance.new("Frame");
	v14.Selectable = false;
	v14.Name = "BoxFrame";
	v14.BackgroundTransparency = 0.6;
	v14.BorderSizePixel = 0;
	v14.BackgroundColor3 = v9.ChatBarBoxColor;
	v14.Size = UDim2.new(1, -14, 1, -14);
	v14.Position = UDim2.new(0, 7, 0, 7);
	v14.Parent = v13;
	local v15 = Instance.new("Frame");
	v15.BackgroundTransparency = 1;
	v15.Size = UDim2.new(1, -10, 1, -10);
	v15.Position = UDim2.new(0, 5, 0, 5);
	v15.Parent = v14;
	local v16 = Instance.new("TextBox");
	v16.Selectable = v9.GamepadNavigationEnabled;
	v16.Name = "ChatBar";
	v16.BackgroundTransparency = 1;
	v16.Size = UDim2.new(1, 0, 1, 0);
	v16.Position = UDim2.new(0, 0, 0, 0);
	v16.TextSize = v9.ChatBarTextSize;
	v16.Font = v9.ChatBarFont;
	v16.TextColor3 = v9.ChatBarTextColor;
	v16.TextTransparency = 0.4;
	v16.TextStrokeTransparency = 1;
	v16.ClearTextOnFocus = false;
	v16.TextXAlignment = Enum.TextXAlignment.Left;
	v16.TextYAlignment = Enum.TextYAlignment.Top;
	v16.TextWrapped = true;
	v16.Text = "";
	v16.Parent = v15;
	local v17 = Instance.new("TextButton");
	v17.Selectable = false;
	v17.Name = "MessageMode";
	v17.BackgroundTransparency = 1;
	v17.Position = UDim2.new(0, 0, 0, 0);
	v17.TextSize = v9.ChatBarTextSize;
	v17.Font = v9.ChatBarFont;
	v17.TextXAlignment = Enum.TextXAlignment.Left;
	v17.TextWrapped = true;
	v17.Text = "";
	v17.Size = UDim2.new(0, 0, 0, 0);
	v17.TextYAlignment = Enum.TextYAlignment.Center;
	v17.TextColor3 = p4:GetDefaultChannelNameColor();
	v17.Visible = true;
	v17.Parent = v15;
	local v18 = Instance.new("TextLabel");
	v18.Selectable = false;
	v18.TextWrapped = true;
	v18.BackgroundTransparency = 1;
	v18.Size = v16.Size;
	v18.Position = v16.Position;
	v18.TextSize = v16.TextSize;
	v18.Font = v16.Font;
	v18.TextColor3 = v16.TextColor3;
	v18.TextTransparency = v16.TextTransparency;
	v18.TextStrokeTransparency = v16.TextStrokeTransparency;
	v18.TextXAlignment = v16.TextXAlignment;
	v18.TextYAlignment = v16.TextYAlignment;
	v18.Text = "...";
	v18.Parent = v15;
	p4.GuiObject = v13;
	p4.TextBox = v16;
	p4.TextLabel = v18;
	p4.GuiObjects.BaseFrame = v13;
	p4.GuiObjects.TextBoxFrame = v14;
	p4.GuiObjects.TextBox = v16;
	p4.GuiObjects.TextLabel = v18;
	p4.GuiObjects.MessageModeTextButton = v17;
	p4:AnimGuiObjects();
	p4:SetUpTextBoxEvents(v16, v18, v17);
	if p4.UserHasChatOff then
		p4:DoLockChatBar();
	end;
	p4.eGuiObjectsChanged:Fire();
end;
function v12.DoLockChatBar(p6)
	if p6.TextLabel then
		if v6.UserId > 0 then
			p6.TextLabel.Text = u1:Get("GameChat_ChatMessageValidator_SettingsError", "To chat in game, turn on chat in your Privacy Settings.");
		else
			p6.TextLabel.Text = u1:Get("GameChat_SwallowGuestChat_Message", "Sign up to chat in game.");
		end;
		p6:CalculateSize();
	end;
	if p6.TextBox then
		p6.TextBox.Active = false;
		p6.TextBox.Focused:connect(function()
			p6.TextBox:ReleaseFocus();
		end);
	end;
end;
function v12.SetUpTextBoxEvents(p7, p8, p9, p10)
	for v19, v20 in pairs(p7.TextBoxConnections) do
		v20:disconnect();
		p7.TextBoxConnections[v19] = nil;
	end;
	p7.TextBoxConnections.UserInputBegan = l__UserInputService__2.InputBegan:connect(function(p11, p12)
		if p11.KeyCode == Enum.KeyCode.Backspace and p7:IsFocused() and p8.Text == "" then
			p7:SetChannelTarget(v9.GeneralChannelName);
		end;
	end);
	p7.TextBoxConnections.TextBoxChanged = p8.Changed:connect(function(p13)
		local v21 = nil;
		if p13 == "AbsoluteSize" then
			p7:CalculateSize();
			return;
		end;
		if p13 ~= "Text" then
			return;
		end;
		p7:CalculateSize();
		if v9.MaximumMessageLength < string.len(p8.Text) then
			p8.Text = string.sub(p8.Text, 1, v9.MaximumMessageLength);
			return;
		end;
		if not p7.InCustomState then
			v21 = p7.CommandProcessor:ProcessInProgressChatMessage(p8.Text, p7.ChatWindow, p7);
			if not v21 then
				return;
			end;
		else
			p7.CustomState:TextUpdated();
			return;
		end;
		p7.InCustomState = true;
		p7.CustomState = v21;
	end);
	p7.TextBoxConnections.MessageModeClick = p10.MouseButton1Click:connect(function()
		if p10.Text ~= "" then
			p7:SetChannelTarget(v9.GeneralChannelName);
		end;
	end);
	p7.TextBoxConnections.TextBoxFocused = p8.Focused:connect(function()
		if not p7.UserHasChatOff then
			p7:CalculateSize();
			p9.Visible = false;
		end;
	end);
	p7.TextBoxConnections.TextBoxFocusLost = p8.FocusLost:connect(function(p14, p15)
		p7:CalculateSize();
		if p15 and p15.KeyCode == Enum.KeyCode.Escape then
			p8.Text = "";
		end;
		if p8.Text ~= "" then
			p9.Visible = false;
			return;
		end;
		p9.Visible = true;
	end);
end;
function v12.GetTextBox(p16)
	return p16.TextBox;
end;
function v12.GetMessageModeTextButton(p17)
	return p17.GuiObjects.MessageModeTextButton;
end;
function v12.GetMessageModeTextLabel(p18)
	return p18:GetMessageModeTextButton();
end;
function v12.IsFocused(p19)
	if p19.UserHasChatOff then
		return false;
	end;
	return p19:GetTextBox():IsFocused();
end;
function v12.GetVisible(p20)
	return p20.GuiObject.Visible;
end;
function v12.CaptureFocus(p21)
	if not p21.UserHasChatOff then
		p21:GetTextBox():CaptureFocus();
	end;
end;
function v12.ReleaseFocus(p22, p23)
	p22:GetTextBox():ReleaseFocus(p23);
end;
function v12.ResetText(p24)
	p24:GetTextBox().Text = "";
end;
function v12.SetText(p25, p26)
	p25:GetTextBox().Text = p26;
end;
function v12.GetEnabled(p27)
	return p27.GuiObject.Visible;
end;
function v12.SetEnabled(p28, p29)
	if p28.UserHasChatOff then
		p28.GuiObject.Visible = true;
		return;
	end;
	p28.GuiObject.Visible = p29;
end;
function v12.SetTextLabelText(p30, p31)
	if not p30.UserHasChatOff then
		p30.TextLabel.Text = p31;
	end;
end;
function v12.SetTextBoxText(p32, p33)
	p32.TextBox.Text = p33;
end;
function v12.GetTextBoxText(p34)
	return p34.TextBox.Text;
end;
function v12.ResetSize(p35)
	p35.TargetYSize = 0;
	p35:TweenToTargetYSize();
end;
function v12.CalculateSize(p36)
	if p36.CalculatingSizeLock then
		return;
	end;
	p36.CalculatingSizeLock = true;
	if p36:IsFocused() or p36.TextBox.Text ~= "" then
		local v22 = p36.TextBox.TextSize;
		local l__TextBox__23 = p36.TextBox;
		local v24 = l__TextService__5:GetTextSize(l__TextBox__23.Text, l__TextBox__23.TextSize, l__TextBox__23.Font, Vector2.new(l__TextBox__23.AbsoluteSize.X, 10000)).Y;
	else
		v22 = p36.TextLabel.TextSize;
		local l__TextLabel__25 = p36.TextLabel;
		v24 = l__TextService__5:GetTextSize(l__TextLabel__25.Text, l__TextLabel__25.TextSize, l__TextLabel__25.Font, Vector2.new(l__TextLabel__25.AbsoluteSize.X, 10000)).Y;
	end;
	local v26 = v24 - v22;
	if p36.TargetYSize ~= v26 then
		p36.TargetYSize = v26;
		p36:TweenToTargetYSize();
	end;
	p36.CalculatingSizeLock = false;
end;
function v12.TweenToTargetYSize(p37)
	local v27 = UDim2.new(1, 0, 1, p37.TargetYSize);
	p37.GuiObject.Size = v27;
	p37.GuiObject.Size = p37.GuiObject.Size;
	local u2 = math.min(1, math.abs(p37.GuiObject.AbsoluteSize.Y - p37.GuiObject.AbsoluteSize.Y) * (1 / p37.TweenPixelsPerSecond));
	if not pcall(function()
		p37.GuiObject:TweenSize(v27, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, u2, true);
	end) then
		p37.GuiObject.Size = v27;
	end;
end;
function v12.SetTextSize(p38, p39)
	if not p38:IsInCustomState() then
		if p38.TextBox then
			p38.TextBox.TextSize = p39;
		end;
		if p38.TextLabel then
			p38.TextLabel.TextSize = p39;
		end;
	end;
end;
function v12.GetDefaultChannelNameColor(p40)
	if not v9.DefaultChannelNameColor then
		return Color3.fromRGB(35, 76, 142);
	end;
	return v9.DefaultChannelNameColor;
end;
function v12.SetChannelTarget(p41, p42)
	local l__MessageModeTextButton__28 = p41.GuiObjects.MessageModeTextButton;
	local l__TextBox__29 = p41.TextBox;
	local l__TextLabel__30 = p41.TextLabel;
	p41.TargetChannel = p42;
	if not p41:IsInCustomState() then
		if p42 == v9.GeneralChannelName then
			l__MessageModeTextButton__28.Text = "";
			l__MessageModeTextButton__28.Size = UDim2.new(0, 0, 0, 0);
			l__TextBox__29.Size = UDim2.new(1, 0, 1, 0);
			l__TextBox__29.Position = UDim2.new(0, 0, 0, 0);
			l__TextLabel__30.Size = UDim2.new(1, 0, 1, 0);
			l__TextLabel__30.Position = UDim2.new(0, 0, 0, 0);
			return;
		end;
	else
		return;
	end;
	l__MessageModeTextButton__28.Size = UDim2.new(0, 1000, 1, 0);
	l__MessageModeTextButton__28.Text = string.format("[%s] ", p42);
	local v31 = p41:GetChannelNameColor(p42);
	if v31 then
		l__MessageModeTextButton__28.TextColor3 = v31;
	else
		l__MessageModeTextButton__28.TextColor3 = p41:GetDefaultChannelNameColor();
	end;
	local l__X__32 = l__MessageModeTextButton__28.TextBounds.X;
	l__MessageModeTextButton__28.Size = UDim2.new(0, l__X__32, 1, 0);
	l__TextBox__29.Size = UDim2.new(1, -l__X__32, 1, 0);
	l__TextBox__29.Position = UDim2.new(0, l__X__32, 0, 0);
	l__TextLabel__30.Size = UDim2.new(1, -l__X__32, 1, 0);
	l__TextLabel__30.Position = UDim2.new(0, l__X__32, 0, 0);
end;
function v12.IsInCustomState(p43)
	return p43.InCustomState;
end;
function v12.ResetCustomState(p44)
	if p44.InCustomState then
		p44.CustomState:Destroy();
		p44.CustomState = nil;
		p44.InCustomState = false;
		p44.ChatBarParentFrame:ClearAllChildren();
		p44:CreateGuiObjects(p44.ChatBarParentFrame);
		p44:SetTextLabelText(u1:Get("GameChat_ChatMain_ChatBarText", "To chat click here or press \"/\" key"));
	end;
end;
function v12.GetCustomMessage(p45)
	if not p45.InCustomState then
		return nil;
	end;
	return p45.CustomState:GetMessage();
end;
function v12.CustomStateProcessCompletedMessage(p46, p47)
	if not p46.InCustomState then
		return false;
	end;
	return p46.CustomState:ProcessCompletedMessage();
end;
function v12.FadeOutBackground(p48, p49)
	p48.AnimParams.Background_TargetTransparency = 1;
	p48.AnimParams.Background_NormalizedExptValue = v10:NormalizedDefaultExptValueInSeconds(p49);
	p48:FadeOutText(p49);
end;
function v12.FadeInBackground(p50, p51)
	p50.AnimParams.Background_TargetTransparency = 0.6;
	p50.AnimParams.Background_NormalizedExptValue = v10:NormalizedDefaultExptValueInSeconds(p51);
	p50:FadeInText(p51);
end;
function v12.FadeOutText(p52, p53)
	p52.AnimParams.Text_TargetTransparency = 1;
	p52.AnimParams.Text_NormalizedExptValue = v10:NormalizedDefaultExptValueInSeconds(p53);
end;
function v12.FadeInText(p54, p55)
	p54.AnimParams.Text_TargetTransparency = 0.4;
	p54.AnimParams.Text_NormalizedExptValue = v10:NormalizedDefaultExptValueInSeconds(p55);
end;
function v12.AnimGuiObjects(p56)
	p56.GuiObject.BackgroundTransparency = p56.AnimParams.Background_CurrentTransparency;
	p56.GuiObjects.TextBoxFrame.BackgroundTransparency = p56.AnimParams.Background_CurrentTransparency;
	p56.GuiObjects.TextLabel.TextTransparency = p56.AnimParams.Text_CurrentTransparency;
	p56.GuiObjects.TextBox.TextTransparency = p56.AnimParams.Text_CurrentTransparency;
	p56.GuiObjects.MessageModeTextButton.TextTransparency = p56.AnimParams.Text_CurrentTransparency;
end;
function v12.InitializeAnimParams(p57)
	p57.AnimParams.Text_TargetTransparency = 0.4;
	p57.AnimParams.Text_CurrentTransparency = 0.4;
	p57.AnimParams.Text_NormalizedExptValue = 1;
	p57.AnimParams.Background_TargetTransparency = 0.6;
	p57.AnimParams.Background_CurrentTransparency = 0.6;
	p57.AnimParams.Background_NormalizedExptValue = 1;
end;
function v12.Update(p58, p59)
	p58.AnimParams.Text_CurrentTransparency = v10:Expt(p58.AnimParams.Text_CurrentTransparency, p58.AnimParams.Text_TargetTransparency, p58.AnimParams.Text_NormalizedExptValue, p59);
	p58.AnimParams.Background_CurrentTransparency = v10:Expt(p58.AnimParams.Background_CurrentTransparency, p58.AnimParams.Background_TargetTransparency, p58.AnimParams.Background_NormalizedExptValue, p59);
	p58:AnimGuiObjects();
end;
function v12.SetChannelNameColor(p60, p61, p62)
	p60.ChannelNameColors[p61] = p62;
	if p60.GuiObjects.MessageModeTextButton.Text == p61 then
		p60.GuiObjects.MessageModeTextButton.TextColor3 = p62;
	end;
end;
function v12.GetChannelNameColor(p63, p64)
	return p63.ChannelNameColors[p64];
end;
function v1.new(p65, p66)
	local v33 = setmetatable({}, v12);
	v33.GuiObject = nil;
	v33.ChatBarParentFrame = nil;
	v33.TextBox = nil;
	v33.TextLabel = nil;
	v33.GuiObjects = {};
	v33.eGuiObjectsChanged = Instance.new("BindableEvent");
	v33.GuiObjectsChanged = v33.eGuiObjectsChanged.Event;
	v33.TextBoxConnections = {};
	v33.InCustomState = false;
	v33.CustomState = nil;
	v33.TargetChannel = nil;
	v33.CommandProcessor = p65;
	v33.ChatWindow = p66;
	v33.TweenPixelsPerSecond = 500;
	v33.TargetYSize = 0;
	v33.AnimParams = {};
	v33.CalculatingSizeLock = false;
	v33.ChannelNameColors = {};
	v33.UserHasChatOff = false;
	v33:InitializeAnimParams();
	v9.SettingsChanged:connect(function(p67, p68)
		if p67 == "ChatBarTextSize" then
			v33:SetTextSize(p68);
		end;
	end);
	coroutine.wrap(function()
		local v34, v35 = pcall(function()
			return l__Chat__7:CanUserChatAsync(v6.UserId);
		end);
		if (v34 and (l__RunService__3:IsStudio() and v35)) == false then
			v33.UserHasChatOff = true;
			v33:DoLockChatBar();
		end;
	end)();
	return v33;
end;
return v1;

