A Luau module designed to manage and clean up resources in Roblox projects efficiently.
Download Cleaner ModuleBuilt by flashy3467dieux, a passionate developer creating tools to streamline Roblox development.
π―Cleaner is a Luau module designed to help manage and clean up resources in Roblox projects. It lets you track and remove:
π¦
Cleaner.lua
in your Modules folder (e.g., ReplicatedStorage).local Cleaner = require(path.To.Cleaner)
local cleaner = Cleaner.new()
π οΈ
AddVariable(name, value)
β Add a custom variableSetVariable(name, value)
β Update an existing variableGetVariable(name)
β Retrieve a variableβs valueClean()
β Clear all stored variablesAddConnection(name, connection)
β Store a connection (e.g., from :Connect())Disconnect(name?)
β Remove a specific or all connectionsAddInstance(instance, name?)
β Add a Roblox Instance to trackDestroy(name?)
β Destroy a specific or all stored instancesCleanUp()
β Global cleanup: variables, connections, and instancesπ
local cleaner = Cleaner.new()
-- Variables
cleaner:AddVariable("score", 10)
-- Connections
local conn = part.Touched:Connect(function()
print("Touched!")
end)
cleaner:AddConnection("TouchConn", conn)
-- Instances
local gui = Instance.new("ScreenGui", player.PlayerGui)
cleaner:AddInstance(gui, "MainGui")
-- Cleanup
cleaner:CleanUp()
π§ΌCleaner is efficient, readable, and easy to integrate into any Roblox project.