-- Decompiled with the Synapse X Luau decompiler.


local u1 = require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"));
local l__StarterGui__2 = game:GetService("StarterGui");
function SetCoreGuiChatConnections(p1)
	local v1 = 0;
	while true do
		if v1 < 10 then

		else
			break;
		end;
		v1 = v1 + 1;
		local v2, v3 = pcall(function()
			l__StarterGui__2:SetCore("CoreGuiChatConnections", p1);
		end);
		if not v2 then

		else
			break;
		end;
		if not v2 then
			if v1 == 10 then
				error("Error calling SetCore CoreGuiChatConnections: " .. v3);
			end;
		end;
		wait();	
	end;
end;
function checkBothChatTypesDisabled()
	if u1.BubbleChatEnabled ~= nil then
		if u1.ClassicChatEnabled ~= nil then

		else
			return false;
		end;
	else
		return false;
	end;
	return not (u1.BubbleChatEnabled or u1.ClassicChatEnabled);
end;
if not game:GetService("GuiService"):IsTenFootInterface() and not game:GetService("UserInputService").VREnabled then
	if checkBothChatTypesDisabled() then
		local v4 = {
			ChatWindow = {}
		};
		v4.ChatWindow.ChatTypes = {};
		v4.ChatWindow.ChatTypes.BubbleChatEnabled = false;
		v4.ChatWindow.ChatTypes.ClassicChatEnabled = false;
		SetCoreGuiChatConnections(v4);
		return;
	end;
else
	return;
