return function(k,J)local g=J(nil,{script=script})setfenv(1,g)local b=k.Server local I=k.Service local D,f,R,U,u,N,P,C,Y,Z local function d()D=b.Functions f=b.Admin R=b.Anti U=b.Core u=b.HTTP N=b.Logs P=b.Remote C=b.Process Y=b.Variables Z=b.Settings Y.BanMessage=Z.BanMessage Y.LockMessage=Z.LockMessage for k,J in Z.MusicList or{}do table.insert(Y.MusicList,J)end for k,J in Z.InsertList or{}do table.insert(Y.InsertList,J)end for k,J in Z.CapeList or{}do table.insert(Y.Capes,J)end Y.Init=nil N:AddLog("\083\099\114\105\112\116","\086\097\114\105\097\098\108\101\115 \077\111\100\117\108\101 \073\110\105\116\105\097\108\105\122\101\100")end local function m(k)b.Variables.CodeName=b.Functions:GetRandom()Y.RunAfterInit=nil N:AddLog("\083\099\114\105\112\116","\070\105\110\105\115\104\101\100 \086\097\114\105\097\098\108\101\115 \065\102\116\101\114\073\110\105\116")end local Q=I.Lighting b.Variables={Init=d;RunAfterInit=m;ZaWarudo=false;CodeName=math.random(),IsStudio=I.RunService:IsStudio(),AuthorizedToReply={};FrozenObjects={};ScriptBuilder={};CachedDonors={},BanMessage="\066\097\110\110\101\100",LockMessage="\078\111\116 \087\104\105\116\101\108\105\115\116\101\100";DonorPass={1348327,1990427;1911740,167686;98593,"\054\056\055\056\053\049\048\054\048\053",5212082,5212081};WebPanel_Initiated=false;LightingSettings={Ambient=Q.Ambient;OutdoorAmbient=Q.OutdoorAmbient,Brightness=Q.Brightness,TimeOfDay=Q.TimeOfDay;FogColor=Q.FogColor;FogEnd=Q.FogEnd;FogStart=Q.FogStart;GlobalShadows=Q.GlobalShadows,Outlines=Q.Outlines,ShadowColor=Q.ShadowColor,ColorShift_Bottom=Q.ColorShift_Bottom,ColorShift_Top=Q.ColorShift_Top;GeographicLatitude=Q.GeographicLatitude,Name=Q.Name};OriginalLightingSettings={Ambient=Q.Ambient,OutdoorAmbient=Q.OutdoorAmbient;Brightness=Q.Brightness;TimeOfDay=Q.TimeOfDay;FogColor=Q.FogColor,FogEnd=Q.FogEnd,FogStart=Q.FogStart,GlobalShadows=Q.GlobalShadows;Outlines=Q.Outlines;ShadowColor=Q.ShadowColor;ColorShift_Bottom=Q.ColorShift_Bottom,ColorShift_Top=Q.ColorShift_Top;GeographicLatitude=Q.GeographicLatitude;Name=Q.Name,Sky=Q:FindFirstChildOfClass("\083\107\121")and(Q:FindFirstChildOfClass("\083\107\121")):Clone()},PMtickets={},HelpRequests={},Objects={};InsertedObjects={},CommandLoops={};SavedTools={},Waypoints={},Cameras={},Jails={};LocalEffects={},SizedCharacters={};BundleCache={},TrackingTable={},DisguiseBindings={},IncognitoPlayers={};MusicList={{Name="\099\114\097\098\114\097\118\101",ID=5410086218};{Name="\115\104\105\097\119\097\115\101";ID=5409360995};{Name="\117\110\099\104\097\114\116\101\100\119\097\116\101\114\115";ID=7028907200};{Name="\103\108\111\119",ID=7028856935},{Name="\103\111\111\100\052\109\101",ID=7029051434};{Name="\098\108\111\111\109",ID=7029024726},{Name="\115\097\102\101\038\115\111\117\110\100",ID=7024233823};{Name="\115\104\097\107\117",ID=7024332460};{Name="\102\114\111\109\100\117\115\116\038\097\115\104\101\115",ID=7024254685};{Name="\108\111\118\101\105\115",ID=7029092469};{Name="\112\108\097\121\105\116\099\111\111\108";ID=7029017448};{Name="\115\116\105\108\108";ID=7023771708};{Name="\115\108\101\101\112",ID=7023407320};{Name="\119\104\097\116\097\114\101\121\111\117\119\097\105\116\105\110\103\102\111\114",ID=7028977687};{Name="\098\097\108\097\099\101";ID=7024183256},{Name="\098\114\111\107\101\110\103\108\097\115\115";ID=7028799370};{Name="\116\104\101\108\097\110\103\117\097\103\101\111\102\097\110\103\101\108\115",ID=7029031068};{Name="\105\109\112\114\105\110\116\115",ID=7023704173},{Name="\102\111\117\110\100\097\114\101\097\115\111\110",ID=7028919492},{Name="\110\101\119\104\111\114\105\122\111\110\115",ID=7028518546};{Name="\119\104\097\116\115\105\116\108\105\107\101",ID=7028997537};{Name="\100\101\115\116\114\111\121\109\101",ID=7023617400};{Name="\099\111\110\115\101\108\108\097\116\105\111\110\115";ID=7023733671};{Name="\119\105\115\104",ID=7023670701};{Name="\115\097\109\101\109\105\115\116\097\107\101";ID=7024101188};{Name="\119\104\101\114\101\105\098\101\108\111\110\103";ID=7028527348},{Name="\114\097\105\110\105\110\103\116\097\099\111\115",ID=142376088}};InsertList={},Capes={{Name="\099\114\111\115\115\111\116\097",Material="\078\101\111\110";Color="\067\121\097\110";ID=420260457};{Name="\106\097\109\105\101\106\114\057\057",Material="\078\101\111\110";Color="\067\097\115\104\109\101\114\101",ID=429297485};{Name="\110\101\119 \121\101\108\108\101\114",Material="\070\097\098\114\105\099";Color="\078\101\119 \089\101\108\108\101\114"};{Name="\112\097\115\116\101\108 \098\108\117\101";Material="\070\097\098\114\105\099",Color="\080\097\115\116\101\108 \066\108\117\101"},{Name="\100\117\115\116\121 \114\111\115\101",Material="\070\097\098\114\105\099";Color="\068\117\115\116\121 \082\111\115\101"},{Name="\099\103\097 \098\114\111\119\110",Material="\070\097\098\114\105\099",Color="\067\071\065 \098\114\111\119\110"},{Name="\114\097\110\100\111\109",Material="\070\097\098\114\105\099";Color=(BrickColor.random()).Name},{Name="\115\104\105\110\121";Material="\080\108\097\115\116\105\099";Color="\073\110\115\116\105\116\117\116\105\111\110\097\108 \119\104\105\116\101",Reflectance=1};{Name="\103\111\108\100";Material="\080\108\097\115\116\105\099";Color="\066\114\105\103\104\116 \121\101\108\108\111\119";Reflectance=.4};{Name="\107\111\104\108",Material="\070\097\098\114\105\099";Color="\082\101\097\108\108\121 \098\108\097\099\107",ID=108597653};{Name="\115\099\114\105\112\116",Material="\080\108\097\115\116\105\099",Color="\087\104\105\116\101",ID=151359194};{Name="\098\097\116\109\097\110";Material="\070\097\098\114\105\099",Color="\073\110\115\116\105\116\117\116\105\111\110\097\108 \119\104\105\116\101",ID=108597669};{Name="\101\112\105\120",Material="\080\108\097\115\116\105\099",Color="\082\101\097\108\108\121 \098\108\097\099\107";ID=149442745},{Name="\115\117\112\101\114\109\097\110",Material="\070\097\098\114\105\099";Color="\066\114\105\103\104\116 \098\108\117\101",ID=108597677};{Name="\115\119\097\103";Material="\070\097\098\114\105\099",Color="\080\105\110\107",ID=109301474};{Name="\100\111\110\111\114";Material="\080\108\097\115\116\105\099";Color="\087\104\105\116\101",ID=149009184},{Name="\103\111\109\111\100\101\114\110",Material="\080\108\097\115\116\105\099",Color="\082\101\097\108\108\121 \098\108\097\099\107";ID=149438175},{Name="\097\100\109\105\110",Material="\080\108\097\115\116\105\099",Color="\087\104\105\116\101",ID=149092195},{Name="\103\105\111\118\097\110\110\105\115";Material="\080\108\097\115\116\105\099";Color="\087\104\105\116\101",ID=149808729},{Name="\103\111\100\111\102\100\111\110\117\116\115";Material="\080\108\097\115\116\105\099";Color="\073\110\115\116\105\116\117\116\105\111\110\097\108 \119\104\105\116\101";ID=151034443},{Name="\104\111\115\116",Material="\080\108\097\115\116\105\099";Color="\082\101\097\108\108\121 \098\108\097\099\107",ID=152299000};{Name="\099\111\104\111\115\116",Material="\080\108\097\115\116\105\099",Color="\082\101\097\108\108\121 \098\108\097\099\107",ID=152298950},{Name="\116\114\097\105\110\101\114";Material="\080\108\097\115\116\105\099",Color="\082\101\097\108\108\121 \098\108\097\099\107";ID=152298976};{Name="\098\097";Material="\080\108\097\115\116\105\099";Color="\087\104\105\116\101";ID=172528001}};Blacklist={Enabled=b.Settings.BlacklistEnabled~=nil and b.Settings.BlacklistEnabled or true;Lists={Settings=b.Settings.Blacklist}},Whitelist={Enabled=b.Settings.WhitelistEnabled,Lists={Settings=b.Settings.Whitelist}}}end

