-- Decompiled with the Synapse X Luau decompiler.


local l__RunService__1 = game:GetService("RunService");
local l__ReplicatedStorage__2 = game:GetService("ReplicatedStorage");
local l__Chat__3 = game:GetService("Chat");
local l__StarterGui__4 = game:GetService("StarterGui");
local v5 = l__ReplicatedStorage__2:WaitForChild("DefaultChatSystemChatEvents");
local v6 = l__ReplicatedStorage__2:WaitForChild("DefaultChatSystemChatEvents");
local l__ClientChatModules__7 = l__Chat__3:WaitForChild("ClientChatModules");
local v8 = require(l__ClientChatModules__7:WaitForChild("ChatConstants"));
local v9 = require(l__ClientChatModules__7:WaitForChild("ChatSettings"));
local v10 = require(l__ClientChatModules__7: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 v11 = 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 v12, v13 in pairs(v6:GetChildren()) do
	TryRemoveChildWithVerifyingIsCorrectType(v13);
end;
if u4 > 0 then
	local v14 = v6.ChildAdded:connect(function(p5)
		TryRemoveChildWithVerifyingIsCorrectType(p5);
		if u4 < 1 then
			v11:Fire();
		end;
	end);
	v11.Event:wait();
	v14:disconnect();
	v11:Destroy();
end;
local l__UserInputService__15 = game:GetService("UserInputService");
local l__RunService__16 = game:GetService("RunService");
local l__Players__17 = game:GetService("Players");
local v18 = l__Players__17.LocalPlayer;
while not v18 do
	l__Players__17.ChildAdded:wait();
	v18 = l__Players__17.LocalPlayer;
end;
local v19 = 6;
if v9.ScreenGuiDisplayOrder ~= nil then
	v19 = v9.ScreenGuiDisplayOrder;
end;
local v20 = Instance.new("ScreenGui");
v20.Name = "Chat";
v20.ResetOnSpawn = false;
v20.DisplayOrder = v19;
v20.Parent = v18:WaitForChild("PlayerGui");
local v21 = require(script:WaitForChild("MessageLabelCreator"));
local v22 = require(script:WaitForChild("MessageLogDisplay"));
local v23 = require(script:WaitForChild("ChatChannel"));
local v24 = require(script:WaitForChild("ChatWindow")).new();
local v25 = require(script:WaitForChild("ChannelsBar")).new();
local v26 = v22.new();
local v27 = require(script:WaitForChild("CommandProcessor")).new();
local v28 = require(script:WaitForChild("ChatBar")).new(v27, v24);
v24:CreateGuiObjects(v20);
v24:RegisterChatBar(v28);
v24:RegisterChannelsBar(v25);
v24:RegisterMessageLogDisplay(v26);
v10:RegisterChatWindow(v24);
local v29 = require(script:WaitForChild("MessageSender"));
v29:RegisterSayMessageFunction(u3.SayMessageRequest);
if l__UserInputService__15.TouchEnabled then
	v28:SetTextLabelText(u1:Get("GameChat_ChatMain_ChatBarText", "Tap here to chat"));
else
	v28:SetTextLabelText(u1:Get("GameChat_ChatMain_ChatBarTextTouch", "To chat click here or press \"/\" key"));
end;
local l__script__5 = script;
spawn(function()
	local v30 = require(l__script__5:WaitForChild("CurveUtil"));
	local v31 = 1 / (v9.ChatAnimationFPS and 20);
	local v32 = tick();
	while true do
		local v33 = tick();
		local v34 = v30:DeltaTimeToTimescale(v33 - v32);
		if v34 ~= 0 then
			v24:Update(v34);
		end;
		v32 = v33;
		wait(v31);	
	end;
end);
function CheckIfPointIsInSquare(p6, p7, p8)
	local v35 = false;
	if p7.X <= p6.X then
		v35 = false;
		if p6.X <= p8.X then
			v35 = false;
			if p7.Y <= p6.Y then
				v35 = p6.Y <= p8.Y;
			end;
		end;
	end;
	return v35;
end;
local u6 = 0;
local u7 = false;
local u8 = Instance.new("BindableEvent");
function DoBackgroundFadeIn(p9)
	u6 = tick();
	u7 = false;
	u8:Fire();
	v24:FadeInBackground(p9 or v9.ChatDefaultFadeDuration);
	if v24:GetCurrentChannel() then
		local l__Scroller__36 = v26.Scroller;
		l__Scroller__36.ScrollingEnabled = true;
		l__Scroller__36.ScrollBarThickness = v22.ScrollBarThickness;
	end;
end;
function DoBackgroundFadeOut(p10)
	u6 = tick();
	u7 = true;
	u8:Fire();
	v24:FadeOutBackground(p10 or v9.ChatDefaultFadeDuration);
	if v24:GetCurrentChannel() then
		local l__Scroller__37 = v26.Scroller;
		l__Scroller__37.ScrollingEnabled = false;
		l__Scroller__37.ScrollBarThickness = 0;
	end;
end;
local u9 = 0;
local u10 = false;
function DoTextFadeIn(p11)
	u9 = tick();
	u10 = false;
	u8:Fire();
	v24:FadeInText((p11 or v9.ChatDefaultFadeDuration) * 0);
end;
function DoTextFadeOut(p12)
	u9 = tick();
	u10 = true;
	u8:Fire();
	v24:FadeOutText(p12 or v9.ChatDefaultFadeDuration);
end;
function DoFadeInFromNewInformation()
	DoTextFadeIn();
	if v9.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 v28: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__16.RenderStepped:wait();
		while not (not u11) or not (not v28:IsFocused()) do
			if u11 then
				u12.Event:wait();
			end;
			if v28:IsFocused() then
				u13.Event:wait();
			end;		
		end;
		if not u7 then
			if v9.ChatWindowBackgroundFadeOutTime < tick() - u6 then
				DoBackgroundFadeOut();
			end;
		elseif not u10 then
			if v9.ChatWindowTextFadeOutTime < tick() - u9 then
				DoTextFadeOut();
			end;
		else
			u8.Event:wait();
		end;	
	end;
end);
function getClassicChatEnabled()
	if v9.ClassicChatEnabled ~= nil then
		return v9.ClassicChatEnabled;
	end;
	return l__Players__17.ClassicChat;
