for M,D in ipairs(script:GetChildren())do if debugInit then print("-----------------------------------------------")end local e=D.Name Directory[e]={}local k=Directory[e]for M,D in ipairs(D:GetDescendants())do if D.ClassName=="\077\111\100\117\108\101\083\099\114\105\112\116"then local M=require(D)for M,D in pairs(M)do k[M]=D if debugInit then print(M,D)end end end end if debugInit then print("-----------------------------------------------\n\076\079\065\068\069\068 "..e)end end function Directory.NumberIDs(M)return#script[M]:GetChildren()end

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
