A powerful Luau module loader and utility library for Roblox.
Project details
GMLK, or Grumy's Module Loader Kit, provides a streamlined client and server module startup pattern along with essential Luau utilities. Designed to enhance Roblox projects, it simplifies the management of modules, remotes, and signals, helping developers to create more organized and responsive games.
GMLK, short for Grumy's Module Loader Kit, is an essential open-source framework designed specifically for Roblox developers. It provides a streamlined client and server module startup pattern, equipped with practical Luau utilities that enhance the development experience. With features that support remotes, signals, time management, numerical operations, and much more, GMLK simplifies the process of creating robust Roblox games.
require: While GMLK enhances module loading, it does not replace Roblox's built-in require function, allowing for flexibility in how modules are loaded and utilized.To illustrate how GMLK operates, consider the following code snippet which defines a lifecycle module for managing coins:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local GMLK = require(ReplicatedStorage.Modules.Library.GMLK)
local Coins = { Priority = 10 }
function Coins:Init()
self.Amount = 0
self.Changed = GMLK.Signal.New()
end
function Coins:Start()
self.Amount += 1000
self.Changed:Fire(self.Amount)
print(GMLK.Number.Abbreviate(self.Amount))
end
return Coins
GMLK organizes modules into a pre-defined structure:
ReplicatedStorage.Modules.Library.GMLK: The main ModuleScript and its utility children.ReplicatedStorage.Modules.Client: Contains client modules managed by the client script.ServerStorage.Modules.Client: Houses server modules handled by the server script.StarterPlayer.StarterPlayerScripts.GMLKClient: A single client bootstrap script for initializing client-side modules.ServerScriptService.GMLKServer: The corresponding server bootstrap script.GMLK features a rate limiter that can be employed with RemoteEvents or RemoteFunctions, ensuring fair play and preventing abuse of server resources.
local PurchaseLimit = GMLK.RateLimiter.New(5, 10) -- Allow 5 calls every 10 seconds
When using GMLK, users may encounter issues related to module loading. For instance:
For further assistance, the community can utilize GitHub Discussions or refer to the contribution guide.
GMLK elevates the standard of Roblox module management, making it a vital tool for developers seeking to enhance their workflow and project organization. For detailed documentation and examples, explore the repository and help improve GMLK with contributions.
Comments
0Start the conversation
Share the first comment.