end;
function getBubbleChatEnabled()
	if v9.BubbleChatEnabled ~= nil then
		return v9.BubbleChatEnabled;
	end;
	return l__Players__17.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 v9.ChatOnWithTopBarOff then
					return;
				end;
			end;
		else
			return;
		end;
	else
		return;
	end;
	if bubbleChatOnly() then
		return;
	end;
	local l__AbsolutePosition__38 = v24.GuiObject.AbsolutePosition;
	local v39 = CheckIfPointIsInSquare(p14, l__AbsolutePosition__38, l__AbsolutePosition__38 + v24.GuiObject.AbsoluteSize);
	if v39 ~= u11 then
		UpdateFadingForMouseState(v39);
	end;
end;
l__UserInputService__15.InputChanged:connect(function(p15)
	if p15.UserInputType == Enum.UserInputType.MouseMovement then
		UpdateMousePosition((Vector2.new(p15.Position.X, p15.Position.Y)));
	end;
end);
l__UserInputService__15.TouchTap:connect(function(p16, p17)
	UpdateMousePosition(p16[1]);
end);
l__UserInputService__15.TouchMoved:connect(function(p18, p19)
	UpdateMousePosition((Vector2.new(p18.Position.X, p18.Position.Y)));
end);
l__UserInputService__15.Changed:connect(function(p20)
	if p20 == "MouseBehavior" and l__UserInputService__15.MouseBehavior == Enum.MouseBehavior.LockCenter then
		local l__AbsolutePosition__40 = v24.GuiObject.AbsolutePosition;
		if CheckIfPointIsInSquare(v20.AbsoluteSize / 2, l__AbsolutePosition__40, l__AbsolutePosition__40 + v24.GuiObject.AbsoluteSize) then
			l__UserInputService__15.MouseBehavior = Enum.MouseBehavior.Default;
		end;
	end;
end);
UpdateFadingForMouseState(true);
UpdateFadingForMouseState(false);
local v41 = {
	Signal = function()
		local v42 = {};
		local u15 = nil;
		local u16 = nil;
		local u17 = Instance.new("BindableEvent");
		function v42.fire(p21, ...)
			u15 = { ... };
			u16 = select("#", ...);
			u17:Fire();
		end;
		function v42.connect(p22, p23)
			if not p23 then
				error("connect(nil)", 2);
			end;
			return u17.Event:connect(function()
				p23(unpack(u15, 1, u16));
			end);
		end;
		function v42.wait(p24)
			u17.Event:wait();
			assert(u15, "Missing arg data, likely due to :TweenSize/Position corrupting threadrefs.");
			return unpack(u15, 1, u16);
		end;
		return v42;
	end
};
function SetVisibility(p25)
	v24:SetVisible(p25);
	u14.VisibilityStateChanged:fire(p25);
	u14.Visible = p25;
	if u14.IsCoreGuiEnabled then
		if p25 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(p26)
	SetVisibility(not v24:GetVisible());
