--[[VARIABLE DEFINITION ANOMALY DETECTED, DECOMPILATION OUTPUT POTENTIALLY INCORRECT]]--
-- Decompiled with the Synapse X Luau decompiler.

local v1 = false;
local v2, v3 = pcall(function()
	return UserSettings():IsUserFeatureEnabled("UserHandleChatHotKeyWithContextActionService");
end);
if v2 then
	v1 = v3;
end;
local l__RunService__4 = game:GetService("RunService");
local l__ReplicatedStorage__5 = game:GetService("ReplicatedStorage");
local l__Chat__6 = game:GetService("Chat");
local l__StarterGui__7 = game:GetService("StarterGui");
local l__ContextActionService__8 = game:GetService("ContextActionService");
local v9 = l__ReplicatedStorage__5:WaitForChild("DefaultChatSystemChatEvents");
local v10 = l__ReplicatedStorage__5:WaitForChild("DefaultChatSystemChatEvents");
local l__ClientChatModules__11 = l__Chat__6:WaitForChild("ClientChatModules");
local v12 = require(l__ClientChatModules__11:WaitForChild("ChatConstants"));
local v13 = require(l__ClientChatModules__11:WaitForChild("ChatSettings"));
local v14 = require(l__ClientChatModules__11:WaitForChild("MessageCreatorModules"):WaitForChild("Util"));
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 v15 = Instance.new("BindableEvent");
local u2 = {
	OnNewMessage = "RemoteEvent", 
	OnMessageDoneFiltering = "RemoteEvent", 
	OnNewSystemMessage = "RemoteEvent", 
	OnChannelJoined = "RemoteEvent", 
	OnChannelLeft = "RemoteEvent", 
	OnMuted = "RemoteEvent", 
	OnUnmuted = "RemoteEvent", 
	OnMainChannelSet = "RemoteEvent", 
	SayMessageRequest = "RemoteEvent", 
	GetInitDataRequest = "RemoteFunction"
};
local u3 = {};
local u4 = 10;
function TryRemoveChildWithVerifyingIsCorrectType(p4)
	if u2[p4.Name] then
		if p4:IsA(u2[p4.Name]) then
			u2[p4.Name] = nil;
			u3[p4.Name] = p4;
			u4 = u4 - 1;
		end;
	end;
end;
for v16, v17 in pairs(v10:GetChildren()) do
	TryRemoveChildWithVerifyingIsCorrectType(v17);
end;
if u4 > 0 then
	local v18 = v10.ChildAdded:connect(function(p5)
		TryRemoveChildWithVerifyingIsCorrectType(p5);
		if u4 < 1 then
			v15:Fire();
		end;
	end);
	v15.Event:wait();
	v18:disconnect();
	v15:Destroy();
end;
local l__UserInputService__19 = game:GetService("UserInputService");
local l__RunService__20 = game:GetService("RunService");
local l__Players__21 = game:GetService("Players");
local v22 = l__Players__21.LocalPlayer;
while not v22 do
	l__Players__21.ChildAdded:wait();
	v22 = l__Players__21.LocalPlayer;
end;
local v23 = 6;
if v13.ScreenGuiDisplayOrder ~= nil then
	v23 = v13.ScreenGuiDisplayOrder;
end;
local v24 = Instance.new("ScreenGui");
v24.Name = "Chat";
v24.ResetOnSpawn = false;
v24.DisplayOrder = v23;
v24.Parent = v22:WaitForChild("PlayerGui");
local v25 = require(script:WaitForChild("MessageLabelCreator"));
local v26 = require(script:WaitForChild("MessageLogDisplay"));
local v27 = require(script:WaitForChild("ChatChannel"));
local v28 = require(script:WaitForChild("ChatWindow")).new();
local v29 = require(script:WaitForChild("ChannelsBar")).new();
local v30 = v26.new();
local v31 = require(script:WaitForChild("CommandProcessor")).new();
local v32 = require(script:WaitForChild("ChatBar")).new(v31, v28);
v28:CreateGuiObjects(v24);
v28:RegisterChatBar(v32);
v28:RegisterChannelsBar(v29);
v28:RegisterMessageLogDisplay(v30);
v14:RegisterChatWindow(v28);
local v33 = require(script:WaitForChild("MessageSender"));
v33:RegisterSayMessageFunction(u3.SayMessageRequest);
if l__UserInputService__19.TouchEnabled then
	v32:SetTextLabelText(u1:Get("GameChat_ChatMain_ChatBarTextTouch", "Tap here to chat"));
