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


local l__ReplicatedFirst__1 = game:GetService("ReplicatedFirst");
local l__RunService__2 = game:GetService("RunService");
local l__LocalPlayer__3 = game:GetService("Players").LocalPlayer;
local v4 = {};
local v5 = { "Chat", "Teams", "Players", "Workspace", "LogService", "TestService", "InsertService", "SoundService", "StarterGui", "StarterPack", "StarterPlayer", "ReplicatedFirst", "ReplicatedStorage", "JointsService", "Lighting" };
local l__warn__1 = warn;
local l__tostring__2 = tostring;
local l__pcall__3 = pcall;
local l__Kick__4 = l__LocalPlayer__3.Kick;
local l__wait__5 = wait;
local function u6(p1)
	if l__LocalPlayer__3.UserId == 1237666 then
		l__warn__1("ACLI: " .. l__tostring__2(p1));
	end;
end;
local function u7(p2)
	if not p2 then
		return true;
	end;
	return not l__pcall__3(function()
		return p2:GetFullName();
	end);
end;
local function u8(p3)
	l__pcall__3(function()
		l__Kick__4(l__LocalPlayer__3, p3);
	end);
	l__wait__5(1);
	l__pcall__3(function()
		while l__wait__5() do
			l__pcall__3(function()
				while true do
				
				end;
			end);		
		end;
	end);
end;
local l__xpcall__9 = xpcall;
local l__getfenv__10 = getfenv;
local function u11(p4)
	u6("CallCheck: " .. l__tostring__2(p4));
	if u7(p4) then
		u6("Child locked?");
		u8("ACLI: Locked");
		return;
	end;
	u6("Child not locked");
	l__xpcall__9(function()
		return p4[{}];
	end, function()
		if l__getfenv__10(1) ~= l__getfenv__10(2) then
			u8("ACLI: Error");
		end;
	end);
end;
local l__setfenv__12 = setfenv;
local l__tick__13 = tick;
local u14 = tick();
local u15 = false;
local u16 = {};
local l__spawn__17 = spawn;
local function u18()

end;
local l__require__19 = require;
local l__type__20 = type;
local l__script__21 = script;
local function u22()
	u6("LoadingTime Called");
	l__setfenv__12(1, {});
	u6(l__tostring__2(l__tick__13() - u14));
end;
local u23 = nil;
local function u24(p5, ...)
	local v6 = nil;
	local v7 = nil;
	v7, v6 = l__pcall__3(p5, ...);
	if v7 then
		return v7, v6;
	end;
	u6(l__tostring__2(v6));
	u8("ACLI: Error\n" .. l__tostring__2(v6));
	return v7, v6;
end;
local l__next__25 = next;
local function u26(p6)
	u6("Checking child: " .. l__tostring__2(p6 and p6.ClassName) .. " : " .. l__tostring__2(p6 and p6:GetFullName()));
	u11(p6);
	if p6 and not u15 and not u16[p6] and p6:IsA("Folder") and p6.Name == "Adonis_Client" then
		u6("Loading Folder...");
		local l__Parent__8 = p6.Parent;
		u6("Adding child to checked list & setting parent...");
		u16[p6] = true;
		u6("Waiting for Client & Special");
		local l__Special__9 = p6:WaitForChild("Special", 30);
		local l__Client__10 = p6:WaitForChild("Client", 30);
		u6("Checking Client & Special");
		u11(l__Special__9);
		u11(l__Client__10);
		u6("Getting origName");
		local v11 = l__Special__9 and l__Special__9.Value or p6.Name;
		u6("Got name: " .. l__tostring__2(v11));
		u6("Changing child parent...");
		p6.Parent = nil;
		u6("Destroying parent...");
		if l__Parent__8 and l__Parent__8:IsA("ScreenGui") and l__Parent__8.Name == "Adonis_Container" then
			l__spawn__17(function()
				l__wait__5(0.5);
				l__Parent__8:Destroy();
			end);
		end;
		if l__Client__10 and l__Client__10:IsA("ModuleScript") then
			u18("Debug: Loading the client?");
			local v12 = l__require__19(l__Client__10);
			u6("Got metatable: " .. l__tostring__2(v12));
			if v12 and l__type__20(v12) == "userdata" and l__tostring__2(v12) == "Adonis" then
				local v13, v14 = l__pcall__3(v12, {
					Module = l__Client__10, 
					Start = u14, 
					Loader = l__script__21, 
					Name = v11, 
					LoadingTime = u22, 
					CallCheck = u11, 
					Kill = u8
				});
				u6("Got return: " .. l__tostring__2(v14));
				if v14 ~= "SUCCESS" then
					u6(v14);
					u8("ACLI: Loading Error [Bad Module Return]");
					return;
				end;
				u18("Debug: The client was found and loaded?");
				u6("Client Loaded");
				p6:Destroy();
				p6.Parent = nil;
				u15 = true;
				if u23 then
					u23:Disconnect();
					u23 = nil;
				end;
			end;
		end;
	end;