end;
function u14.SetVisible(p27, p28)
	if v24:GetVisible() ~= p28 then
		SetVisibility(p28);
	end;
end;
function u14.FocusChatBar(p29)
	v28:CaptureFocus();
end;
function u14.GetVisibility(p30)
	return v24:GetVisible();
end;
function u14.GetMessageCount(p31)
	return p31.MessageCount;
end;
function u14.TopbarEnabledChanged(p32, p33)
	p32.TopbarEnabled = p33;
	p32.CoreGuiEnabled:fire(game:GetService("StarterGui"):GetCoreGuiEnabled(Enum.CoreGuiType.Chat));
end;
function u14.IsFocused(p34, p35)
	return v28:IsFocused();
end;
u14.ChatBarFocusChanged = v41.Signal();
u14.VisibilityStateChanged = v41.Signal();
u14.MessagesChanged = v41.Signal();
u14.MessagePosted = v41.Signal();
u14.CoreGuiEnabled = v41.Signal();
u14.ChatMakeSystemMessageEvent = v41.Signal();
u14.ChatWindowPositionEvent = v41.Signal();
u14.ChatWindowSizeEvent = v41.Signal();
u14.ChatBarDisabledEvent = v41.Signal();
function u14.fChatWindowPosition(p36)
	return v24.GuiObject.Position;
end;
function u14.fChatWindowSize(p37)
	return v24.GuiObject.Size;
end;
function u14.fChatBarDisabled(p38)
	return not v28:GetEnabled();
end;
local u18 = true;
function u14.SpecialKeyPressed(p39, p40, p41)
	if p40 == Enum.SpecialKey.ChatHotkey and u18 then
		DoChatBarFocus();
	end;
end;
u14.CoreGuiEnabled:connect(function(p42)
	u14.IsCoreGuiEnabled = p42;
	p42 = p42 and (u14.TopbarEnabled or v9.ChatOnWithTopBarOff);
	v24:SetCoreGuiEnabled(p42);
	if p42 then
		InstantFadeIn();
		return;
	end;
	v28:ReleaseFocus();
	InstantFadeOut();
end);
function trimTrailingSpaces(p43)
	local v43 = #p43;
	while true do
		if 0 < v43 then

		else
			break;
		end;
		if p43:find("^%s", v43) then

		else
			break;
		end;
		v43 = v43 - 1;	
	end;
	return p43:sub(1, v43);
end;
local u19 = false;
u14.ChatMakeSystemMessageEvent:connect(function(p44)
	if p44.Text and type(p44.Text) == "string" then
		while not u19 do
			wait();		
		end;
		local l__GeneralChannelName__44 = v9.GeneralChannelName;
		local v45 = v24:GetChannel(l__GeneralChannelName__44);
		if v45 then
			v45:AddMessageToChannel({
				ID = -1, 
				FromSpeaker = nil, 
				SpeakerUserId = 0, 
				OriginalChannel = l__GeneralChannelName__44, 
				IsFiltered = true, 
				MessageLength = string.len(p44.Text), 
				Message = trimTrailingSpaces(p44.Text), 
				MessageType = v8.MessageTypeSetCore, 
				Time = os.time(), 
				ExtraData = p44
			});
			v25:UpdateMessagePostedInChannel(l__GeneralChannelName__44);
			u14.MessageCount = u14.MessageCount + 1;
			u14.MessagesChanged:fire(u14.MessageCount);
		end;
	end;
end);
u14.ChatBarDisabledEvent:connect(function(p45)
	if u18 then
		v28:SetEnabled(not p45);
		if p45 then
			v28:ReleaseFocus();
		end;
	end;
end);
u14.ChatWindowSizeEvent:connect(function(p46)
	v24.GuiObject.Size = p46;
end);
u14.ChatWindowPositionEvent:connect(function(p47)
	v24.GuiObject.Position = p47;
end);
function DoChatBarFocus()
	if not v24:GetCoreGuiEnabled() then
		return;
	end;
	if not v28:GetEnabled() then
		return;
	end;
	if not v28:IsFocused() then
		if v28:GetVisible() then
			u14:SetVisible(true);
			InstantFadeIn();
			v28:CaptureFocus();
			u14.ChatBarFocusChanged:fire(true);
		end;
	end;
