local LoadedModules = require(script.LoadedModules)
for _, Descendant in script:GetDescendants() do
if Descendant.ClassName ~= "ModuleScript" or Descendant:GetAttribute("Ignore") then
continue
end
local RequiredModule = require(Descendant)
LoadedModules[
Descendant.Name ] = RequiredModule
end
for _, Module in LoadedModules do
if type(Module.Modules) == "table" then
Module.Modules = LoadedModules
end
end
for _, Module in LoadedModules do
if type(Module.Init) == "function" then
Module.Init()
end
end
вроде это