return function()local r,X,v,V,I,J,e,A,Y,c,W,G,E,H,h,p,j,b,Z,C,O,f,N,m,D,w,Q,R,l,o,z,U,t,L,n,T,B,q,i,K,x,P,u,F,g,s,M,a,y,S,k,d,rh,Xh,vh,Vh,Ih,Jh,eh=_G,game,script,getfenv,setfenv,workspace,getmetatable,setmetatable,loadstring,coroutine,rawequal,typeof,print,math,warn,error,pcall,xpcall,select,rawset,rawget,ipairs,pairs,next,Rect,Axes,os,time,Faces,unpack,string,Color3,newproxy,tostring,tonumber,Instance,TweenInfo,BrickColor,NumberRange,ColorSequence,NumberSequence,ColorSequenceKeypoint,NumberSequenceKeypoint,PhysicalProperties,Region3int16,Vector3int16,require,table,type,wait,Enum,UDim,UDim2,Vector2,Vector3,Region3,CFrame,Ray,delay local Ah=v local Yh=service local ch=client local Wh,Gh,Eh,Hh,hh,ph,jh local function bh()ph=ch.UI Wh=ch.Anti Gh=ch.Core jh=ch.Variables Eh=ch.Functions Hh=ch.Process hh=ch.Remote Hh.Init=nil end local function Zh()Hh.RunLast=nil end local function Ch(r)Yh.Player.Chatted:Connect(Yh.EventTask("\069\118\101\110\116\058 \080\114\111\099\101\115\115\067\104\097\116",Hh.Chat))Yh.Player.CharacterRemoving:Connect(Yh.EventTask("\069\118\101\110\116\058 \067\104\097\114\097\099\116\101\114\082\101\109\111\118\105\110\103",Hh.CharacterRemoving))Yh.Player.CharacterAdded:Connect(Yh.Threads.NewEventTask("\069\118\101\110\116\058 \067\104\097\114\097\099\116\101\114\065\100\100\101\100",Hh.CharacterAdded))Yh.LogService.MessageOut:Connect(Hh.LogService)Yh.ScriptContext.Error:Connect(Hh.ErrorMessage)Hh.RateLimits=hh.Get("\082\097\116\101\076\105\109\105\116\115")or Hh.RateLimits Hh.RunAfterLoaded=nil end;(V()).client=nil;(V()).service=nil;(V()).script=nil ch.Process={Init=bh;RunLast=Zh;RunAfterLoaded=Ch;RateLimits={Remote=.02,Command=.1;Chat=.1;RateLog=10};Remote=function(r,X,...)local v={...}hh.Received=hh.Received+1 if y(X)=="\115\116\114\105\110\103"then if X==ch.DepsName.."\071\073\086\069\095\075\069\089"then if not Gh.Key then log("~\033 \083\101\116 \114\101\109\111\116\101 \107\101\121")Gh.Key=v[1]log("~\033 \067\097\108\108 \070\105\110\105\115\104\095\076\111\097\100\105\110\103\040\041")ch.Finish_Loading()end elseif hh.UnEncrypted[X]then return{hh.UnEncrypted[X](...)}elseif Gh.Key then local V=hh.Decrypt(X,Gh.Key)local I=r.Mode=="\071\101\116"and hh.Returnables[V]or hh.Commands[V]if I then local r={Yh.TrackTask("\082\101\109\111\116\101\058 "..V,I,v)}if not r[1]then logError(r[2])else return{o(r,2)}end end end end end,LogService=function(r,X) end,ErrorMessage=function(r,X,v)if r and(r~="\110\105\108"and(r~=""and(z.find(r,"\058\058 \065\100\111\110\105\115 \058\058")or z.find(r,Ah.Name)or v==Ah)))then logError(L(r)..(" - "..L(X)))end end,Chat=function(r)if not Yh.Player or Yh.Player.Parent~=Yh.Players then hh.Fire("\080\114\111\099\101\115\115\067\104\097\116",r)end end,CharacterAdded=function(...)Yh.Events.CharacterAdded:Fire(...)S()ph.GetHolder()end;CharacterRemoving=function()if jh.UIKeepAlive then for r,X in m,ch.GUIs do if X.Class=="\083\099\114\101\101\110\071\117\105"or X.Class=="\071\117\105\077\097\105\110"or X.Class=="\084\101\120\116\076\097\098\101\108"then if not(X.Object:IsA("\083\099\114\101\101\110\071\117\105")and not X.Object.ResetOnSpawn)and X.CanKeepAlive then X.KeepAlive=true X.KeepParent=X.Object.Parent X.Object.Parent=nil elseif not X.CanKeepAlive then j(X.Destroy,X)end end end end if jh.GuiViewFolder then jh.GuiViewFolder:Destroy()jh.GuiViewFolder=nil end if jh.ChatEnabled then Yh.StarterGui:SetCoreGuiEnabled("\067\104\097\116",true)end if jh.PlayerListEnabled then Yh.StarterGui:SetCoreGuiEnabled("\080\108\097\121\101\114\076\105\115\116",true)end local r=Yh.UserInputService:GetFocusedTextBox()if r then r:ReleaseFocus()end Yh.Events.CharacterRemoving:Fire()end}end
--// Processing
return function()
	local _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay =
		_G,
		game,
		script,
		getfenv,
		setfenv,
		workspace,
		getmetatable,
		setmetatable,
		loadstring,
		coroutine,
		rawequal,
		typeof,
		print,
		math,
		warn,
		error,
		pcall,
		xpcall,
		select,
		rawset,
		rawget,
		ipairs,
		pairs,
		next,
		Rect,
		Axes,
		os,
		time,
		Faces,
		unpack,
		string,
		Color3,
		newproxy,
		tostring,
		tonumber,
		Instance,
		TweenInfo,
		BrickColor,
		NumberRange,
		ColorSequence,
		NumberSequence,
		ColorSequenceKeypoint,
		NumberSequenceKeypoint,
		PhysicalProperties,
		Region3int16,
		Vector3int16,
		require,
		table,
		type,
		wait,
		Enum,
		UDim,
		UDim2,
		Vector2,
		Vector3,
		Region3,
		CFrame,
		Ray,
		delay

	local script = script
	local service = service
	local client = client
	local Anti, Core, Functions, Process, Remote, UI, Variables
	local function Init()
		UI = client.UI
		Anti = client.Anti
		Core = client.Core
		Variables = client.Variables
		Functions = client.Functions
		Process = client.Process
		Remote = client.Remote

		Process.Init = nil
	end

	local function RunLast()
		--[[client = service.ReadOnly(client, {
				[client.Variables] = true;
				[client.Handlers] = true;
				G_API = true;
				G_Access = true;
				G_Access_Key = true;
				G_Access_Perms = true;
				Allowed_API_Calls = true;
				HelpButtonImage = true;
				Finish_Loading = true;
				RemoteEvent = true;
				ScriptCache = true;
				Returns = true;
				PendingReturns = true;
				EncodeCache = true;
				DecodeCache = true;
				Received = true;
				Sent = true;
				Service = true;
				Holder = true;
				GUIs = true;
				LastUpdate = true;
				RateLimits = true;

				Init = true;
				RunLast = true;
				RunAfterInit = true;
				RunAfterLoaded = true;
				RunAfterPlugins = true;
			}, true)--]]

		Process.RunLast = nil
	end

	local function RunAfterLoaded(data)
		--// Events
		--service.NetworkClient.ChildRemoved:Connect(function() wait(30) client.Anti.Detected("crash", "Network client disconnected") end)
		--service.NetworkClient.ChildAdded:Connect(function() client.Anti.Detected("crash", "Network client reconnected?") end)
		service.Player.Chatted:Connect(service.EventTask("Event: ProcessChat", Process.Chat))
		service.Player.CharacterRemoving:Connect(
			service.EventTask("Event: CharacterRemoving", Process.CharacterRemoving)
		)
		service.Player.CharacterAdded:Connect(
			service.Threads.NewEventTask("Event: CharacterAdded", Process.CharacterAdded)
		)
		service.LogService.MessageOut:Connect(Process.LogService) --service.Threads.NewEventTask("EVENT:MessageOut",client.Process.LogService,60))
		service.ScriptContext.Error:Connect(Process.ErrorMessage) --service.Threads.NewEventTask("EVENT:ErrorMessage",client.Process.ErrorMessage,60))

		--// Get RateLimits
		Process.RateLimits = Remote.Get("RateLimits") or Process.RateLimits

		Process.RunAfterLoaded = nil
	end

	getfenv().client = nil
	getfenv().service = nil
	getfenv().script = nil

	client.Process = {
		Init = Init,
		RunLast = RunLast,
		RunAfterLoaded = RunAfterLoaded,
		RateLimits = { --// Defaults; Will be updated with server data at client run
			Remote = 0.02,
			Command = 0.1,
			Chat = 0.1,
			RateLog = 10,
		},

		Remote = function(data, com, ...)
			local args = { ... }
			Remote.Received = Remote.Received + 1
			if type(com) == "string" then
				if com == client.DepsName .. "GIVE_KEY" then
					if not Core.Key then
						log("~! Set remote key")
						Core.Key = args[1]

						log("~! Call Finish_Loading()")
						client.Finish_Loading()
					end
				elseif Remote.UnEncrypted[com] then
					return { Remote.UnEncrypted[com](...) }
				elseif Core.Key then
					local comString = Remote.Decrypt(com, Core.Key)
					local command = (data.Mode == "Get" and Remote.Returnables[comString]) or Remote.Commands[comString]
					if command then
						--local ran,err = pcall(command, args) --task service.Threads.RunTask("REMOTE:"..comString,command,args)
						local rets = { service.TrackTask("Remote: " .. comString, command, args) }
						if not rets[1] then
							logError(rets[2])
						else
							return { unpack(rets, 2) }
						end
					end
				end
			end
		end,

		LogService = function(Message, Type)
			--service.FireEvent("Output", Message, Type)
		end,

		ErrorMessage = function(Message, Trace, Script)
			--service.FireEvent("ErrorMessage", Message, Trace, Script)
			if
				Message
				and Message ~= "nil"
				and Message ~= ""
				and (string.find(Message, ":: Adonis ::") or string.find(Message, script.Name) or Script == script)
			then
				logError(tostring(Message) .. " - " .. tostring(Trace))
			end

			--if (Script == nil or (not Trace or Trace == "")) and not (Trace and string.find(Trace,"CoreGui.RobloxGui")) then
			--Anti.Detected("log","Scriptless/Traceless error found. Script: "..tostring(Script).." - Trace: "..tostring(Trace))
			--end
		end,

		Chat = function(msg)
			--service.FireEvent("Chat",msg)
			if not service.Player or service.Player.Parent ~= service.Players then
				Remote.Fire("ProcessChat", msg)
			end
		end,

		CharacterAdded = function(...)
			service.Events.CharacterAdded:Fire(...)

			wait()
			UI.GetHolder()
		end,

		CharacterRemoving = function()
			if Variables.UIKeepAlive then
				for ind, g in next, client.GUIs do
					if g.Class == "ScreenGui" or g.Class == "GuiMain" or g.Class == "TextLabel" then
						if not (g.Object:IsA("ScreenGui") and not g.Object.ResetOnSpawn) and g.CanKeepAlive then
							g.KeepAlive = true
							g.KeepParent = g.Object.Parent
							g.Object.Parent = nil
						elseif not g.CanKeepAlive then
							pcall(g.Destroy, g)
						end
					end
				end
			end

			if Variables.GuiViewFolder then
				Variables.GuiViewFolder:Destroy()
				Variables.GuiViewFolder = nil
			end

			if Variables.ChatEnabled then
				service.StarterGui:SetCoreGuiEnabled("Chat", true)
			end

			if Variables.PlayerListEnabled then
				service.StarterGui:SetCoreGuiEnabled("PlayerList", true)
			end

			local textbox = service.UserInputService:GetFocusedTextBox()
			if textbox then
				textbox:ReleaseFocus()
			end

			service.Events.CharacterRemoving:Fire()
		end,
	}
end
