Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
-- Variables: local Cache = {} -- Main Module: local ModuleLoader = {} function ModuleLoader.Get(Name: string) local Module = Cache[Name] if not Module then warn(`[ModuleLoader]: Module '{Name}' has not been loaded`) end return Module end function ModuleLoader.Load(List: { ModuleScript | Folder }) for _, V in List do if V:IsA("ModuleScript") then local Success, Module = pcall(require, V) if Success then Cache[V.Name] = Module if Module.Init then task.defer(Module.Init, Module) end else warn(`[ModuleLoader]: Failed to load module '{V:GetFullName()}'`) end elseif V:IsA("Folder") then ModuleLoader.Load(V:GetChildren()) end end end return ModuleLoader
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)