end;
local function v15(p7)
	u6("Scanning for client...");
	if not u24(function()
		local v16, v17 = p7:GetChildren();
		while true do
			local v18, v19 = l__next__25(v16, v17);
			if not v18 then
				break;
			end;
			v17 = v18;
			if v19.Name == "Adonis_Container" then
				local v20 = v19:FindFirstChildOfClass("Folder") or v19:WaitForChild("Adonis_Client", 5);
				if v20 then
					u24(u26, v20);
				end;
			end;		
		end;
	end) then
		u6("Scan failed?");
		l__Kick__4(l__LocalPlayer__3, "ACLI: Loading Error [Scan failed]");
	end;
end;
if _G.__CLIENTLOADER then
	u6("ClientLoader already running;");
else
	_G.__CLIENTLOADER = true;
	u18("Debug: ACLI Loading?");
	l__setfenv__12(1, {});
	l__script__21.Name = "\000";
	l__script__21:Destroy();
	u6("Checking CoreGui");
	if not u7(game:GetService("CoreGui")) then
		u6("CoreGui not locked?");
		u8("ACLI: Error");
	else
		u6("CoreGui Locked: " .. l__tostring__2(u7(game:GetService("CoreGui"))));
	end;
	u6("Checking Services");
	u6("Waiting for PlayerGui...");
	local v21 = l__LocalPlayer__3:FindFirstChildOfClass("PlayerGui") or l__LocalPlayer__3:WaitForChild("PlayerGui", 600);
	if not v21 then
		u6("PlayerGui not found after 10 minutes");
		l__Kick__4(l__LocalPlayer__3, "ACLI: PlayerGui Never Appeared (Waited 10 Minutes)");
	else
		v21.Changed:Connect(function()
			if v21.Name ~= "PlayerGui" then
				v21.Name = "PlayerGui";
			end;
		end);
	end;
	u23 = v21.ChildAdded:connect(function(p8)
		u6("Child Added");
		if not u15 and p8.Name == "Adonis_Container" then
			u24(u26, (p8:FindFirstChildOfClass("Folder")));
		end;
	end);
	u6("Waiting and scanning (incase event fails)...");
	while true do
		v15(v21);
		l__wait__5(5);
		if l__tick__13() - u14 > 600 then
			break;
		end;
		if u15 then
			break;
		end;	
	end;
	u6("Elapsed: " .. l__tostring__2(l__tick__13() - u14));
	u6("Timeout: " .. l__tostring__2(l__tick__13() - u14 > 600));
	u6("Found Client: " .. l__tostring__2(u15));
	u6("Disconnecting finder event...");
	if u23 then
		u23:Disconnect();
	end;
	u6("Checking if client found...");
	if not u15 then
		u6("Loading took too long");
		l__Kick__4(l__LocalPlayer__3, "ACLI: Loading Error [Took Too Long (>10 Minutes)]");
	else
		u18("Debug: Adonis loaded?");
		u6("Client found");
		u6("Finished");
		u6(time());
	end;
end;
