--[=[
	Returns a function that can be used to load modules relative
	to the script specified.

	```lua
	local require = require(script.Parent.loader).load(script)

	local maid = require("Maid")
	```

	@function load
	@param script Script -- The script to load dependencies for.
	@return (moduleReference: ModuleReference) -> any
	@within Loader
]=]

local function handleLoad(moduleScript)
	assert(typeof(moduleScript) == "Instance", "Bad moduleScript")

	return loader:GetLoader(moduleScript)
end

return setmetatable({
	load = handleLoad;
	bootstrapGame = bootstrapGame;
}, metatable)