else
	v32:SetTextLabelText(u1:Get("GameChat_ChatMain_ChatBarText", "To chat click here or press \"/\" key"));
end;
local l__script__5 = script;
spawn(function()
	local v34 = require(l__script__5:WaitForChild("CurveUtil"));
	local v35 = 1 / (v13.ChatAnimationFPS and 20);
	local v36 = tick();
	while true do
		local v37 = tick();
		local v38 = v34:DeltaTimeToTimescale(v37 - v36);
		if v38 ~= 0 then
			v28:Update(v38);
		end;
		v36 = v37;
		wait(v35);	
	end;
end);
function CheckIfPointIsInSquare(p6, p7, p8)
	local v39 = false;
	if p7.X <= p6.X then
		v39 = false;
		if p6.X <= p8.X then
			v39 = false;
			if p7.Y <= p6.Y then
				v39 = p6.Y <= p8.Y;
			end;
		end;
	end;
	return v39;
end;
local u6 = 0;
local u7 = false;
local u8 = Instance.new("BindableEvent");
function DoBackgroundFadeIn(p9)
	u6 = tick();
	u7 = false;
	u8:Fire();
	v28:FadeInBackground(p9 or v13.ChatDefaultFadeDuration);
	if v28:GetCurrentChannel() then
		local l__Scroller__40 = v30.Scroller;
		l__Scroller__40.ScrollingEnabled = true;
		l__Scroller__40.ScrollBarThickness = v26.ScrollBarThickness;
	end;
end;
function DoBackgroundFadeOut(p10)
	u6 = tick();
	u7 = true;
	u8:Fire();
	v28:FadeOutBackground(p10 or v13.ChatDefaultFadeDuration);
	if v28:GetCurrentChannel() then
		local l__Scroller__41 = v30.Scroller;
		l__Scroller__41.ScrollingEnabled = false;
		l__Scroller__41.ScrollBarThickness = 0;
	end;
end;
local u9 = 0;
local u10 = false;
function DoTextFadeIn(p11)
	u9 = tick();
	u10 = false;
	u8:Fire();
	v28:FadeInText((p11 or v13.ChatDefaultFadeDuration) * 0);
end;
function DoTextFadeOut(p12)
	u9 = tick();
	u10 = true;
	u8:Fire();
	v28:FadeOutText(p12 or v13.ChatDefaultFadeDuration);
end;
function DoFadeInFromNewInformation()
	DoTextFadeIn();
	if v13.ChatShouldFadeInFromNewInformation then
		DoBackgroundFadeIn();
	end;
end;
function InstantFadeIn()
	DoBackgroundFadeIn(0);
	DoTextFadeIn(0);
end;
function InstantFadeOut()
	DoBackgroundFadeOut(0);
	DoTextFadeOut(0);
end;
local u11 = nil;
local u12 = Instance.new("BindableEvent");
function UpdateFadingForMouseState(p13)
	u11 = p13;
	u12:Fire();
	if v32:IsFocused() then
		return;
	end;
	if p13 then

	else
		DoBackgroundFadeIn();
		return;
	end;
	DoBackgroundFadeIn();
	DoTextFadeIn();