end;
u13.Event:connect(function(p48)
	u14.ChatBarFocusChanged:fire(p48);
end);
function DoSwitchCurrentChannel(p49)
	if v24:GetChannel(p49) then
		v24:SwitchCurrentChannel(p49);
	end;
end;
function SendMessageToSelfInTargetChannel(p50, p51, p52)
	local v46 = v24:GetChannel(p51);
	if v46 then
		v46:AddMessageToChannel({
			ID = -1, 
			FromSpeaker = nil, 
			SpeakerUserId = 0, 
			OriginalChannel = p51, 
			IsFiltered = true, 
			MessageLength = string.len(p50), 
			Message = trimTrailingSpaces(p50), 
			MessageType = v8.MessageTypeSystem, 
			Time = os.time(), 
			ExtraData = p52
		});
	end;
end;
function chatBarFocused()
	if not u11 then
		DoBackgroundFadeIn();
		if u10 then
			DoTextFadeIn();
		end;
	end;
	u13:Fire(true);
end;
function chatBarFocusLost(p53, p54)
	DoBackgroundFadeIn();
	u13:Fire(false);
	if p53 then
		local v47 = v28:GetTextBox().Text;
		if v28:IsInCustomState() then
			local v48 = v28:GetCustomMessage();
			if v48 then
				v47 = v48;
			end;
			local v49 = v28:CustomStateProcessCompletedMessage(v47);
			v28:ResetCustomState();
			if v49 then
				return;
			end;
		end;
		local v50 = string.sub(v47, 1, v9.MaximumMessageLength);
		v28:GetTextBox().Text = "";
		if v50 ~= "" then
			u14.MessagePosted:fire(v50);
			if not v27:ProcessCompletedChatMessage(v50, v24) then
				local v51 = nil;
				if v9.DisallowedWhiteSpace then
					local v52 = #v9.DisallowedWhiteSpace;
					local v53 = 1 - 1;
					while true do
						if v9.DisallowedWhiteSpace[v53] == "\t" then
							v50 = string.gsub(v50, v9.DisallowedWhiteSpace[v53], " ");
						else
							v50 = string.gsub(v50, v9.DisallowedWhiteSpace[v53], "");
						end;
						if 0 <= 1 then
							if v53 < v52 then

							else
								break;
							end;
						elseif v52 < v53 then

						else
							break;
						end;
						v53 = v53 + 1;					
					end;
				end;
				v51 = string.gsub(string.gsub(v50, "\n", ""), "[ ]+", " ");
				local v54 = v24:GetTargetMessageChannel();
				if v54 then
					v29:SendMessage(v51, v54);
					return;
				end;
				v29:SendMessage(v51, nil);
			end;
		end;
	end;
end;
local u20 = {};
function setupChatBarConnections()
	local v55 = #u20;
	local v56 = 1 - 1;
	while true do
		u20[v56]:Disconnect();
		if 0 <= 1 then
			if v56 < v55 then

			else
				break;
			end;
		elseif v55 < v56 then

		else
			break;
		end;
		v56 = v56 + 1;	
	end;
	u20 = {};
	table.insert(u20, (v28:GetTextBox().FocusLost:connect(chatBarFocusLost)));
	table.insert(u20, (v28:GetTextBox().Focused:connect(chatBarFocused)));
end;
setupChatBarConnections();
v28.GuiObjectsChanged:connect(setupChatBarConnections);
function getEchoMessagesInGeneral()
	if v9.EchoMessagesInGeneralChannel == nil then
		return true;
	end;
	return v9.EchoMessagesInGeneralChannel;
