return function(W)local S=W.Server local v=W.Service local G=S.Settings local A,R,f,N,a,P,o,k,I,i,r local function K()A=S.Functions f=S.Admin N=S.Anti a=S.Core P=S.HTTP o=S.Logs k=S.Remote I=S.Process i=S.Variables R=S.Commands r=S.Deps setmetatable(R,{__index=function(W,S)local v=f.CommandCache[S:lower()]if v then return rawget(R,v)end end;__newindex=function(W,S,v)rawset(R,S,v)if v and(type(v)=="\116\097\098\108\101"and(v.Commands and v.Prefix))then for W,G in next,v.Commands do f.PrefixCache[v.Prefix]=true f.CommandCache[(v.Prefix..G):lower()]=S end end end})o:AddLog("\083\099\114\105\112\116","\076\111\097\100\105\110\103 \067\111\109\109\097\110\100 \077\111\100\117\108\101\115\046\046\046")if S.CommandModules then for S,v in next,S.CommandModules:GetChildren()do local G=require(v)local A,f=pcall(G,W,getfenv())if A and(f and type(f)=="\116\097\098\108\101")then for W,S in next,f do R[W]=S end o:AddLog("\083\099\114\105\112\116","\076\111\097\100\101\100 \067\111\109\109\097\110\100 \077\111\100\117\108\101\058 "..v.Name)elseif not A then warn("\067\077\068\077\079\068\085\076\069 "..(v.Name.." \102\097\105\108\101\100 \116\111 \108\111\097\100\058"))warn(tostring(f))o:AddLog("\083\099\114\105\112\116","\076\111\097\100\105\110\103 \067\111\109\109\097\110\100 \077\111\100\117\108\101 \070\097\105\108\101\100\058 "..v.Name)end end end f.CacheCommands()o:AddLog("\083\099\114\105\112\116","\067\111\109\109\097\110\100\115 \077\111\100\117\108\101 \073\110\105\116\105\097\108\105\122\101\100")end S.Commands={Init=K}end
--// Commands
--// Highly recommended you disable Intellesense before editing this...
return function(Vargs)
	local server = Vargs.Server
	local service = Vargs.Service
	local Settings = server.Settings
	local Functions, Commands, Admin, Anti, Core, HTTP, Logs, Remote, Process, Variables, Deps

	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
		Commands = server.Commands
		Deps = server.Deps

		--// Automatic New Command Caching and Ability to do server.Commands[":ff"]
		setmetatable(Commands, {
			__index = function(self, ind)
				local targInd = Admin.CommandCache[ind:lower()]
				if targInd then
					return rawget(Commands, targInd)
				end
			end,

			__newindex = function(self, ind, val)
				rawset(Commands, ind, val)
				if val and type(val) == "table" and val.Commands and val.Prefix then
					for i, cmd in next, val.Commands do
						Admin.PrefixCache[val.Prefix] = true
						Admin.CommandCache[(val.Prefix .. cmd):lower()] = ind
					end
				end
			end,
		})

		Logs:AddLog("Script", "Loading Command Modules...")

		--// Load command modules
		if server.CommandModules then
			for i, module in next, server.CommandModules:GetChildren() do
				local func = require(module)
				local ran, tab = pcall(func, Vargs, getfenv())

				if ran and tab and type(tab) == "table" then
					for ind, cmd in next, tab do
						Commands[ind] = cmd
					end

					Logs:AddLog("Script", "Loaded Command Module: " .. module.Name)
				elseif not ran then
					warn("CMDMODULE " .. module.Name .. " failed to load:")
					warn(tostring(tab))
					Logs:AddLog("Script", "Loading Command Module Failed: " .. module.Name)
				end
			end
		end

		--// Cache commands
		Admin.CacheCommands()

		Logs:AddLog("Script", "Commands Module Initialized")
	end

	server.Commands = {
		Init = Init,
	}
end