end;
local u13 = Instance.new("BindableEvent");
spawn(function()
	while true do
		l__RunService__20.RenderStepped:wait();
		while not (not u11) or not (not v32:IsFocused()) do
			if u11 then
				u12.Event:wait();
			end;
			if v32:IsFocused() then
				u13.Event:wait();
			end;		
		end;
		if not u7 then
			if v13.ChatWindowBackgroundFadeOutTime < tick() - u6 then
				DoBackgroundFadeOut();
			end;
		elseif not u10 then
			if v13.ChatWindowTextFadeOutTime < tick() - u9 then
				DoTextFadeOut();
			end;
		else
			u8.Event:wait();
		end;	
	end;
end);
function getClassicChatEnabled()
	if v13.ClassicChatEnabled ~= nil then
		return v13.ClassicChatEnabled;
	end;
	return l__Players__21.ClassicChat;
end;
function getBubbleChatEnabled()
	if v13.BubbleChatEnabled ~= nil then
		return v13.BubbleChatEnabled;
	end;
	return l__Players__21.BubbleChat;
end;
function bubbleChatOnly()
	return not getClassicChatEnabled() and getBubbleChatEnabled();
end;
local u14 = {};
function UpdateMousePosition(p14)
	if u14.Visible then
		if u14.IsCoreGuiEnabled then
			if not u14.TopbarEnabled then
				if not v13.ChatOnWithTopBarOff then
					return;
				end;
			end;
		else
			return;
		end;
	else
		return;
	end;
	if bubbleChatOnly() then
		return;
	end;
	local l__AbsolutePosition__42 = v28.GuiObject.AbsolutePosition;
	local v43 = CheckIfPointIsInSquare(p14, l__AbsolutePosition__42, l__AbsolutePosition__42 + v28.GuiObject.AbsoluteSize);
	if v43 ~= u11 then
		UpdateFadingForMouseState(v43);
	end;
end;
l__UserInputService__19.InputChanged:connect(function(p15, p16)
	if p15.UserInputType == Enum.UserInputType.MouseMovement then
		UpdateMousePosition((Vector2.new(p15.Position.X, p15.Position.Y)));
	end;
end);
l__UserInputService__19.TouchTap:connect(function(p17, p18)
	UpdateMousePosition(p17[1]);
end);
l__UserInputService__19.TouchMoved:connect(function(p19, p20)
	UpdateMousePosition((Vector2.new(p19.Position.X, p19.Position.Y)));
end);
l__UserInputService__19.Changed:connect(function(p21)
	if p21 == "MouseBehavior" and l__UserInputService__19.MouseBehavior == Enum.MouseBehavior.LockCenter then
		local l__AbsolutePosition__44 = v28.GuiObject.AbsolutePosition;
		if CheckIfPointIsInSquare(v24.AbsoluteSize / 2, l__AbsolutePosition__44, l__AbsolutePosition__44 + v28.GuiObject.AbsoluteSize) then
			l__UserInputService__19.MouseBehavior = Enum.MouseBehavior.Default;
		end;
	end;
end);
UpdateFadingForMouseState(true);
UpdateFadingForMouseState(false);
local v45 = {
	Signal = function()
		local v46 = {};
		local u15 = nil;
		local u16 = nil;
		local u17 = Instance.new("BindableEvent");
		function v46.fire(p22, ...)
			u15 = { ... };
			u16 = select("#", ...);
			u17:Fire();
		end;
		function v46.connect(p23, p24)
			if not p24 then
				error("connect(nil)", 2);
			end;
			return u17.Event:connect(function()
				p24(unpack(u15, 1, u16));
			end);
		end;
		function v46.wait(p25)
			u17.Event:wait();
			assert(u15, "Missing arg data, likely due to :TweenSize/Position corrupting threadrefs.");
			return unpack(u15, 1, u16);
		end;
		return v46;
	end
};
function SetVisibility(p26)
	v28:SetVisible(p26);
	u14.VisibilityStateChanged:fire(p26);
	u14.Visible = p26;
	if u14.IsCoreGuiEnabled then
		if p26 then

		else
			InstantFadeOut();
			return;
		end;
	else
		return;
	end;
	InstantFadeIn();