end;
u3.OnMessageDoneFiltering.OnClientEvent:connect(function(p55)
	if not v9.ShowUserOwnFilteredMessage and p55.FromSpeaker == v18.Name then
		return;
	end;
	local l__OriginalChannel__57 = p55.OriginalChannel;
	local v58 = v24:GetChannel(l__OriginalChannel__57);
	if v58 then
		v58:UpdateMessageFiltered(p55);
	end;
	if getEchoMessagesInGeneral() and v9.GeneralChannelName and l__OriginalChannel__57 ~= v9.GeneralChannelName then
		local v59 = v24:GetChannel(v9.GeneralChannelName);
		if v59 then
			v59:UpdateMessageFiltered(p55);
		end;
	end;
end);
u3.OnNewMessage.OnClientEvent:connect(function(p56, p57)
	local v60 = v24:GetChannel(p57);
	if v60 then
		v60:AddMessageToChannel(p56);
		if p56.FromSpeaker ~= v18.Name then
			v25:UpdateMessagePostedInChannel(p57);
		end;
		if getEchoMessagesInGeneral() and v9.GeneralChannelName and p57 ~= v9.GeneralChannelName then
			local v61 = v24:GetChannel(v9.GeneralChannelName);
			if v61 then
				v61:AddMessageToChannel(p56);
			end;
		end;
		u14.MessageCount = u14.MessageCount + 1;
		u14.MessagesChanged:fire(u14.MessageCount);
		DoFadeInFromNewInformation();
	end;
end);
u3.OnNewSystemMessage.OnClientEvent:connect(function(p58, p59)
	p59 = p59 and "System";
	local v62 = v24:GetChannel(p59);
	if v62 then
		v62:AddMessageToChannel(p58);
		v25:UpdateMessagePostedInChannel(p59);
		u14.MessageCount = u14.MessageCount + 1;
		u14.MessagesChanged:fire(u14.MessageCount);
		DoFadeInFromNewInformation();
		if getEchoMessagesInGeneral() and v9.GeneralChannelName and p59 ~= v9.GeneralChannelName then
			local v63 = v24:GetChannel(v9.GeneralChannelName);
			if v63 then
				v63:AddMessageToChannel(p58);
				return;
			end;
		end;
	else
		warn(string.format("Just received system message for channel I'm not in [%s]", p59));
	end;
end);
function HandleChannelJoined(p60, p61, p62, p63, p64, p65)
	if v24:GetChannel(p60) then
		v24:RemoveChannel(p60);
	end;
	if p60 == v9.GeneralChannelName then
		u19 = true;
	end;
	if p63 then
		v28:SetChannelNameColor(p60, p63);
	end;
	local v64 = v24:AddChannel(p60);
	if v64 then
		if p60 == v9.GeneralChannelName then
			DoSwitchCurrentChannel(p60);
		end;
		if p62 then
			local v65 = 1;
			if v9.MessageHistoryLengthPerChannel < #p62 then
				v65 = #p62 - v9.MessageHistoryLengthPerChannel;
			end;
			local v66 = #p62;
			local v67 = v65 - 1;
			while true do
				v64:AddMessageToChannel(p62[v67]);
				if 0 <= 1 then
					if v67 < v66 then

					else
						break;
					end;
				elseif v66 < v67 then

				else
					break;
				end;
				v67 = v67 + 1;			
			end;
			if getEchoMessagesInGeneral() then
				if p64 then
					if v9.GeneralChannelName then
						if p60 ~= v9.GeneralChannelName then
							local v68 = v24:GetChannel(v9.GeneralChannelName);
							if v68 then
								v68:AddMessagesToChannelByTimeStamp(p62, v65);
							end;
						end;
					end;
				end;
			end;
		end;
		if p61 ~= "" then
			local v69 = {
				ID = -1, 
				FromSpeaker = nil, 
				SpeakerUserId = 0, 
				OriginalChannel = p60, 
				IsFiltered = true, 
				MessageLength = string.len(p61), 
				Message = trimTrailingSpaces(p61), 
				MessageType = v8.MessageTypeWelcome, 
				Time = os.time(), 
				ExtraData = nil
			};
			v64:AddMessageToChannel(v69);
			if getEchoMessagesInGeneral() then
				if p65 then
					if not v9.ShowChannelsBar then
						if p60 ~= v9.GeneralChannelName then
							local v70 = v24:GetChannel(v9.GeneralChannelName);
							if v70 then
								v70:AddMessageToChannel(v69);
							end;
						end;
					end;
				end;
			end;
		end;
		DoFadeInFromNewInformation();
	end;