return function(Vargs, GetEnv)
	local env = GetEnv(nil, {script = script})
	setfenv(1, env)

	local server = Vargs.Server
	local service = Vargs.Service

	local Functions, Admin, Anti, Core, HTTP, Logs, Remote, Process, Variables, Settings
	local function Init()
		Functions = server.Functions
		Admin = server.Admin
		Anti = server.Anti
		Core = server.Core
		HTTP = server.HTTP
		Logs = server.Logs
		Remote = server.Remote
		Process = server.Process
		Variables = server.Variables
		Settings = server.Settings

		Variables.BanMessage = Settings.BanMessage
		Variables.LockMessage = Settings.LockMessage

		for _, v in Settings.MusicList or {} do table.insert(Variables.MusicList, v) end
		for _, v in Settings.InsertList or {} do table.insert(Variables.InsertList, v) end
		for _, v in Settings.CapeList or {} do table.insert(Variables.Capes, v) end

		Variables.Init = nil
		Logs:AddLog("Script", "Variables Module Initialized")
	end

	local function AfterInit(data)
		server.Variables.CodeName = server.Functions:GetRandom()

		Variables.RunAfterInit = nil
		Logs:AddLog("Script", "Finished Variables AfterInit")
	end

	local Lighting = service.Lighting
	server.Variables = {
		Init = Init,
		RunAfterInit = AfterInit,
		ZaWarudo = false,
		CodeName = math.random(),
		IsStudio = service.RunService:IsStudio(), -- Used to check if Adonis is running inside Roblox Studio as things like TeleportService and DataStores (if API Access is disabled) do not work in Studio
		AuthorizedToReply = {},
		FrozenObjects = {},
		ScriptBuilder = {},
		CachedDonors = {},
		BanMessage = "Banned",
		LockMessage = "Not Whitelisted",
		DonorPass = {1348327, 1990427, 1911740, 167686, 98593, "6878510605", 5212082, 5212081}, --// Strings are items; numbers are gamepasses
		WebPanel_Initiated = false,
		LightingSettings = {
			Ambient = Lighting.Ambient,
			OutdoorAmbient = Lighting.OutdoorAmbient,
			Brightness = Lighting.Brightness,
			TimeOfDay = Lighting.TimeOfDay,
			FogColor = Lighting.FogColor,
			FogEnd = Lighting.FogEnd,
			FogStart = Lighting.FogStart,
			GlobalShadows = Lighting.GlobalShadows,
			Outlines = Lighting.Outlines,
			ShadowColor = Lighting.ShadowColor,
			ColorShift_Bottom = Lighting.ColorShift_Bottom,
			ColorShift_Top = Lighting.ColorShift_Top,
			GeographicLatitude = Lighting.GeographicLatitude,
			Name = Lighting.Name,
		},

		OriginalLightingSettings = {
			Ambient = Lighting.Ambient,
			OutdoorAmbient = Lighting.OutdoorAmbient,
			Brightness = Lighting.Brightness,
			TimeOfDay = Lighting.TimeOfDay,
			FogColor = Lighting.FogColor,
			FogEnd = Lighting.FogEnd,
			FogStart = Lighting.FogStart,
			GlobalShadows = Lighting.GlobalShadows,
			Outlines = Lighting.Outlines,
			ShadowColor = Lighting.ShadowColor,
			ColorShift_Bottom = Lighting.ColorShift_Bottom,
			ColorShift_Top = Lighting.ColorShift_Top,
			GeographicLatitude = Lighting.GeographicLatitude,
			Name = Lighting.Name,
			Sky = Lighting:FindFirstChildOfClass("Sky") and Lighting:FindFirstChildOfClass("Sky"):Clone(),
		},

		PMtickets = {};

		HelpRequests = {};

		Objects = {};

		InsertedObjects = {};

		CommandLoops = {};

		SavedTools = {};

		Waypoints = {};

		Cameras = {};

		Jails = {};

		LocalEffects = {};

		SizedCharacters = {};

		BundleCache = {};

		TrackingTable = {};

		DisguiseBindings = {};

		IncognitoPlayers = {};

		MusicList = {
			{Name = "crabrave", 				ID = 5410086218},
			{Name = "shiawase", 				ID = 5409360995},
			{Name = "unchartedwaters", 			ID = 7028907200},
			{Name = "glow", 				ID = 7028856935},
			{Name = "good4me", 				ID = 7029051434},
			{Name = "bloom", 				ID = 7029024726},
			{Name = "safe&sound", 				ID = 7024233823},
			{Name = "shaku", 				ID = 7024332460},
			{Name = "fromdust&ashes", 			ID = 7024254685},
			{Name = "loveis", 				ID = 7029092469},
			{Name = "playitcool", 				ID = 7029017448},
			{Name = "still", 				ID = 7023771708},
			{Name = "sleep", 				ID = 7023407320},
			{Name = "whatareyouwaitingfor", 		ID = 7028977687},
			{Name = "balace", 				ID = 7024183256},
			{Name = "brokenglass", 				ID = 7028799370},
			{Name = "thelanguageofangels", 			ID = 7029031068},
			{Name = "imprints", 				ID = 7023704173},
			{Name = "foundareason", 			ID = 7028919492},
			{Name = "newhorizons", 				ID = 7028518546},
			{Name = "whatsitlike", 				ID = 7028997537},
			{Name = "destroyme",				ID = 7023617400},
			{Name = "consellations", 			ID = 7023733671},
			{Name = "wish", 				ID = 7023670701},
			{Name = "samemistake", 				ID = 7024101188},
			{Name = "whereibelong", 			ID = 7028527348},
			{Name = "rainingtacos", 			ID = 142376088},
		};

		InsertList = {};

		Capes = {
			{Name = "crossota", 	Material = "Neon", 	Color = "Cyan", 			ID = 420260457},
			{Name = "jamiejr99", 	Material = "Neon", 	Color = "Cashmere",			ID = 429297485},
			{Name = "new yeller", 	Material = "Fabric", 	Color = "New Yeller"},
			{Name = "pastel blue", 	Material = "Fabric", 	Color = "Pastel Blue"},
			{Name = "dusty rose", 	Material = "Fabric", 	Color = "Dusty Rose"},
			{Name = "cga brown", 	Material = "Fabric", 	Color = "CGA brown"},
			{Name = "random", 	Material = "Fabric", 	Color = (BrickColor.random()).Name},
			{Name = "shiny", 	Material = "Plastic", 	Color = "Institutional white",		Reflectance = 1},
			{Name = "gold",		Material = "Plastic", 	Color = "Bright yellow",		Reflectance = 0.4},
			{Name = "kohl",		Material = "Fabric", 	Color = "Really black", 		ID = 108597653},
			{Name = "script", 	Material = "Plastic", 	Color = "White", 			ID = 151359194},
			{Name = "batman", 	Material = "Fabric", 	Color = "Institutional white", 		ID = 108597669},
			{Name = "epix", 	Material = "Plastic", 	Color = "Really black", 		ID = 149442745},
			{Name = "superman", 	Material = "Fabric", 	Color = "Bright blue", 			ID = 108597677},
			{Name = "swag", 	Material = "Fabric", 	Color = "Pink", 			ID = 109301474},
			{Name = "donor", 	Material = "Plastic", 	Color = "White", 			ID = 149009184},
			{Name = "gomodern", 	Material = "Plastic", 	Color = "Really black", 		ID = 149438175},
			{Name = "admin", 	Material = "Plastic", 	Color = "White", 			ID = 149092195},
			{Name = "giovannis", 	Material = "Plastic", 	Color = "White", 			ID = 149808729},
			{Name = "godofdonuts", 	Material = "Plastic", 	Color = "Institutional white",		ID = 151034443},
			{Name = "host", 	Material = "Plastic", 	Color = "Really black", 		ID = 152299000},
			{Name = "cohost", 	Material = "Plastic", 	Color = "Really black", 		ID = 152298950},
			{Name = "trainer",	Material = "Plastic", 	Color = "Really black", 		ID = 152298976},
			{Name = "ba", 		Material = "Plastic", 	Color = "White", 			ID = 172528001}
		};

		Blacklist = {
			Enabled = (server.Settings.BlacklistEnabled ~= nil and server.Settings.BlacklistEnabled) or true,
			Lists = {
				Settings = server.Settings.Blacklist
			},
		};

		Whitelist = {
			Enabled = server.Settings.WhitelistEnabled,
			Lists = {
				Settings = server.Settings.Whitelist
			},
		};
	}
end