end;
u14.TopbarEnabled = true;
u14.MessageCount = 0;
u14.Visible = true;
u14.IsCoreGuiEnabled = true;
function u14.ToggleVisibility(p27)
	SetVisibility(not v28:GetVisible());
end;
function u14.SetVisible(p28, p29)
	if v28:GetVisible() ~= p29 then
		SetVisibility(p29);
	end;
end;
function u14.FocusChatBar(p30)
	v32:CaptureFocus();
end;
function u14.EnterWhisperState(p31, p32)
	v32:EnterWhisperState(p32);
end;
function u14.GetVisibility(p33)
	return v28:GetVisible();
end;
function u14.GetMessageCount(p34)
	return p34.MessageCount;
end;
function u14.TopbarEnabledChanged(p35, p36)
	p35.TopbarEnabled = p36;
	p35.CoreGuiEnabled:fire(game:GetService("StarterGui"):GetCoreGuiEnabled(Enum.CoreGuiType.Chat));
end;
function u14.IsFocused(p37, p38)
	return v32:IsFocused();
end;
u14.ChatBarFocusChanged = v45.Signal();
u14.VisibilityStateChanged = v45.Signal();
u14.MessagesChanged = v45.Signal();
u14.MessagePosted = v45.Signal();
u14.CoreGuiEnabled = v45.Signal();
u14.ChatMakeSystemMessageEvent = v45.Signal();
u14.ChatWindowPositionEvent = v45.Signal();
u14.ChatWindowSizeEvent = v45.Signal();
u14.ChatBarDisabledEvent = v45.Signal();
function u14.fChatWindowPosition(p39)
	return v28.GuiObject.Position;
end;
function u14.fChatWindowSize(p40)
	return v28.GuiObject.Size;
end;
function u14.fChatBarDisabled(p41)
	return not v32:GetEnabled();
end;
if v1 then
	local u18 = true;
	l__ContextActionService__8:BindAction("ToggleChat", function(p42, p43, p44)
		if p42 == "ToggleChat" and p43 == Enum.UserInputState.Begin and u18 and p44.UserInputType == Enum.UserInputType.Keyboard then
			DoChatBarFocus();
		end;
	end, true, Enum.KeyCode.Slash);
else
	local u19 = true;
	function u14.SpecialKeyPressed(p45, p46, p47)
		if p46 == Enum.SpecialKey.ChatHotkey and u19 then
			DoChatBarFocus();
		end;
	end;
end;
u14.CoreGuiEnabled:connect(function(p48)
	u14.IsCoreGuiEnabled = p48;
	p48 = p48 and (u14.TopbarEnabled or v13.ChatOnWithTopBarOff);
	v28:SetCoreGuiEnabled(p48);
	if p48 then
		InstantFadeIn();
		return;
	end;
	v32:ReleaseFocus();
	InstantFadeOut();
end);
function trimTrailingSpaces(p49)
	local v47 = #p49;
	while true do
		if 0 < v47 then

		else
			break;
		end;
		if p49:find("^%s", v47) then

		else
			break;
		end;
		v47 = v47 - 1;	
	end;
	return p49:sub(1, v47);