end;
(function()
	local v5 = {
		ChatWindow = {}, 
		SetCore = {}, 
		GetCore = {}
	};
	v5.ChatWindow.ChatTypes = {};
	v5.ChatWindow.ChatTypes.BubbleChatEnabled = u1.BubbleChatEnabled;
	v5.ChatWindow.ChatTypes.ClassicChatEnabled = u1.ClassicChatEnabled;
	local u3 = require(script:WaitForChild("ChatMain"));
	local v6 = Instance.new("BindableEvent");
	v6.Name = "ToggleVisibility";
	v5.ChatWindow.ToggleVisibility = v6;
	local u4 = "ToggleVisibility";
	v6.Event:connect(function(...)
		u3[u4](u3, ...);
	end);
	local v7 = Instance.new("BindableEvent");
	v7.Name = "SetVisible";
	v5.ChatWindow.SetVisible = v7;
	u4 = "SetVisible";
	v7.Event:connect(function(...)
		u3[u4](u3, ...);
	end);
	local v8 = Instance.new("BindableEvent");
	v8.Name = "FocusChatBar";
	v5.ChatWindow.FocusChatBar = v8;
	u4 = "FocusChatBar";
	v8.Event:connect(function(...)
		u3[u4](u3, ...);
	end);
	local v9 = Instance.new("BindableFunction");
	v9.Name = "GetVisibility";
	v5.ChatWindow.GetVisibility = v9;
	local u5 = "GetVisibility";
	function v9.OnInvoke(...)
		return u3[u5](u3, ...);
	end;
	local v10 = Instance.new("BindableFunction");
	v10.Name = "GetMessageCount";
	v5.ChatWindow.GetMessageCount = v10;
	u5 = "GetMessageCount";
	function v10.OnInvoke(...)
		return u3[u5](u3, ...);
	end;
	local v11 = Instance.new("BindableEvent");
	v11.Name = "TopbarEnabledChanged";
	v5.ChatWindow.TopbarEnabledChanged = v11;
	local l__Event__12 = v11.Event;
	u4 = "TopbarEnabledChanged";
	u5 = l__Event__12;
	l__Event__12.connect(u5, function(...)
		u3[u4](u3, ...);
	end);
	local v13 = Instance.new("BindableFunction");
	v13.Name = "IsFocused";
	v5.ChatWindow.IsFocused = v13;
	u5 = "IsFocused";
	function v13.OnInvoke(...)
		return u3[u5](u3, ...);
	end;
	local v14 = Instance.new("BindableEvent");
	v14.Name = "ChatBarFocusChanged";
	v5.ChatWindow.ChatBarFocusChanged = v14;
	local l__ChatBarFocusChanged__15 = u3.ChatBarFocusChanged;
	local u6 = v14;
	u5 = l__ChatBarFocusChanged__15;
	l__ChatBarFocusChanged__15.connect(u5, function(...)
		u6:Fire(...);
	end);
	u6 = Instance.new;
	u6 = u6("BindableEvent");
	u6.Name = "VisibilityStateChanged";
	v5.ChatWindow.VisibilityStateChanged = u6;
	local l__VisibilityStateChanged__16 = u3.VisibilityStateChanged;
	u5 = l__VisibilityStateChanged__16;
	l__VisibilityStateChanged__16.connect(u5, function(...)
		u6:Fire(...);
	end);
	u6 = Instance.new;
	u6 = u6("BindableEvent");
	u6.Name = "MessagesChanged";
	v5.ChatWindow.MessagesChanged = u6;
	local l__MessagesChanged__17 = u3.MessagesChanged;
	u5 = l__MessagesChanged__17;
	l__MessagesChanged__17.connect(u5, function(...)
		u6:Fire(...);
	end);
	u6 = Instance.new;
	u6 = u6("BindableEvent");
	u6.Name = "MessagePosted";
	v5.ChatWindow.MessagePosted = u6;
	local l__MessagePosted__18 = u3.MessagePosted;
	u5 = l__MessagePosted__18;
	l__MessagePosted__18.connect(u5, function(...)
		u6:Fire(...);
	end);
	u6 = Instance.new;
	u6 = u6("BindableEvent");
	u6.Name = "CoreGuiEnabled";
	v5.ChatWindow.CoreGuiEnabled = u6;
	local l__Event__19 = u6.Event;
	u4 = "CoreGuiEnabled";
	u5 = l__Event__19;
	l__Event__19.connect(u5, function(...)
		u3[u4]:fire(...);
	end);
	u6 = Instance.new;
	u6 = u6("BindableEvent");
	u6.Name = "ChatMakeSystemMessage";
	v5.SetCore.ChatMakeSystemMessage = u6;
	local l__Event__20 = u6.Event;
	u4 = "ChatMakeSystemMessage";
	u5 = l__Event__20;
	l__Event__20.connect(u5, function(...)
		u3[u4 .. "Event"]:fire(...);
	end);
	u6 = Instance.new;
	u6 = u6("BindableEvent");
	u6.Name = "ChatWindowPosition";
	v5.SetCore.ChatWindowPosition = u6;
	local l__Event__21 = u6.Event;
	u4 = "ChatWindowPosition";
	u5 = l__Event__21;
	l__Event__21.connect(u5, function(...)
		u3[u4 .. "Event"]:fire(...);
	end);
	u6 = Instance.new;
	u6 = u6("BindableEvent");
	u6.Name = "ChatWindowSize";
	v5.SetCore.ChatWindowSize = u6;
	local l__Event__22 = u6.Event;
	u4 = "ChatWindowSize";
	u5 = l__Event__22;
	l__Event__22.connect(u5, function(...)
		u3[u4 .. "Event"]:fire(...);
	end);
	u6 = Instance.new;
	u6 = u6("BindableFunction");
	u6.Name = "ChatWindowPosition";
	v5.GetCore.ChatWindowPosition = u6;
	u5 = "ChatWindowPosition";
	function u6.OnInvoke(...)
		return u3["f" .. u5](...);
	end;
	u6 = Instance.new;
	u6 = u6("BindableFunction");
	u6.Name = "ChatWindowSize";
	v5.GetCore.ChatWindowSize = u6;
	u5 = "ChatWindowSize";
	function u6.OnInvoke(...)
		return u3["f" .. u5](...);
	end;
	u6 = Instance.new;
	u6 = u6("BindableEvent");
	u6.Name = "ChatBarDisabled";
	v5.SetCore.ChatBarDisabled = u6;
	local l__Event__23 = u6.Event;
	u4 = "ChatBarDisabled";
	u5 = l__Event__23;
	l__Event__23.connect(u5, function(...)
		u3[u4 .. "Event"]:fire(...);
	end);
	u6 = Instance.new;
	u6 = u6("BindableFunction");
	u6.Name = "ChatBarDisabled";
	v5.GetCore.ChatBarDisabled = u6;
	u5 = "ChatBarDisabled";
	function u6.OnInvoke(...)
		return u3["f" .. u5](...);
	end;
	u6 = Instance.new;
	u6 = u6("BindableEvent");
	u6.Name = "SpecialKeyPressed";
	v5.ChatWindow.SpecialKeyPressed = u6;
	local l__Event__24 = u6.Event;
	u4 = "SpecialKeyPressed";
	u5 = l__Event__24;
	l__Event__24.connect(u5, function(...)
		u3[u4](u3, ...);
	end);
	u6 = SetCoreGuiChatConnections;
	u6(v5);
end)();

