for r,i in ipairs(script:GetChildren())do if debugInit then print("-----------------------------------------------")end local j=i.Name Directory[j]={}local t=Directory[j]for r,i in ipairs(i:GetDescendants())do if i.ClassName=="\077\111\100\117\108\101\083\099\114\105\112\116"then local r=require(i)for r,i in pairs(r)do t[r]=i if debugInit then print(r,i)end end end end if debugInit then print("-----------------------------------------------\n\076\079\065\068\069\068 "..j)end end function Directory.NumberIDs(r)return#script[r]:GetChildren()end
--- Iterate through (physical) directory
for _, dirFolder in ipairs(script:GetChildren()) do
	--- Debug
	if debugInit then
		print("-----------------------------------------------")
	end

	--- Setup directory
	local dirName = dirFolder.Name
	Directory[dirName] = {}
	local dirData = Directory[dirName]

	--- Folder? Scan it!
	for _, module in ipairs(dirFolder:GetDescendants()) do
		if module.ClassName == "ModuleScript" then
			--- Add module to directory
			local moduleData = require(module)
			for key, value in pairs(moduleData) do
				dirData[key] = value
				if debugInit then
					print(key, value)
				end
			end
		end
	end

	--- Debug
	if debugInit then
		print("-----------------------------------------------\nLOADED " .. dirName)
	end
end

function Directory.NumberIDs(dirFolderName)
	return #script[dirFolderName]:GetChildren()
end
