-- Decompiled with the Synapse X Luau decompiler.


local l__HDAdminMain__1 = _G.HDAdminMain;
local l__CustomTopBar__2 = l__HDAdminMain__1.gui.CustomTopBar;
for v3, v4 in pairs(l__HDAdminMain__1.signals:GetChildren()) do
	if v4:IsA("RemoteEvent") then
		v4.OnClientEvent:Connect(function(p1)
			if not l__HDAdminMain__1.initialized then
				l__HDAdminMain__1.client.Signals.Initialized.Event:Wait();
			end;
			if v4.Name == "ChangeStat" then
				local v5 = p1[1];
				l__HDAdminMain__1.pdata[v5] = p1[2];
				if v5 == "Donor" then
					l__HDAdminMain__1:GetModule("PageSpecial"):UpdateDonorFrame();
					return;
				end;
			else
				if v4.Name == "InsertStat" then
					table.insert(l__HDAdminMain__1.pdata[p1[1]], p1[2]);
					return;
				end;
				if v4.Name == "RemoveStat" then
					local v6 = p1[1];
					local v7 = p1[2];
					for v8, v9 in pairs(l__HDAdminMain__1.pdata[v6]) do
						if tostring(v9) == tostring(v7) then
							table.remove(l__HDAdminMain__1.pdata[v6], v8);
							return;
						end;
					end;
					return;
				end;
				if v4.Name == "Notice" or v4.Name == "Error" then
					l__HDAdminMain__1:GetModule("Notices"):Notice(v4.Name, p1[1], p1[2], p1[3]);
					return;
				end;
				if v4.Name == "ShowPage" then
					l__HDAdminMain__1:GetModule("GUIs"):ShowSpecificPage(p1[1], p1[2]);
					return;
				end;
				if v4.Name == "ShowBannedUser" then
					l__HDAdminMain__1:GetModule("GUIs"):ShowSpecificPage("Admin", "Banland");
					if type(p1) == "table" then
						l__HDAdminMain__1:GetModule("cf"):ShowBannedUser(p1);
						return;
					end;
				else
					if v4.Name == "SetCameraSubject" then
						l__HDAdminMain__1:GetModule("cf"):SetCameraSubject(p1);
						return;
					end;
					if v4.Name == "Clear" then
						l__HDAdminMain__1:GetModule("Messages"):ClearMessageContainer();
						return;
					end;
					if v4.Name == "ShowWarning" then
						l__HDAdminMain__1:GetModule("cf"):ShowWarning(p1);
						return;
					end;
					if v4.Name == "Message" then
						l__HDAdminMain__1:GetModule("Messages"):Message(p1);
						return;
					end;
					if v4.Name == "Hint" then
						l__HDAdminMain__1:GetModule("Messages"):Hint(p1);
						return;
					end;
					if v4.Name == "GlobalAnnouncement" then
						l__HDAdminMain__1:GetModule("Messages"):GlobalAnnouncement(p1);
						return;
					end;
					if v4.Name == "SetCoreGuiEnabled" then
						l__HDAdminMain__1.starterGui:SetCoreGuiEnabled(Enum.CoreGuiType[p1[1]], p1[2]);
						return;
					end;
					if v4.Name == "CreateLog" then
						l__HDAdminMain__1:GetModule("cf"):CreateNewCommandMenu(p1[1], p1[2], 5);
						return;
					end;
					if v4.Name == "CreateAlert" then
						l__HDAdminMain__1:GetModule("cf"):CreateNewCommandMenu("alert", { p1[1], p1[2] }, 8, true);
						return;
					end;
					if v4.Name == "CreateBanMenu" then
						l__HDAdminMain__1:GetModule("cf"):CreateNewCommandMenu("banMenu", p1, 6);
						return;
					end;
					if v4.Name == "CreatePollMenu" then
						l__HDAdminMain__1:GetModule("cf"):CreateNewCommandMenu("pollMenu", p1, 9);
						return;
					end;
					if v4.Name == "CreateMenu" then
						l__HDAdminMain__1:GetModule("cf"):CreateNewCommandMenu(p1.MenuName, p1.Data, p1.TemplateId);
						return;
					end;
					if v4.Name == "CreateCommandMenu" then
						l__HDAdminMain__1:GetModule("cf"):CreateNewCommandMenu(p1[1], p1[2], p1[3]);
						return;
					end;
					if v4.Name == "RankChanged" then
						l__HDAdminMain__1:GetModule("cf"):UpdateIconVisiblity();
						l__HDAdminMain__1:GetModule("PageAbout"):UpdateRankName();
						l__HDAdminMain__1:GetModule("GUIs"):DisplayPagesAccordingToRank(true);
						if l__HDAdminMain__1.initialized then
							l__HDAdminMain__1:GetModule("PageCommands"):CreateCommands();
							return;
						end;
					elseif v4.Name == "ExecuteClientCommand" then
						local v10 = "Function";
						if p1[4].UnFunction then
							v10 = "UnFunction";
						end;
						local v11 = l__HDAdminMain__1:GetModule("ClientCommands")[p1[3]];
						if v11 then
							local v12 = v11[v10];
							if v12 then
								v12(p1[1], p1[2], v11);
								return;
							end;
						end;
					elseif v4.Name == "ReplicationEffectClientCommand" then
						local v13 = l__HDAdminMain__1:GetModule("ClientCommands")[p1[1]];
						if v13 then
							local l__ReplicationEffect__14 = v13.ReplicationEffect;
							if l__ReplicationEffect__14 then
								l__ReplicationEffect__14(p1[2], p1[3], v13);
								return;
							end;
						end;
					elseif v4.Name == "ActivateClientCommand" then
						local v15 = p1[1];
						local v16 = p1[2];
						local v17 = v16;
						if v17 then
							v17 = v16.Speed ~= 0 and v16.Speed or nil;
						end;
						if v17 then
							l__HDAdminMain__1.commandSpeeds[v15] = v17;
							local l__gui__18 = l__HDAdminMain__1.gui;
							local v19 = l__HDAdminMain__1:GetModule("cf");
							v19:DestroyCommandMenuFrame((l__gui__18:FindFirstChild("CommandMenufly")));
						end;
						if l__HDAdminMain__1.commandSpeeds[v15] then
							for v20, v21 in pairs(l__HDAdminMain__1.commandSpeeds) do
								if v20 ~= v15 then
									local v22 = l__HDAdminMain__1:GetModule("cf");
									v22:DeactivateCommand(v20);
								end;
							end;
						end;
						l__HDAdminMain__1.commandsAllowedToUse[v15] = true;
						local v23 = l__HDAdminMain__1:GetModule("cf");
						v23:ActivateClientCommand(v15, v16);
						local v24 = nil;
						local v25 = nil;
						for v26, v27 in pairs(l__HDAdminMain__1.commandsWithMenus) do
							v24 = v27[v15];
							if v24 then
								v25 = tonumber(v26:match("%d+"));
								break;
							end;
						end;
						if v24 then
							local v28 = l__HDAdminMain__1:GetModule("cf");
							v28:CreateNewCommandMenu(v15, v24, v25);
							return;
						end;
					else
						if v4.Name == "DeactivateClientCommand" then
							local v29 = l__HDAdminMain__1.GetModule(l__HDAdminMain__1, "cf");
							v29.DeactivateCommand(v29, p1[1]);
							return;
						end;
						if v4.Name == "FadeInIcon" then
							return;
						end;
						if v4.Name == "ChangeMainVariable" then
							l__HDAdminMain__1[p1[1]] = p1;
						end;
					end;
				end;
			end;
		end);
	elseif v4:IsA("RemoteFunction") then
		function v4.OnClientInvoke(p2)
			if not l__HDAdminMain__1.initialized then
				l__HDAdminMain__1.client.Signals.Initialized.Event:Wait();
			end;
			if v4.Name ~= "GetLocalDate" then
				return;
			end;
			return os.date("*t", p2);
		end;
	end;
end;
return {};