end;
local u20 = false;
u14.ChatMakeSystemMessageEvent:connect(function(p50)
	if p50.Text and type(p50.Text) == "string" then
		while not u20 do
			wait();		
		end;
		local l__GeneralChannelName__48 = v13.GeneralChannelName;
		local v49 = v28:GetChannel(l__GeneralChannelName__48);
		if v49 then
			v49:AddMessageToChannel({
				ID = -1, 
				FromSpeaker = nil, 
				SpeakerUserId = 0, 
				OriginalChannel = l__GeneralChannelName__48, 
				IsFiltered = true, 
				MessageLength = string.len(p50.Text), 
				MessageLengthUtf8 = utf8.len(utf8.nfcnormalize(p50.Text)), 
				Message = trimTrailingSpaces(p50.Text), 
				MessageType = v12.MessageTypeSetCore, 
				Time = os.time(), 
				ExtraData = p50
			});
			v29:UpdateMessagePostedInChannel(l__GeneralChannelName__48);
			u14.MessageCount = u14.MessageCount + 1;
			u14.MessagesChanged:fire(u14.MessageCount);
		end;
	end;
end);
u14.ChatBarDisabledEvent:connect(function(p51)
	if u19 then
		v32:SetEnabled(not p51);
		if p51 then
			v32:ReleaseFocus();
		end;
	end;
end);
u14.ChatWindowSizeEvent:connect(function(p52)
	v28.GuiObject.Size = p52;
end);
u14.ChatWindowPositionEvent:connect(function(p53)
	v28.GuiObject.Position = p53;
end);
function DoChatBarFocus()
	if not v28:GetCoreGuiEnabled() then
		return;
	end;
	if not v32:GetEnabled() then
		return;
	end;
	if not v32:IsFocused() then
		if v32:GetVisible() then
			u14:SetVisible(true);
			InstantFadeIn();
			v32:CaptureFocus();
			u14.ChatBarFocusChanged:fire(true);
		end;
	end;
end;
u13.Event:connect(function(p54)
	u14.ChatBarFocusChanged:fire(p54);
end);
function DoSwitchCurrentChannel(p55)
	if v28:GetChannel(p55) then
		v28:SwitchCurrentChannel(p55);
	end;
end;
function SendMessageToSelfInTargetChannel(p56, p57, p58)
	local v50 = v28:GetChannel(p57);
	if v50 then
		v50:AddMessageToChannel({
			ID = -1, 
			FromSpeaker = nil, 
			SpeakerUserId = 0, 
			OriginalChannel = p57, 
			IsFiltered = true, 
			MessageLength = string.len(p56), 
			MessageLengthUtf8 = utf8.len(utf8.nfcnormalize(p56)), 
			Message = trimTrailingSpaces(p56), 
			MessageType = v12.MessageTypeSystem, 
			Time = os.time(), 
			ExtraData = p58
		});
	end;
end;
function chatBarFocused()
	if not u11 then
		DoBackgroundFadeIn();
		if u10 then
			DoTextFadeIn();
		end;
	end;
	u13:Fire(true);
end;
function chatBarFocusLost(p59, p60)
	DoBackgroundFadeIn();
	u13:Fire(false);
	if p59 then
		local v51 = v32:GetTextBox().Text;
		if v32:IsInCustomState() then
			local v52 = v32:GetCustomMessage();
			if v52 then
				v51 = v52;
			end;
			local v53 = v32:CustomStateProcessCompletedMessage(v51);
			v32:ResetCustomState();
			if v53 then
				return;
			end;
		end;
		v32:GetTextBox().Text = "";
		if v51 ~= "" then
			u14.MessagePosted:fire(v51);
			if not v31:ProcessCompletedChatMessage(v51, v28) then
				local v54 = nil;
				if v13.DisallowedWhiteSpace then
					local v55 = #v13.DisallowedWhiteSpace;
					local v56 = 1 - 1;
					while true do
						if v13.DisallowedWhiteSpace[v56] == "\t" then
							v51 = string.gsub(v51, v13.DisallowedWhiteSpace[v56], " ");
						else
							v51 = string.gsub(v51, v13.DisallowedWhiteSpace[v56], "");
						end;
						if 0 <= 1 then
							if v56 < v55 then

							else
								break;
							end;
						elseif v55 < v56 then

						else
							break;
						end;
						v56 = v56 + 1;					
					end;
				end;
				v54 = string.gsub(string.gsub(v51, "\n", ""), "[ ]+", " ");
				local v57 = v28:GetTargetMessageChannel();
				if v57 then
					v33:SendMessage(v54, v57);
					return;
				end;
				v33:SendMessage(v54, nil);
			end;
		end;
	end;
