local a={}function a.LoadChildren(a)local k={}for a,V in ipairs(a:GetChildren())do if V:IsA("\077\111\100\117\108\101\083\099\114\105\112\116")then local a=require(V)table.insert(k,a)end end return k end function a.LoadDescendants(a)local k={}for a,V in ipairs(a:GetDescendants())do if V:IsA("\077\111\100\117\108\101\083\099\114\105\112\116")then local a=require(V)table.insert(k,a)end end return k end return a
--[[

	Loads all ModuleScripts within the given parent.

	Loader.LoadChildren(parent: Instance): module[]
	Loader.LoadDescendants(parent: Instance): module[]

--]]

local Loader = {}

function Loader.LoadChildren(parent)
	local modules = {}
	for _, child in ipairs(parent:GetChildren()) do
		if child:IsA("ModuleScript") then
			local m = require(child)
			table.insert(modules, m)
		end
	end
	return modules
end

function Loader.LoadDescendants(parent)
	local modules = {}
	for _, descendant in ipairs(parent:GetDescendants()) do
		if descendant:IsA("ModuleScript") then
			local m = require(descendant)
			table.insert(modules, m)
		end
	end
	return modules
end

return Loader
