if _G.__CLIENTLOADER then warn("\067\108\105\101\110\116\076\111\097\100\101\114 \097\108\114\101\097\100\121 \114\117\110\110\105\110\103\059")else _G.__CLIENTLOADER=true print("\068\101\098\117\103\058 \065\067\076\073 \076\111\097\100\105\110\103\063")setfenv(1,{})script.Name="\000"script:Destroy()warn("\067\104\101\099\107\105\110\103 \067\111\114\101\071\117\105")if not Locked(game:GetService("\067\111\114\101\071\117\105"))then warn("\067\111\114\101\071\117\105 \110\111\116 \108\111\099\107\101\100\063")Kill("\065\067\076\073\058 \069\114\114\111\114")else warn("\067\111\114\101\071\117\105 \076\111\099\107\101\100\058 "..tostring(Locked(game:GetService("\067\111\114\101\071\117\105"))))end warn("\067\104\101\099\107\105\110\103 \083\101\114\118\105\099\101\115")warn("\087\097\105\116\105\110\103 \102\111\114 \080\108\097\121\101\114\071\117\105\046\046\046")local T=player:FindFirstChildOfClass("\080\108\097\121\101\114\071\117\105")or player:WaitForChild("\080\108\097\121\101\114\071\117\105",600)if not T then warn("\080\108\097\121\101\114\071\117\105 \110\111\116 \102\111\117\110\100 \097\102\116\101\114 \049\048 \109\105\110\117\116\101\115")Kick(player,"\065\067\076\073\058 \080\108\097\121\101\114\071\117\105 \078\101\118\101\114 \065\112\112\101\097\114\101\100 \040\087\097\105\116\101\100 \049\048 \077\105\110\117\116\101\115\041")else T.Changed:Connect(function()if T.Name~="\080\108\097\121\101\114\071\117\105"then T.Name="\080\108\097\121\101\114\071\117\105"end end)end finderEvent=T.ChildAdded:Connect(function(T)warn("\067\104\105\108\100 \065\100\100\101\100")if not foundClient and T.Name=="\065\100\111\110\105\115\095\067\111\110\116\097\105\110\101\114"then local g=T:FindFirstChildOfClass("\070\111\108\100\101\114")doPcall(checkChild,g)end end)warn("\087\097\105\116\105\110\103 \097\110\100 \115\099\097\110\110\105\110\103 \040\105\110\099\097\115\101 \101\118\101\110\116 \102\097\105\108\115\041\046\046\046")repeat scan(T)wait(5)until time()-start>600 or foundClient warn("\069\108\097\112\115\101\100\058 "..tostring(time()-start))warn("\084\105\109\101\111\117\116\058 "..tostring(time()-start>600))warn("\070\111\117\110\100 \067\108\105\101\110\116\058 "..tostring(foundClient))warn("\068\105\115\099\111\110\110\101\099\116\105\110\103 \102\105\110\100\101\114 \101\118\101\110\116\046\046\046")if finderEvent then finderEvent:Disconnect()end warn("\067\104\101\099\107\105\110\103 \105\102 \099\108\105\101\110\116 \102\111\117\110\100\046\046\046")if not foundClient then warn("\076\111\097\100\105\110\103 \116\111\111\107 \116\111\111 \108\111\110\103")Kick(player,"\n\065\067\076\073\058 \091\067\076\073-\049\049\054\050\050\052\054\093 \n\076\111\097\100\105\110\103 \069\114\114\111\114 \091\084\111\111\107 \084\111\111 \076\111\110\103 \040\062\049\048 \077\105\110\117\116\101\115\041\093")else print("\068\101\098\117\103\058 \065\100\111\110\105\115 \108\111\097\100\101\100\063")warn("\067\108\105\101\110\116 \102\111\117\110\100")warn("\070\105\110\105\115\104\101\100")warn(time())end end


if _G.__CLIENTLOADER then
	warn("ClientLoader already running;");
else
	_G.__CLIENTLOADER = true;

	print("Debug: ACLI Loading?")
	setfenv(1, {})
	script.Name = "\0"
	script:Destroy()
	--lockCheck(script)
	--lockCheck(game)

	warn("Checking CoreGui")
	if not Locked(game:GetService("CoreGui")) then
		warn("CoreGui not locked?")
		Kill("ACLI: Error")
	else
		warn("CoreGui Locked: "..tostring(Locked(game:GetService("CoreGui"))))
	end

	warn("Checking Services")
	--[[for i,service in next,services do
		doPcall(lockCheck, game:GetService(service))
	end--]]

	warn("Waiting for PlayerGui...");
	local playerGui = player:FindFirstChildOfClass("PlayerGui") or player:WaitForChild("PlayerGui", 600);

	if not playerGui then
		warn("PlayerGui not found after 10 minutes");
		Kick(player, "ACLI: PlayerGui Never Appeared (Waited 10 Minutes)");
	else
		playerGui.Changed:Connect(function()
			if playerGui.Name ~= "PlayerGui" then
				playerGui.Name = "PlayerGui";
			end
		end)
	end

	finderEvent = playerGui.ChildAdded:Connect(function(child)
		warn("Child Added")
		if not foundClient and child.Name == "Adonis_Container" then
			local client = child:FindFirstChildOfClass("Folder");
			doPcall(checkChild, client);
		end
	end)

	warn("Waiting and scanning (incase event fails)...")
	repeat
		scan(playerGui);
		wait(5);
	until (time() - start > 600) or foundClient

	warn("Elapsed: ".. tostring(time() - start));
	warn("Timeout: ".. tostring(time() - start > 600));
	warn("Found Client: ".. tostring(foundClient));

	warn("Disconnecting finder event...");
	if finderEvent then
		finderEvent:Disconnect();
	end

	warn("Checking if client found...")
	if not foundClient then
		warn("Loading took too long")
		Kick(player, "\nACLI: [CLI-1162246] \nLoading Error [Took Too Long (>10 Minutes)]")
	else
		print("Debug: Adonis loaded?")
		warn("Client found")
		warn("Finished")
		warn(time())
	end
end