end;
local u21 = {};
function setupChatBarConnections()
	local v58 = #u21;
	local v59 = 1 - 1;
	while true do
		u21[v59]:Disconnect();
		if 0 <= 1 then
			if v59 < v58 then

			else
				break;
			end;
		elseif v58 < v59 then

		else
			break;
		end;
		v59 = v59 + 1;	
	end;
	u21 = {};
	table.insert(u21, (v32:GetTextBox().FocusLost:connect(chatBarFocusLost)));
	table.insert(u21, (v32:GetTextBox().Focused:connect(chatBarFocused)));
end;
setupChatBarConnections();
v32.GuiObjectsChanged:connect(setupChatBarConnections);
function getEchoMessagesInGeneral()
	if v13.EchoMessagesInGeneralChannel == nil then
		return true;
	end;
	return v13.EchoMessagesInGeneralChannel;
end;
u3.OnMessageDoneFiltering.OnClientEvent:connect(function(p61)
	if not v13.ShowUserOwnFilteredMessage and p61.FromSpeaker == v22.Name then
		return;
	end;
	local l__OriginalChannel__60 = p61.OriginalChannel;
	local v61 = v28:GetChannel(l__OriginalChannel__60);
	if v61 then
		v61:UpdateMessageFiltered(p61);
	end;
	if getEchoMessagesInGeneral() and v13.GeneralChannelName and l__OriginalChannel__60 ~= v13.GeneralChannelName then
		local v62 = v28:GetChannel(v13.GeneralChannelName);
		if v62 then
			v62:UpdateMessageFiltered(p61);
		end;
	end;
end);
u3.OnNewMessage.OnClientEvent:connect(function(p62, p63)
	local v63 = v28:GetChannel(p63);
	if v63 then
		v63:AddMessageToChannel(p62);
		if p62.FromSpeaker ~= v22.Name then
			v29:UpdateMessagePostedInChannel(p63);
		end;
		if getEchoMessagesInGeneral() and v13.GeneralChannelName and p63 ~= v13.GeneralChannelName then
			local v64 = v28:GetChannel(v13.GeneralChannelName);
			if v64 then
				v64:AddMessageToChannel(p62);
			end;
		end;
		u14.MessageCount = u14.MessageCount + 1;
		u14.MessagesChanged:fire(u14.MessageCount);
		DoFadeInFromNewInformation();
	end;
end);
u3.OnNewSystemMessage.OnClientEvent:connect(function(p64, p65)
	p65 = p65 and "System";
	local v65 = v28:GetChannel(p65);
	if v65 then
		v65:AddMessageToChannel(p64);
		v29:UpdateMessagePostedInChannel(p65);
		u14.MessageCount = u14.MessageCount + 1;
		u14.MessagesChanged:fire(u14.MessageCount);
		DoFadeInFromNewInformation();
		if getEchoMessagesInGeneral() and v13.GeneralChannelName and p65 ~= v13.GeneralChannelName then
			local v66 = v28:GetChannel(v13.GeneralChannelName);
			if v66 then
				v66:AddMessageToChannel(p64);
				return;
			end;
		end;
	else
		warn(string.format("Just received system message for channel I'm not in [%s]", p65));
	end;
end);
function HandleChannelJoined(p66, p67, p68, p69, p70, p71)
	if v28:GetChannel(p66) then
		v28:RemoveChannel(p66);
	end;
	if p66 == v13.GeneralChannelName then
		u20 = true;
	end;
	if p69 then
		v32:SetChannelNameColor(p66, p69);
	end;
	local v67 = v28:AddChannel(p66);
	if v67 then
		if p66 == v13.GeneralChannelName then
			DoSwitchCurrentChannel(p66);
		end;
		if p68 then
			local v68 = 1;
			if v13.MessageHistoryLengthPerChannel < #p68 then
				v68 = #p68 - v13.MessageHistoryLengthPerChannel;
			end;
			local v69 = #p68;
			local v70 = v68 - 1;
			while true do
				v67:AddMessageToChannel(p68[v70]);
				if 0 <= 1 then
					if v70 < v69 then

					else
						break;
					end;
				elseif v69 < v70 then

				else
					break;
				end;
				v70 = v70 + 1;			
			end;
			if getEchoMessagesInGeneral() then
				if p70 then
					if v13.GeneralChannelName then
						if p66 ~= v13.GeneralChannelName then
							local v71 = v28:GetChannel(v13.GeneralChannelName);
							if v71 then
								v71:AddMessagesToChannelByTimeStamp(p68, v68);
							end;
						end;
					end;
				end;
			end;
		end;
		if p67 ~= "" then
			local v72 = {
				ID = -1, 
				FromSpeaker = nil, 
				SpeakerUserId = 0, 
				OriginalChannel = p66, 
				IsFiltered = true, 
				MessageLength = string.len(p67), 
				MessageLengthUtf8 = utf8.len(utf8.nfcnormalize(p67)), 
				Message = trimTrailingSpaces(p67), 
				MessageType = v12.MessageTypeWelcome, 
				Time = os.time(), 
				ExtraData = nil
			};
			v67:AddMessageToChannel(v72);
			if getEchoMessagesInGeneral() then
				if p71 then
					if not v13.ShowChannelsBar then
						if p66 ~= v13.GeneralChannelName then
							local v73 = v28:GetChannel(v13.GeneralChannelName);
							if v73 then
								v73:AddMessageToChannel(v72);
							end;
						end;
					end;
				end;
			end;
		end;
		DoFadeInFromNewInformation();
	end;