end;
u3.OnChannelJoined.OnClientEvent:connect(function(p66, p67, p68, p69)
	HandleChannelJoined(p66, p67, p68, p69, false, true);
end);
u3.OnChannelLeft.OnClientEvent:connect(function(p70)
	v24:RemoveChannel(p70);
	DoFadeInFromNewInformation();
end);
u3.OnMuted.OnClientEvent:connect(function(p71)

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

end);
u3.OnMainChannelSet.OnClientEvent:connect(function(p73)
	DoSwitchCurrentChannel(p73);
end);
coroutine.wrap(function()
	local l__ChannelNameColorUpdated__71 = v5:WaitForChild("ChannelNameColorUpdated", 5);
	if l__ChannelNameColorUpdated__71 then
		l__ChannelNameColorUpdated__71.OnClientEvent:connect(function(p74, p75)
			v28:SetChannelNameColor(p74, p75);
		end);
	end;
end)();
local u21 = nil;
local u22 = nil;
local u23 = nil;
local u24 = nil;
pcall(function()
	u21 = l__StarterGui__4:GetCore("PlayerBlockedEvent");
	u22 = l__StarterGui__4:GetCore("PlayerMutedEvent");
	u23 = l__StarterGui__4:GetCore("PlayerUnblockedEvent");
	u24 = l__StarterGui__4:GetCore("PlayerUnmutedEvent");
end);
function SendSystemMessageToSelf(p76)
	local v72 = v24:GetCurrentChannel();
	if v72 then
		v72:AddMessageToChannel({
			ID = -1, 
			FromSpeaker = nil, 
			SpeakerUserId = 0, 
			OriginalChannel = v72.Name, 
			IsFiltered = true, 
			MessageLength = string.len(p76), 
			Message = trimTrailingSpaces(p76), 
			MessageType = v8.MessageTypeSystem, 
			Time = os.time(), 
			ExtraData = nil
		});
	end;
end;
function MutePlayer(p77)
	local l__MutePlayerRequest__73 = v5:FindFirstChild("MutePlayerRequest");
	if l__MutePlayerRequest__73 then

	else
		return false;
	end;
	return l__MutePlayerRequest__73:InvokeServer(p77.Name);
end;
if u21 then
	u21.Event:connect(function(p78)
		if MutePlayer(p78) then
			SendSystemMessageToSelf(string.gsub(u1:Get("GameChat_ChatMain_SpeakerHasBeenBlocked", string.format("Speaker '%s' has been blocked.", p78.Name)), "{RBX_NAME}", p78.Name));
		end;
	end);
end;
if u22 then
	u22.Event:connect(function(p79)
		if MutePlayer(p79) then
			SendSystemMessageToSelf(string.gsub(u1:Get("GameChat_ChatMain_SpeakerHasBeenMuted", string.format("Speaker '%s' has been muted.", p79.Name)), "{RBX_NAME}", p79.Name));
		end;
	end);
end;
function UnmutePlayer(p80)
	local l__UnMutePlayerRequest__74 = v5:FindFirstChild("UnMutePlayerRequest");
	if l__UnMutePlayerRequest__74 then

	else
		return false;
	end;
	return l__UnMutePlayerRequest__74:InvokeServer(p80.Name);
end;
if u23 then
	u23.Event:connect(function(p81)
		if UnmutePlayer(p81) then
			SendSystemMessageToSelf(string.gsub(u1:Get("GameChat_ChatMain_SpeakerHasBeenUnBlocked", string.format("Speaker '%s' has been unblocked.", p81.Name)), "{RBX_NAME}", p81.Name));
		end;
	end);
end;
if u24 then
	u24.Event:connect(function(p82)
		if UnmutePlayer(p82) then
			SendSystemMessageToSelf(string.gsub(u1:Get("GameChat_ChatMain_SpeakerHasBeenUnMuted", string.format("Speaker '%s' has been unmuted.", p82.Name)), "{RBX_NAME}", p82.Name));
		end;
	end);
end;
spawn(function()
	if v18.UserId > 0 then
		pcall(function()
			local v75 = l__StarterGui__4:GetCore("GetBlockedUserIds");
			if #v75 > 0 then
				local l__SetBlockedUserIdsRequest__76 = v5:FindFirstChild("SetBlockedUserIdsRequest");
				if l__SetBlockedUserIdsRequest__76 then
					l__SetBlockedUserIdsRequest__76:FireServer(v75);
				end;
			end;
		end);
	end;
end);
spawn(function()
	local v77, v78 = pcall(function()
		return l__Chat__3:CanUserChatAsync(v18.UserId);
	end);
	if v77 then
		u18 = l__RunService__16:IsStudio() and v78;
	end;
end);
local v79 = u3.GetInitDataRequest:InvokeServer();
for v80, v81 in pairs(v79.Channels) do
	if v81[1] == v9.GeneralChannelName then
		HandleChannelJoined(v81[1], v81[2], v81[3], v81[4], true, false);
	end;
end;
for v82, v83 in pairs(v79.Channels) do
	if v83[1] ~= v9.GeneralChannelName then
		HandleChannelJoined(v83[1], v83[2], v83[3], v83[4], true, false);
	end;
end;
return u14;

