local X=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local l=game:GetService("\083\101\114\118\101\114\083\099\114\105\112\116\083\101\114\118\105\099\101")local x=game:GetService("\082\117\110\083\101\114\118\105\099\101")local I=require(script.LegacyLoader)local Q=require(script.StaticLegacyLoader)local U=require(script.LoaderUtils)local a,W if x:IsRunning()then a=I.new(script)W={__call=function(X,l)return a:Require(l)end,__index=function(X,l)return a:Require(l)end}else a=Q.new()W={__call=function(X,l)local x=getfenv(2)return a:Require(x.script,l)end,__index=function(X,l)local x=getfenv(2)return a:Require(x.script,l)end}end


local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")
local RunService = game:GetService("RunService")

local LegacyLoader = require(script.LegacyLoader)
local StaticLegacyLoader = require(script.StaticLegacyLoader)
local LoaderUtils = require(script.LoaderUtils)

local loader, metatable
if RunService:IsRunning() then
	loader = LegacyLoader.new(script)
	metatable = {
		__call = function(_self, value)
			return loader:Require(value)
		end;
		__index = function(_self, key)
			return loader:Require(key)
		end;
	}
else
	loader = StaticLegacyLoader.new()
	metatable = {
		__call = function(_self, value)
			local env = getfenv(2)
			return loader:Require(env.script, value)
		end;
		__index = function(_self, key)
			local env = getfenv(2)
			return loader:Require(env.script, key)
		end;
	}
end
