This repository was archived by the owner on Feb 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
LegitModule
7GrandDadPGN edited this page Dec 21, 2024
·
1 revision
Note
Creating a legit module will automatically remove modules with the same name.
local Atmosphere
Atmosphere = vape.Legit:CreateModule({
Name = 'Atmosphere',
Function = function(callback)
print(callback, 'module state')
Atmosphere:Clean(Instance.new('Part'))
repeat
print('repeat loop!')
task.wait(1)
until (not Atmosphere.Enabled)
end,
Size = UDim2.fromOffset(100, 41),
Tooltip = 'This is a test legit module.'
})
Name | Type | Required | Description |
---|---|---|---|
Name | string | Yes | The name used for the Module |
Size | UDim2 | No | The size of the overlay render frame, this will create a children frame to put objects in if defined ![]() Size = UDim2.fromOffset(100, 41)
|
Function | function | Yes | A function that is called when the module is toggled (automatically task.spawn's the called function for loops) Function = function(callback) print(callback, 'module state') end
|
Tooltip | string | No | A tooltip explaining what the component does ![]() Tooltip = 'Hi! This is a tooltip.'
|
Name | Returns | Description | Example |
---|---|---|---|
Toggle | None | Sets the state to the opposite of the current state | Atmosphere:Toggle() |
Clean | None | A garbage clone of maid used to clean up connections & Instances when the module state is set to false, use this inside of the callback | Atmosphere:Clean(Instance.new('Part')); Atmosphere:Clean(game.Loaded:Connect(function() end)) |
Name | Type | Description |
---|---|---|
Enabled | boolean | The current module state Atmosphere.Enabled
|
Children | Instance | A frame that's created for gui objects IF the size parameter is specified |
Object | Instance | Returns the toggle object that displays onscreen component.Object
|