local u={}local v=game:GetService("\080\108\097\121\101\114\115")local o=game:GetService("\067\104\097\116")local t=game:GetService("\067\104\097\116")local z=script.Parent local y={}y.__index=y local s=require((t: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"))function getClassicChatEnabled()if s.ClassicChatEnabled~=nil then return s.ClassicChatEnabled end return v.ClassicChat end function getBubbleChatEnabled()if s.BubbleChatEnabled~=nil then return s.BubbleChatEnabled end return v.BubbleChat end function bubbleChatOnly()return not getClassicChatEnabled()and getBubbleChatEnabled()end function mergeProps(u,v)if u then if not v then return end else return end local o,t,z=pairs(u)while true do local u,y=o(t,z)if u then else break end z=u if v[u]~=nil then v[u]=y end end end local n=v.LocalPlayer:WaitForChild("\080\108\097\121\101\114\071\117\105")function y.CreateGuiObjects(u,v)local o=nil pcall(function()o=t:InvokeChatCallback(Enum.ChatCallbackType.OnCreatingChatWindow,nil)end)mergeProps(o,s)local z=Instance.new("\070\114\097\109\101")z.BackgroundTransparency=1 z.Active=s.WindowDraggable z.Parent=v z.AutoLocalize=false local y=Instance.new("\070\114\097\109\101")y.Selectable=false y.Name="\067\104\097\116\066\097\114\080\097\114\101\110\116\070\114\097\109\101"y.BackgroundTransparency=1 y.Parent=z local Y=Instance.new("\070\114\097\109\101")Y.Selectable=false Y.Name="\067\104\097\110\110\101\108\115\066\097\114\080\097\114\101\110\116\070\114\097\109\101"Y.BackgroundTransparency=1 Y.Position=UDim2.new(0,0,0,0)Y.Parent=z local J=Instance.new("\070\114\097\109\101")J.Selectable=false J.Name="\067\104\097\116\067\104\097\110\110\101\108\080\097\114\101\110\116\070\114\097\109\101"J.BackgroundTransparency=1 J.BackgroundColor3=s.BackGroundColor J.BackgroundTransparency=.6 J.BorderSizePixel=0 J.Parent=z local K=Instance.new("\073\109\097\103\101\066\117\116\116\111\110")K.Selectable=false K.Image=""K.BackgroundTransparency=.6 K.BorderSizePixel=0 K.Visible=false K.BackgroundColor3=s.BackGroundColor K.Active=true if bubbleChatOnly()then K.Position=UDim2.new(1,-K.AbsoluteSize.X,0,0)else K.Position=UDim2.new(1,-K.AbsoluteSize.X,1,-K.AbsoluteSize.Y)end K.Parent=z local O=Instance.new("\073\109\097\103\101\076\097\098\101\108")O.Selectable=false O.Size=UDim2.new(.8,0,.8,0)O.Position=UDim2.new(.2,0,.2,0)O.BackgroundTransparency=1 O.Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\054\049\056\056\048\055\052\051"O.Parent=K local function M()local u=z while u and not u:IsA("\083\099\114\101\101\110\071\117\105")do u=u.Parent end return u end local H=3 local U=M()if U.AbsoluteSize.X<=640 then H=1 elseif U.AbsoluteSize.X<=1024 then H=2 end local V=false local function c()if V then return end V=true if not z:IsDescendantOf(n)then return end local u=M()local v=s.MinimumWindowSize local o=s.MaximumWindowSize local t=v.X.Scale*u.AbsoluteSize.X+v.X.Offset local J=math.max(v.Y.Scale*u.AbsoluteSize.Y+v.Y.Offset,Y.AbsoluteSize.Y+y.AbsoluteSize.Y)local K=o.X.Scale*u.AbsoluteSize.X+o.X.Offset local O=o.Y.Scale*u.AbsoluteSize.Y+o.Y.Offset local H=z.AbsoluteSize.X local U=z.AbsoluteSize.Y if H<t then z.Size=z.Size+UDim2.new(0,t-H,0,0)elseif K<H then z.Size=z.Size+UDim2.new(0,K-H,0,0)end if U<J then z.Size=z.Size+UDim2.new(0,0,0,J-U)elseif O<U then z.Size=z.Size+UDim2.new(0,0,0,O-U)end z.Size=UDim2.new(z.AbsoluteSize.X/u.AbsoluteSize.X,0,z.AbsoluteSize.Y/u.AbsoluteSize.Y,0)V=false end z.Changed:connect(function(u)if u=="\065\098\115\111\108\117\116\101\083\105\122\101"then c()end end)K.DragBegin:connect(function(u)z.Draggable=false end)K.DragStopped:connect(function(u,v)z.Draggable=s.WindowDraggable end)local f=false local function X(u)if s.WindowDraggable==false and s.WindowResizable==false then return end local v=(u-z.AbsolutePosition)+K.AbsoluteSize z.Size=UDim2.new(0,v.X,0,v.Y)if bubbleChatOnly()then K.Position=UDim2.new(1,-K.AbsoluteSize.X,0,0)return end K.Position=UDim2.new(1,-K.AbsoluteSize.X,1,-K.AbsoluteSize.Y)end K.Changed:connect(function(u)if u=="\065\098\115\111\108\117\116\101\080\111\115\105\116\105\111\110"and not z.Draggable then if f then return end f=true X(K.AbsolutePosition)f=false end end)local function W(u)if H==1 then u=u or s.ChatBarTextSizePhone else u=u or s.ChatBarTextSize end return(u+14)+10 end if bubbleChatOnly()then y.Position=UDim2.new(0,0,0,0)Y.Visible=false Y.Active=false J.Visible=false J.Active=false local u=M()if H==1 then local u=s.DefaultWindowSizePhone.X.Scale local v=s.DefaultWindowSizePhone.X.Offset elseif H==2 then v34=s.DefaultWindowSizeTablet.X.Scale v35=s.DefaultWindowSizeTablet.X.Offset else v34=s.DefaultWindowSizeDesktop.X.Scale v35=s.DefaultWindowSizeDesktop.X.Offset end z.Size=UDim2.new(v34,v35,0,W())z.Position=s.DefaultWindowPosition else local u=M()if H==1 then z.Size=s.DefaultWindowSizePhone elseif H==2 then z.Size=s.DefaultWindowSizeTablet else z.Size=s.DefaultWindowSizeDesktop end z.Position=s.DefaultWindowPosition end if H==1 then s.ChatWindowTextSize=s.ChatWindowTextSizePhone s.ChatChannelsTabTextSize=s.ChatChannelsTabTextSizePhone s.ChatBarTextSize=s.ChatBarTextSizePhone end local function Q(u)z.Active=u z.Draggable=u end local function C(u)if H==1 then u=u or s.ChatChannelsTabTextSizePhone else u=u or s.ChatChannelsTabTextSize end return math.max(32,u+8)+2 end local function l()local u=nil local v=C()u=W()if not s.ShowChannelsBar then J.Size=UDim2.new(1,0,1,-((u+2)+2))J.Position=UDim2.new(0,0,0,2)return end J.Size=UDim2.new(1,0,1,-(((v+u)+2)+2))J.Position=UDim2.new(0,0,0,v+2)end local function a(u)Y.Size=UDim2.new(1,0,0,C(u))l()end local function D(u)local v=nil K.Visible=u K.Draggable=u v=y.Size.Y.Offset if u then y.Size=UDim2.new(1,-v-2,0,v)if bubbleChatOnly()then return end else y.Size=UDim2.new(1,0,0,v)if not bubbleChatOnly()then y.Position=UDim2.new(0,0,1,-v)end return end y.Position=UDim2.new(0,0,1,-v)end local function p(u)local v=W(u)y.Size=UDim2.new(1,0,0,v)if not bubbleChatOnly()then y.Position=UDim2.new(0,0,1,-v)end K.Size=UDim2.new(0,v,0,v)K.Position=UDim2.new(1,-v,1,-v)l()D(s.WindowResizable)end local function m(u)Y.Visible=u l()end a(s.ChatChannelsTabTextSize)p(s.ChatBarTextSize)Q(s.WindowDraggable)D(s.WindowResizable)m(s.ShowChannelsBar)s.SettingsChanged:connect(function(u,v)if u=="\087\105\110\100\111\119\068\114\097\103\103\097\098\108\101"then Q(v)return end if u=="\087\105\110\100\111\119\082\101\115\105\122\097\098\108\101"then D(v)return end if u=="\067\104\097\116\067\104\097\110\110\101\108\115\084\097\098\084\101\120\116\083\105\122\101"then a(v)return end if u=="\067\104\097\116\066\097\114\084\101\120\116\083\105\122\101"then p(v)return end if u=="\083\104\111\119\067\104\097\110\110\101\108\115\066\097\114"then m(v)end end)u.GuiObject=z u.GuiObjects.BaseFrame=z u.GuiObjects.ChatBarParentFrame=y u.GuiObjects.ChannelsBarParentFrame=Y u.GuiObjects.ChatChannelParentFrame=J u.GuiObjects.ChatResizerFrame=K u.GuiObjects.ResizeIcon=O u:AnimGuiObjects()end function y.GetChatBar(u)return u.ChatBar end function y.RegisterChatBar(u,v)u.ChatBar=v u.ChatBar:CreateGuiObjects(u.GuiObjects.ChatBarParentFrame)end function y.RegisterChannelsBar(u,v)u.ChannelsBar=v u.ChannelsBar:CreateGuiObjects(u.GuiObjects.ChannelsBarParentFrame)end function y.RegisterMessageLogDisplay(u,v)u.MessageLogDisplay=v u.MessageLogDisplay.GuiObject.Parent=u.GuiObjects.ChatChannelParentFrame end local Y=require(z:WaitForChild("\067\104\097\116\067\104\097\110\110\101\108"))function y.AddChannel(u,v)if u:GetChannel(v)then error("\067\104\097\110\110\101\108 \'"..(v.."\' \097\108\114\101\097\100\121 \101\120\105\115\116\115\033"))return end local o=Y.new(v,u.MessageLogDisplay)u.Channels[v:lower()]=o o:SetActive(false)local t=u.ChannelsBar:AddChannelTab(v)t.NameTag.MouseButton1Click:connect(function()u:SwitchCurrentChannel(v)end)o:RegisterChannelTab(t)return o end function y.GetFirstChannel(u)local v,o,t=pairs(u.Channels)local z,y=v(o,t)if not z then return nil end return y end function y.RemoveChannel(u,v)if not u:GetChannel(v)then error("\067\104\097\110\110\101\108 \'"..(v.."\' \100\111\101\115 \110\111\116 \101\120\105\115\116\033"))end local o=v:lower()local t=false if u.Channels[o]==u:GetCurrentChannel()then t=true u:SwitchCurrentChannel(nil)end u.Channels[o]:Destroy()u.Channels[o]=nil u.ChannelsBar:RemoveChannelTab(v)if t then if u:GetChannel(s.GeneralChannelName)~=nil and o~=s.GeneralChannelName:lower()then local u=s.GeneralChannelName else local v=u:GetFirstChannel()v54=v and v.Name or nil end u:SwitchCurrentChannel(v54)end if not s.ShowChannelsBar and u.ChatBar.TargetChannel==v then u.ChatBar:SetChannelTarget(s.GeneralChannelName)end end function y.GetChannel(u,v)return v and u.Channels[v:lower()]or nil end function y.GetTargetMessageChannel(u)if not s.ShowChannelsBar then return u.ChatBar.TargetChannel end local v=u:GetCurrentChannel()return v and v.Name end function y.GetCurrentChannel(u)return u.CurrentChannel end function y.SwitchCurrentChannel(u,v)if not s.ShowChannelsBar then local o=u:GetChannel(v)if o then u.ChatBar:SetChannelTarget(o.Name)end v=s.GeneralChannelName end local o=u:GetCurrentChannel()local t=u:GetChannel(v)if t==nil then error(string.format("\067\104\097\110\110\101\108 \'\037\115\' \100\111\101\115 \110\111\116 \101\120\105\115\116\046",v))end if t~=o then if o then o:SetActive(false);(u.ChannelsBar:GetChannelTab(o.Name)):SetActive(false)end if t then t:SetActive(true);(u.ChannelsBar:GetChannelTab(t.Name)):SetActive(true)end u.CurrentChannel=t end end function y.UpdateFrameVisibility(u)u.GuiObject.Visible=u.Visible and u.CoreGuiEnabled end function y.GetVisible(u)return u.Visible end function y.SetVisible(u,v)u.Visible=v u:UpdateFrameVisibility()end function y.GetCoreGuiEnabled(u)return u.CoreGuiEnabled end function y.SetCoreGuiEnabled(u,v)u.CoreGuiEnabled=v u:UpdateFrameVisibility()end function y.EnableResizable(u)u.GuiObjects.ChatResizerFrame.Active=true end function y.DisableResizable(u)u.GuiObjects.ChatResizerFrame.Active=false end local J=require(z:WaitForChild("\067\117\114\118\101\085\116\105\108"))function y.FadeOutBackground(u,v)u.ChannelsBar:FadeOutBackground(v)u.MessageLogDisplay:FadeOutBackground(v)u.ChatBar:FadeOutBackground(v)u.AnimParams.Background_TargetTransparency=1 u.AnimParams.Background_NormalizedExptValue=J:NormalizedDefaultExptValueInSeconds(v)end function y.FadeInBackground(u,v)u.ChannelsBar:FadeInBackground(v)u.MessageLogDisplay:FadeInBackground(v)u.ChatBar:FadeInBackground(v)u.AnimParams.Background_TargetTransparency=.6 u.AnimParams.Background_NormalizedExptValue=J:NormalizedDefaultExptValueInSeconds(v)end function y.FadeOutText(u,v)u.MessageLogDisplay:FadeOutText(v)u.ChannelsBar:FadeOutText(v)end function y.FadeInText(u,v)u.MessageLogDisplay:FadeInText(v)u.ChannelsBar:FadeInText(v)end function y.AnimGuiObjects(u)u.GuiObjects.ChatChannelParentFrame.BackgroundTransparency=u.AnimParams.Background_CurrentTransparency u.GuiObjects.ChatResizerFrame.BackgroundTransparency=u.AnimParams.Background_CurrentTransparency u.GuiObjects.ResizeIcon.ImageTransparency=u.AnimParams.Background_CurrentTransparency end function y.InitializeAnimParams(u)u.AnimParams.Background_TargetTransparency=.6 u.AnimParams.Background_CurrentTransparency=.6 u.AnimParams.Background_NormalizedExptValue=J:NormalizedDefaultExptValueInSeconds(0)end function y.Update(u,v)u.ChatBar:Update(v)u.ChannelsBar:Update(v)u.MessageLogDisplay:Update(v)u.AnimParams.Background_CurrentTransparency=J:Expt(u.AnimParams.Background_CurrentTransparency,u.AnimParams.Background_TargetTransparency,u.AnimParams.Background_NormalizedExptValue,v)u:AnimGuiObjects()end function u.new()local u=setmetatable({},y)u.GuiObject=nil u.GuiObjects={}u.ChatBar=nil u.ChannelsBar=nil u.MessageLogDisplay=nil u.Channels={}u.CurrentChannel=nil u.Visible=true u.CoreGuiEnabled=true u.AnimParams={}u:InitializeAnimParams()return u end return u


local v1 = {};
local l__Players__2 = game:GetService("Players");
local l__Chat__3 = game:GetService("Chat");
local l__Chat__4 = game:GetService("Chat");
local l__Parent__5 = script.Parent;
local v6 = {};
v6.__index = v6;
local u1 = require(l__Chat__4:WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"));
function getClassicChatEnabled()
	if u1.ClassicChatEnabled ~= nil then
		return u1.ClassicChatEnabled;
	end;
	return l__Players__2.ClassicChat;
end;
function getBubbleChatEnabled()
	if u1.BubbleChatEnabled ~= nil then
		return u1.BubbleChatEnabled;
	end;
	return l__Players__2.BubbleChat;
end;
function bubbleChatOnly()
	return not getClassicChatEnabled() and getBubbleChatEnabled();
end;
function mergeProps(p1, p2)
	if p1 then
		if not p2 then
			return;
		end;
	else
		return;
	end;
	local v7, v8, v9 = pairs(p1);
	while true do
		local v10, v11 = v7(v8, v9);
		if v10 then

		else
			break;
		end;
		v9 = v10;
		if p2[v10] ~= nil then
			p2[v10] = v11;
		end;	
	end;
end;
local l__PlayerGui__2 = l__Players__2.LocalPlayer:WaitForChild("PlayerGui");
function v6.CreateGuiObjects(p3, p4)
	local u3 = nil;
	pcall(function()
		u3 = l__Chat__4:InvokeChatCallback(Enum.ChatCallbackType.OnCreatingChatWindow, nil);
	end);
	mergeProps(u3, u1);
	local v12 = Instance.new("Frame");
	v12.BackgroundTransparency = 1;
	v12.Active = u1.WindowDraggable;
	v12.Parent = p4;
	v12.AutoLocalize = false;
	local v13 = Instance.new("Frame");
	v13.Selectable = false;
	v13.Name = "ChatBarParentFrame";
	v13.BackgroundTransparency = 1;
	v13.Parent = v12;
	local v14 = Instance.new("Frame");
	v14.Selectable = false;
	v14.Name = "ChannelsBarParentFrame";
	v14.BackgroundTransparency = 1;
	v14.Position = UDim2.new(0, 0, 0, 0);
	v14.Parent = v12;
	local v15 = Instance.new("Frame");
	v15.Selectable = false;
	v15.Name = "ChatChannelParentFrame";
	v15.BackgroundTransparency = 1;
	v15.BackgroundColor3 = u1.BackGroundColor;
	v15.BackgroundTransparency = 0.6;
	v15.BorderSizePixel = 0;
	v15.Parent = v12;
	local v16 = Instance.new("ImageButton");
	v16.Selectable = false;
	v16.Image = "";
	v16.BackgroundTransparency = 0.6;
	v16.BorderSizePixel = 0;
	v16.Visible = false;
	v16.BackgroundColor3 = u1.BackGroundColor;
	v16.Active = true;
	if bubbleChatOnly() then
		v16.Position = UDim2.new(1, -v16.AbsoluteSize.X, 0, 0);
	else
		v16.Position = UDim2.new(1, -v16.AbsoluteSize.X, 1, -v16.AbsoluteSize.Y);
	end;
	v16.Parent = v12;
	local v17 = Instance.new("ImageLabel");
	v17.Selectable = false;
	v17.Size = UDim2.new(0.8, 0, 0.8, 0);
	v17.Position = UDim2.new(0.2, 0, 0.2, 0);
	v17.BackgroundTransparency = 1;
	v17.Image = "rbxassetid://261880743";
	v17.Parent = v16;
	local function v18()
		local v19 = v12;
		while v19 and not v19:IsA("ScreenGui") do
			v19 = v19.Parent;		
		end;
		return v19;
	end;
	local v20 = 3;
	local v21 = v18();
	if v21.AbsoluteSize.X <= 640 then
		v20 = 1;
	elseif v21.AbsoluteSize.X <= 1024 then
		v20 = 2;
	end;
	local u4 = false;
	local function u5()
		if u4 then
			return;
		end;
		u4 = true;
		if not v12:IsDescendantOf(l__PlayerGui__2) then
			return;
		end;
		local v22 = v18();
		local l__MinimumWindowSize__23 = u1.MinimumWindowSize;
		local l__MaximumWindowSize__24 = u1.MaximumWindowSize;
		local v25 = l__MinimumWindowSize__23.X.Scale * v22.AbsoluteSize.X + l__MinimumWindowSize__23.X.Offset;
		local v26 = math.max(l__MinimumWindowSize__23.Y.Scale * v22.AbsoluteSize.Y + l__MinimumWindowSize__23.Y.Offset, v14.AbsoluteSize.Y + v13.AbsoluteSize.Y);
		local v27 = l__MaximumWindowSize__24.X.Scale * v22.AbsoluteSize.X + l__MaximumWindowSize__24.X.Offset;
		local v28 = l__MaximumWindowSize__24.Y.Scale * v22.AbsoluteSize.Y + l__MaximumWindowSize__24.Y.Offset;
		local l__X__29 = v12.AbsoluteSize.X;
		local l__Y__30 = v12.AbsoluteSize.Y;
		if l__X__29 < v25 then
			v12.Size = v12.Size + UDim2.new(0, v25 - l__X__29, 0, 0);
		elseif v27 < l__X__29 then
			v12.Size = v12.Size + UDim2.new(0, v27 - l__X__29, 0, 0);
		end;
		if l__Y__30 < v26 then
			v12.Size = v12.Size + UDim2.new(0, 0, 0, v26 - l__Y__30);
		elseif v28 < l__Y__30 then
			v12.Size = v12.Size + UDim2.new(0, 0, 0, v28 - l__Y__30);
		end;
		v12.Size = UDim2.new(v12.AbsoluteSize.X / v22.AbsoluteSize.X, 0, v12.AbsoluteSize.Y / v22.AbsoluteSize.Y, 0);
		u4 = false;
	end;
	v12.Changed:connect(function(p5)
		if p5 == "AbsoluteSize" then
			u5();
		end;
	end);
	v16.DragBegin:connect(function(p6)
		v12.Draggable = false;
	end);
	v16.DragStopped:connect(function(p7, p8)
		v12.Draggable = u1.WindowDraggable;
	end);
	local u6 = false;
	local function u7(p9)
		if u1.WindowDraggable == false and u1.WindowResizable == false then
			return;
		end;
		local v31 = p9 - v12.AbsolutePosition + v16.AbsoluteSize;
		v12.Size = UDim2.new(0, v31.X, 0, v31.Y);
		if bubbleChatOnly() then
			v16.Position = UDim2.new(1, -v16.AbsoluteSize.X, 0, 0);
			return;
		end;
		v16.Position = UDim2.new(1, -v16.AbsoluteSize.X, 1, -v16.AbsoluteSize.Y);
	end;
	v16.Changed:connect(function(p10)
		if p10 == "AbsolutePosition" and not v12.Draggable then
			if u6 then
				return;
			end;
			u6 = true;
			u7(v16.AbsolutePosition);
			u6 = false;
		end;
	end);
	local function v32(p11)
		if v20 == 1 then
			p11 = p11 or u1.ChatBarTextSizePhone;
		else
			p11 = p11 or u1.ChatBarTextSize;
		end;
		return p11 + 14 + 10;
	end;
	if bubbleChatOnly() then
		v13.Position = UDim2.new(0, 0, 0, 0);
		v14.Visible = false;
		v14.Active = false;
		v15.Visible = false;
		v15.Active = false;
		local v33 = v18();
		if v20 == 1 then
			local v34 = u1.DefaultWindowSizePhone.X.Scale;
			local v35 = u1.DefaultWindowSizePhone.X.Offset;
		elseif v20 == 2 then
			v34 = u1.DefaultWindowSizeTablet.X.Scale;
			v35 = u1.DefaultWindowSizeTablet.X.Offset;
		else
			v34 = u1.DefaultWindowSizeDesktop.X.Scale;
			v35 = u1.DefaultWindowSizeDesktop.X.Offset;
		end;
		v12.Size = UDim2.new(v34, v35, 0, (v32()));
		v12.Position = u1.DefaultWindowPosition;
	else
		local v36 = v18();
		if v20 == 1 then
			v12.Size = u1.DefaultWindowSizePhone;
		elseif v20 == 2 then
			v12.Size = u1.DefaultWindowSizeTablet;
		else
			v12.Size = u1.DefaultWindowSizeDesktop;
		end;
		v12.Position = u1.DefaultWindowPosition;
	end;
	if v20 == 1 then
		u1.ChatWindowTextSize = u1.ChatWindowTextSizePhone;
		u1.ChatChannelsTabTextSize = u1.ChatChannelsTabTextSizePhone;
		u1.ChatBarTextSize = u1.ChatBarTextSizePhone;
	end;
	local function v37(p12)
		v12.Active = p12;
		v12.Draggable = p12;
	end;
	local function u8(p13)
		if v20 == 1 then
			p13 = p13 or u1.ChatChannelsTabTextSizePhone;
		else
			p13 = p13 or u1.ChatChannelsTabTextSize;
		end;
		return math.max(32, p13 + 8) + 2;
	end;
	local function u9()
		local v38 = nil;
		local v39 = u8();
		v38 = v32();
		if not u1.ShowChannelsBar then
			v15.Size = UDim2.new(1, 0, 1, -(v38 + 2 + 2));
			v15.Position = UDim2.new(0, 0, 0, 2);
			return;
		end;
		v15.Size = UDim2.new(1, 0, 1, -(v39 + v38 + 2 + 2));
		v15.Position = UDim2.new(0, 0, 0, v39 + 2);
	end;
	local function v40(p14)
		v14.Size = UDim2.new(1, 0, 0, (u8(p14)));
		u9();
	end;
	local function u10(p15)
		local v41 = nil;
		v16.Visible = p15;
		v16.Draggable = p15;
		v41 = v13.Size.Y.Offset;
		if p15 then
			v13.Size = UDim2.new(1, -v41 - 2, 0, v41);
			if bubbleChatOnly() then
				return;
			end;
		else
			v13.Size = UDim2.new(1, 0, 0, v41);
			if not bubbleChatOnly() then
				v13.Position = UDim2.new(0, 0, 1, -v41);
			end;
			return;
		end;
		v13.Position = UDim2.new(0, 0, 1, -v41);
	end;
	local function v42(p16)
		local v43 = v32(p16);
		v13.Size = UDim2.new(1, 0, 0, v43);
		if not bubbleChatOnly() then
			v13.Position = UDim2.new(0, 0, 1, -v43);
		end;
		v16.Size = UDim2.new(0, v43, 0, v43);
		v16.Position = UDim2.new(1, -v43, 1, -v43);
		u9();
		u10(u1.WindowResizable);
	end;
	local function v44(p17)
		v14.Visible = p17;
		u9();
	end;
	v40(u1.ChatChannelsTabTextSize);
	v42(u1.ChatBarTextSize);
	v37(u1.WindowDraggable);
	u10(u1.WindowResizable);
	v44(u1.ShowChannelsBar);
	u1.SettingsChanged:connect(function(p18, p19)
		if p18 == "WindowDraggable" then
			v37(p19);
			return;
		end;
		if p18 == "WindowResizable" then
			u10(p19);
			return;
		end;
		if p18 == "ChatChannelsTabTextSize" then
			v40(p19);
			return;
		end;
		if p18 == "ChatBarTextSize" then
			v42(p19);
			return;
		end;
		if p18 == "ShowChannelsBar" then
			v44(p19);
		end;
	end);
	p3.GuiObject = v12;
	p3.GuiObjects.BaseFrame = v12;
	p3.GuiObjects.ChatBarParentFrame = v13;
	p3.GuiObjects.ChannelsBarParentFrame = v14;
	p3.GuiObjects.ChatChannelParentFrame = v15;
	p3.GuiObjects.ChatResizerFrame = v16;
	p3.GuiObjects.ResizeIcon = v17;
	p3:AnimGuiObjects();
end;
function v6.GetChatBar(p20)
	return p20.ChatBar;
end;
function v6.RegisterChatBar(p21, p22)
	p21.ChatBar = p22;
	p21.ChatBar:CreateGuiObjects(p21.GuiObjects.ChatBarParentFrame);
end;
function v6.RegisterChannelsBar(p23, p24)
	p23.ChannelsBar = p24;
	p23.ChannelsBar:CreateGuiObjects(p23.GuiObjects.ChannelsBarParentFrame);
end;
function v6.RegisterMessageLogDisplay(p25, p26)
	p25.MessageLogDisplay = p26;
	p25.MessageLogDisplay.GuiObject.Parent = p25.GuiObjects.ChatChannelParentFrame;
end;
local u11 = require(l__Parent__5:WaitForChild("ChatChannel"));
function v6.AddChannel(p27, p28)
	if p27:GetChannel(p28) then
		error("Channel '" .. p28 .. "' already exists!");
		return;
	end;
	local v45 = u11.new(p28, p27.MessageLogDisplay);
	p27.Channels[p28:lower()] = v45;
	v45:SetActive(false);
	local v46 = p27.ChannelsBar:AddChannelTab(p28);
	v46.NameTag.MouseButton1Click:connect(function()
		p27:SwitchCurrentChannel(p28);
	end);
	v45:RegisterChannelTab(v46);
	return v45;
end;
function v6.GetFirstChannel(p29)
	local v47, v48, v49 = pairs(p29.Channels);
	local v50, v51 = v47(v48, v49);
	if not v50 then
		return nil;
	end;
	return v51;
end;
function v6.RemoveChannel(p30, p31)
	if not p30:GetChannel(p31) then
		error("Channel '" .. p31 .. "' does not exist!");
	end;
	local v52 = p31:lower();
	local v53 = false;
	if p30.Channels[v52] == p30:GetCurrentChannel() then
		v53 = true;
		p30:SwitchCurrentChannel(nil);
	end;
	p30.Channels[v52]:Destroy();
	p30.Channels[v52] = nil;
	p30.ChannelsBar:RemoveChannelTab(p31);
	if v53 then
		if p30:GetChannel(u1.GeneralChannelName) ~= nil and v52 ~= u1.GeneralChannelName:lower() then
			local v54 = u1.GeneralChannelName;
		else
			local v55 = p30:GetFirstChannel();
			v54 = v55 and v55.Name or nil;
		end;
		p30:SwitchCurrentChannel(v54);
	end;
	if not u1.ShowChannelsBar and p30.ChatBar.TargetChannel == p31 then
		p30.ChatBar:SetChannelTarget(u1.GeneralChannelName);
	end;
end;
function v6.GetChannel(p32, p33)
	return p33 and p32.Channels[p33:lower()] or nil;
end;
function v6.GetTargetMessageChannel(p34)
	if not u1.ShowChannelsBar then
		return p34.ChatBar.TargetChannel;
	end;
	local v56 = p34:GetCurrentChannel();
	return v56 and v56.Name;
end;
function v6.GetCurrentChannel(p35)
	return p35.CurrentChannel;
end;
function v6.SwitchCurrentChannel(p36, p37)
	if not u1.ShowChannelsBar then
		local v57 = p36:GetChannel(p37);
		if v57 then
			p36.ChatBar:SetChannelTarget(v57.Name);
		end;
		p37 = u1.GeneralChannelName;
	end;
	local v58 = p36:GetCurrentChannel();
	local v59 = p36:GetChannel(p37);
	if v59 == nil then
		error(string.format("Channel '%s' does not exist.", p37));
	end;
	if v59 ~= v58 then
		if v58 then
			v58:SetActive(false);
			p36.ChannelsBar:GetChannelTab(v58.Name):SetActive(false);
		end;
		if v59 then
			v59:SetActive(true);
			p36.ChannelsBar:GetChannelTab(v59.Name):SetActive(true);
		end;
		p36.CurrentChannel = v59;
	end;
end;
function v6.UpdateFrameVisibility(p38)
	p38.GuiObject.Visible = p38.Visible and p38.CoreGuiEnabled;
end;
function v6.GetVisible(p39)
	return p39.Visible;
end;
function v6.SetVisible(p40, p41)
	p40.Visible = p41;
	p40:UpdateFrameVisibility();
end;
function v6.GetCoreGuiEnabled(p42)
	return p42.CoreGuiEnabled;
end;
function v6.SetCoreGuiEnabled(p43, p44)
	p43.CoreGuiEnabled = p44;
	p43:UpdateFrameVisibility();
end;
function v6.EnableResizable(p45)
	p45.GuiObjects.ChatResizerFrame.Active = true;
end;
function v6.DisableResizable(p46)
	p46.GuiObjects.ChatResizerFrame.Active = false;
end;
local u12 = require(l__Parent__5:WaitForChild("CurveUtil"));
function v6.FadeOutBackground(p47, p48)
	p47.ChannelsBar:FadeOutBackground(p48);
	p47.MessageLogDisplay:FadeOutBackground(p48);
	p47.ChatBar:FadeOutBackground(p48);
	p47.AnimParams.Background_TargetTransparency = 1;
	p47.AnimParams.Background_NormalizedExptValue = u12:NormalizedDefaultExptValueInSeconds(p48);
end;
function v6.FadeInBackground(p49, p50)
	p49.ChannelsBar:FadeInBackground(p50);
	p49.MessageLogDisplay:FadeInBackground(p50);
	p49.ChatBar:FadeInBackground(p50);
	p49.AnimParams.Background_TargetTransparency = 0.6;
	p49.AnimParams.Background_NormalizedExptValue = u12:NormalizedDefaultExptValueInSeconds(p50);
end;
function v6.FadeOutText(p51, p52)
	p51.MessageLogDisplay:FadeOutText(p52);
	p51.ChannelsBar:FadeOutText(p52);
end;
function v6.FadeInText(p53, p54)
	p53.MessageLogDisplay:FadeInText(p54);
	p53.ChannelsBar:FadeInText(p54);
end;
function v6.AnimGuiObjects(p55)
	p55.GuiObjects.ChatChannelParentFrame.BackgroundTransparency = p55.AnimParams.Background_CurrentTransparency;
	p55.GuiObjects.ChatResizerFrame.BackgroundTransparency = p55.AnimParams.Background_CurrentTransparency;
	p55.GuiObjects.ResizeIcon.ImageTransparency = p55.AnimParams.Background_CurrentTransparency;
end;
function v6.InitializeAnimParams(p56)
	p56.AnimParams.Background_TargetTransparency = 0.6;
	p56.AnimParams.Background_CurrentTransparency = 0.6;
	p56.AnimParams.Background_NormalizedExptValue = u12:NormalizedDefaultExptValueInSeconds(0);
end;
function v6.Update(p57, p58)
	p57.ChatBar:Update(p58);
	p57.ChannelsBar:Update(p58);
	p57.MessageLogDisplay:Update(p58);
	p57.AnimParams.Background_CurrentTransparency = u12:Expt(p57.AnimParams.Background_CurrentTransparency, p57.AnimParams.Background_TargetTransparency, p57.AnimParams.Background_NormalizedExptValue, p58);
	p57:AnimGuiObjects();
end;
function v1.new()
	local v60 = setmetatable({}, v6);
	v60.GuiObject = nil;
	v60.GuiObjects = {};
	v60.ChatBar = nil;
	v60.ChannelsBar = nil;
	v60.MessageLogDisplay = nil;
	v60.Channels = {};
	v60.CurrentChannel = nil;
	v60.Visible = true;
	v60.CoreGuiEnabled = true;
	v60.AnimParams = {};
	v60:InitializeAnimParams();
	return v60;
end;
return v1;
