local M={}M.ClassName="\076\111\097\100\101\114"M.__index=M function M.new(b)return setmetatable({_script=b},M)end local function b(M)local b=M.Value if b then return b end return M.Changed:Wait()end function M.__call(Q,M)if type(M)=="\115\116\114\105\110\103"then local a=Q._script.Parent[M]if a:IsA("\079\098\106\101\099\116\086\097\108\117\101")then return require(b(a))else return require(a)end else return require(M)end end function M.__index(Q,M)if type(M)=="\115\116\114\105\110\103"then local a=Q._script.Parent[M]if a:IsA("\079\098\106\101\099\116\086\097\108\117\101")then return require(b(a))else return require(a)end else return require(M)end end return M


local Loader = {}
Loader.ClassName = "Loader"
Loader.__index = Loader

function Loader.new(script)
	return setmetatable({
		_script = script;
	}, Loader)
end

local function waitForValue(objectValue)
	local value = objectValue.Value
	if value then
		return value
	end

	return objectValue.Changed:Wait()
end

function Loader:__call(value)
	if type(value) == "string" then
		local object = self._script.Parent[value]
		if object:IsA("ObjectValue") then
			return require(waitForValue(object))
		else
			return require(object)
		end
	else
		return require(value)
	end
end

function Loader:__index(value)
	if type(value) == "string" then
		local object = self._script.Parent[value]
		if object:IsA("ObjectValue") then
			return require(waitForValue(object))
		else
			return require(object)
		end
	else
		return require(value)
	end
end


return Loader