end;
u3.OnChannelJoined.OnClientEvent:connect(function(p72, p73, p74, p75)
	HandleChannelJoined(p72, p73, p74, p75, false, true);
end);
u3.OnChannelLeft.OnClientEvent:connect(function(p76)
	v28:RemoveChannel(p76);
	DoFadeInFromNewInformation();
end);
u3.OnMuted.OnClientEvent:connect(function(p77)

end);
u3.OnUnmuted.OnClientEvent:connect(function(p78)

end);
u3.OnMainChannelSet.OnClientEvent:connect(function(p79)
	DoSwitchCurrentChannel(p79);
end);
coroutine.wrap(function()
	local l__ChannelNameColorUpdated__74 = v9:WaitForChild("ChannelNameColorUpdated", 5);
	if l__ChannelNameColorUpdated__74 then
		l__ChannelNameColorUpdated__74.OnClientEvent:connect(function(p80, p81)
			v32:SetChannelNameColor(p80, p81);
		end);
	end;
end)();
local u22 = nil;
local u23 = nil;
local u24 = nil;
local u25 = nil;
pcall(function()
	u22 = l__StarterGui__7:GetCore("PlayerBlockedEvent");
	u23 = l__StarterGui__7:GetCore("PlayerMutedEvent");
	u24 = l__StarterGui__7:GetCore("PlayerUnblockedEvent");
	u25 = l__StarterGui__7:GetCore("PlayerUnmutedEvent");
end);
function SendSystemMessageToSelf(p82)
	local v75 = v28:GetCurrentChannel();
	if v75 then
		v75:AddMessageToChannel({
			ID = -1, 
			FromSpeaker = nil, 
			SpeakerUserId = 0, 
			OriginalChannel = v75.Name, 
			IsFiltered = true, 
			MessageLength = string.len(p82), 
			MessageLengthUtf8 = utf8.len(utf8.nfcnormalize(p82)), 
			Message = trimTrailingSpaces(p82), 
			MessageType = v12.MessageTypeSystem, 
			Time = os.time(), 
			ExtraData = nil
		});
	end;
