return function(N,V)local A=V(nil,{script=script})setfenv(1,A)local i=N.Server local t=N.Service local G,K,o,R,x,r,g,B,T,W local function U()G=i.Functions K=i.Admin o=i.Anti R=i.Core x=i.HTTP r=i.Logs g=i.Remote B=i.Process T=i.Variables W=i.Settings T.BanMessage=W.BanMessage T.LockMessage=W.LockMessage for N,V in ipairs(W.MusicList or{})do table.insert(T.MusicList,V)end for N,V in ipairs(W.InsertList or{})do table.insert(T.InsertList,V)end for N,V in ipairs(W.CapeList or{})do table.insert(T.Capes,V)end T.Init=nil r: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 p(N)i.Variables.CodeName=i.Functions:GetRandom()T.RunAfterInit=nil r: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 a=t.Lighting i.Variables={Init=U,RunAfterInit=p,ZaWarudo=false,CodeName=math.random();IsStudio=t.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=a.Ambient,OutdoorAmbient=a.OutdoorAmbient,Brightness=a.Brightness,TimeOfDay=a.TimeOfDay,FogColor=a.FogColor,FogEnd=a.FogEnd;FogStart=a.FogStart,GlobalShadows=a.GlobalShadows;Outlines=a.Outlines,ShadowColor=a.ShadowColor;ColorShift_Bottom=a.ColorShift_Bottom,ColorShift_Top=a.ColorShift_Top,GeographicLatitude=a.GeographicLatitude,Name=a.Name},OriginalLightingSettings={Ambient=a.Ambient;OutdoorAmbient=a.OutdoorAmbient;Brightness=a.Brightness,TimeOfDay=a.TimeOfDay,FogColor=a.FogColor,FogEnd=a.FogEnd,FogStart=a.FogStart,GlobalShadows=a.GlobalShadows;Outlines=a.Outlines,ShadowColor=a.ShadowColor;ColorShift_Bottom=a.ColorShift_Bottom;ColorShift_Top=a.ColorShift_Top,GeographicLatitude=a.GeographicLatitude;Name=a.Name;Sky=a:FindFirstChildOfClass("\083\107\121")and(a:FindFirstChildOfClass("\083\107\121")):Clone()};PMtickets={};HelpRequests={};Objects={},InsertedObjects={},CommandLoops={};SavedTools={},Waypoints={};Cameras={},Jails={},LocalEffects={};SizedCharacters={},BundleCache={},TrackingTable={},DisguiseBindings={};IncognitoPlayers={};MusicList={{Name="\101\112\105\099",ID=27697743},{Name="\104\097\108\111",ID=1034065},{Name="\099\117\114\115\101\100",ID=1372257};{Name="\101\120\116\114\101\109\101";ID=11420933};{Name="\116\097\099\111\115";ID=142376088};{Name="\097\119\097\107\101\110",ID=27697277};{Name="\109\097\114\105\111",ID=1280470},{Name="\099\104\114\111\110\111";ID=1280463},{Name="\100\111\116\114";ID=11420922};{Name="\101\110\116\101\114\116\097\105\110",ID=27697267},{Name="\102\097\110\116\097\115\121";ID=1280473},{Name="\102\105\110\097\108";ID=1280414};{Name="\101\109\098\108\101\109";ID=1372259};{Name="\102\108\105\103\104\116",ID=27697719};{Name="\103\111\116\104\105\099",ID=27697743},{Name="\104\105\112\104\111\112",ID=27697735};{Name="\105\110\116\114\111";ID=27697707};{Name="\109\117\108\101";ID=1077604},{Name="\102\105\108\109",ID=27697713},{Name="\115\099\104\097\108\097";ID=5985787},{Name="\116\117\110\110\101\108";ID=9650822},{Name="\115\112\097\110\105\115\104",ID=5982975};{Name="\118\101\110\111\109",ID=1372262};{Name="\103\117\105\116\097\114";ID=5986151},{Name="\104\097\114\100\115\116\121\108\101",ID=1839246774},{Name="\099\114\097\098\114\097\118\101",ID=5410086218}};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=i.Settings.BlacklistEnabled~=nil and i.Settings.BlacklistEnabled or true;Lists={Settings=i.Settings.Blacklist}};Whitelist={Enabled=i.Settings.WhitelistEnabled;Lists={Settings=i.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 ipairs(Settings.MusicList or {}) do table.insert(Variables.MusicList, v) end
		for _, v in ipairs(Settings.InsertList or {}) do table.insert(Variables.InsertList, v) end
		for _, v in ipairs(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 = "epic", 	ID = 27697743}, -- Zero Project - Gothic
			{Name = "halo", 	ID = 1034065}, -- Halo Theme
			{Name = "cursed", 	ID = 1372257}, -- Cursed Abbey
			{Name = "extreme", 	ID = 11420933}, -- TOPW
			{Name = "tacos", 	ID = 142376088}, -- Parry Gripp - Raining Tacos
			{Name = "awaken", 	ID = 27697277}, -- Positively Dark - Awakening
			{Name = "mario", 	ID = 1280470}, -- SM64 Theme
			{Name = "chrono", 	ID = 1280463}, -- Chrono Trigger Theme
			{Name = "dotr", 	ID = 11420922}, -- DOTR | ▼ --- ▼ I do not speak tags
			{Name = "entertain", 	ID = 27697267}, -- ##### ###### - Entertainer Rag
			{Name = "fantasy", 	ID = 1280473}, -- FFVII Battle AC
			{Name = "final", 	ID = 1280414}, -- Final Destination
			{Name = "emblem", 	ID = 1372259}, -- Fire Emblem
			{Name = "flight", 	ID = 27697719}, -- Daniel Bautista - Flight of the Bumblebee
			{Name = "gothic", 	ID = 27697743}, -- Zero Project - Gothic
			{Name = "hiphop", 	ID = 27697735}, -- Jeff Syndicate - Hip Hop
			{Name = "intro", 	ID = 27697707}, -- Daniel Bautista - Intro
			{Name = "mule", 	ID = 1077604}, -- M.U.L.E
			{Name = "film", 	ID = 27697713}, -- Daniel Bautista - Music for a Film
			{Name = "schala", 	ID = 5985787}, -- Schala
			{Name = "tunnel",	ID = 9650822}, -- S4Tunnel
			{Name = "spanish", 	ID = 5982975}, -- TheBuzzer
			{Name = "venom", 	ID = 1372262}, -- Star Fox Theme
			{Name = "guitar", 	ID = 5986151}, -- 5986151
			{Name = "hardstyle", 	ID = 1839246774}, -- Hardstyle
			{Name = "crabrave", 	ID = 5410086218}, -- Noisestorm - Crab Rave
		};

		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