end;
function MutePlayer(p83)
	local l__MutePlayerRequest__76 = v9:FindFirstChild("MutePlayerRequest");
	if l__MutePlayerRequest__76 then

	else
		return false;
	end;
	return l__MutePlayerRequest__76:InvokeServer(p83.Name);
end;
if u22 then
	u22.Event:connect(function(p84)
		if MutePlayer(p84) then
			if v13.PlayerDisplayNamesEnabled then
				local v77 = p84.DisplayName;
			else
				v77 = p84.Name;
			end;
			SendSystemMessageToSelf(u1:Get("GameChat_ChatMain_SpeakerHasBeenBlocked", string.format("Speaker '%s' has been blocked.", v77), {
				RBX_NAME = v77
			}));
		end;
	end);
end;
if u23 then
	u23.Event:connect(function(p85)
		if MutePlayer(p85) then
			if v13.PlayerDisplayNamesEnabled then
				local v78 = p85.DisplayName;
			else
				v78 = p85.Name;
			end;
			SendSystemMessageToSelf(u1:Get("GameChat_ChatMain_SpeakerHasBeenMuted", string.format("Speaker '%s' has been muted.", v78), {
				RBX_NAME = v78
			}));
		end;
	end);
end;
function UnmutePlayer(p86)
	local l__UnMutePlayerRequest__79 = v9:FindFirstChild("UnMutePlayerRequest");
	if l__UnMutePlayerRequest__79 then

	else
		return false;
	end;
	return l__UnMutePlayerRequest__79:InvokeServer(p86.Name);
end;
if u24 then
	u24.Event:connect(function(p87)
		if UnmutePlayer(p87) then
			if v13.PlayerDisplayNamesEnabled then
				local v80 = p87.DisplayName;
			else
				v80 = p87.Name;
			end;
			SendSystemMessageToSelf(u1:Get("GameChat_ChatMain_SpeakerHasBeenUnBlocked", string.format("Speaker '%s' has been unblocked.", v80), {
				RBX_NAME = v80
			}));
		end;
	end);
end;
if u25 then
	u25.Event:connect(function(p88)
		if UnmutePlayer(p88) then
			if v13.PlayerDisplayNamesEnabled then
				local v81 = p88.DisplayName;
			else
				v81 = p88.Name;
			end;
			SendSystemMessageToSelf(u1:Get("GameChat_ChatMain_SpeakerHasBeenUnMuted", string.format("Speaker '%s' has been unmuted.", v81), {
				RBX_NAME = v81
			}));
		end;
	end);
end;
spawn(function()
	if v22.UserId > 0 then
		pcall(function()
			local v82 = l__StarterGui__7:GetCore("GetBlockedUserIds");
			if #v82 > 0 then
				local l__SetBlockedUserIdsRequest__83 = v9:FindFirstChild("SetBlockedUserIdsRequest");
				if l__SetBlockedUserIdsRequest__83 then
					l__SetBlockedUserIdsRequest__83:FireServer(v82);
				end;
			end;
		end);
	end;
end);
spawn(function()
	local v84, v85 = pcall(function()
		return l__Chat__6:CanUserChatAsync(v22.UserId);
	end);
	if v84 then
		u19 = l__RunService__20:IsStudio() and v85;
	end;
end);
local v86 = u3.GetInitDataRequest:InvokeServer();
for v87, v88 in pairs(v86.Channels) do
	if v88[1] == v13.GeneralChannelName then
		HandleChannelJoined(v88[1], v88[2], v88[3], v88[4], true, false);
	end;
end;
for v89, v90 in pairs(v86.Channels) do
	if v90[1] ~= v13.GeneralChannelName then
		HandleChannelJoined(v90[1], v90[2], v90[3], v90[4], true, false);
	end;
end;
return u14;