Controls overview

All thirteen controls, the options every one shares, and how handles work.

Every control is a method on a section, takes one options table, and returns a handle. That is the whole API surface.

Luau
local handle = section:Toggle({ Text = "Enabled", Callback = print })

The thirteen#

Options every control shares#

These work on any control. Anything a control adds on top is documented on its own page.

OptionTypeDefaultWhat it does
TextstringThe label. Non-strings are coerced, so a number is safe.
DescriptionstringA second, quieter line beneath the label.
IconstringOne of the 1,573 built-in icon names.
IconColorColor3Overrides the icon colour for this control only.
IconSizenumberIcon size in pixels. Defaults to the control's natural size.
LayoutOrdernumberExplicit ordering. Without it, controls appear in creation order.
FlatbooleanfalseRemoves the card background. Applied automatically to controls inside a Group.

Handles#

Stateful controls return a handle with Get and Set:

Luau
local speed = main:Slider({ Text = "Speed", Min = 0, Max = 100, Default = 50 })
 
speed:Get()      --> 50
speed:Set(80)    --> updates the UI and fires Callback

Set fires the callback

Set is not a silent write — it behaves exactly as though the user moved the control. That is usually what you want (one code path, not two), but it means calling Set inside that control's own Callback will loop.

Some controls add more. A dropdown, for example:

MethodWhat it does
Get()Current value — a string, or an array when Multi
Set(value)Selects a value or list of values
SetOptions(list)Replaces the option list in place
Open() / Close() / IsOpen()Controls the menu
Show() / Hide() / SetVisible(bool)Shows or hides the whole control
Destroy()Removes it from the page

Callbacks#

Callback fires whenever the value changes, with the new value as its only argument:

Luau
main:Toggle({
    Text = "Godmode",
    Callback = function(enabled)   -- boolean
        print("godmode:", enabled)
    end,
})
 
main:Slider({
    Text = "FOV", Min = 70, Max = 120,
    Callback = function(value)     -- number
        workspace.CurrentCamera.FieldOfView = value
    end,
})
 
main:Dropdown({
    Text = "Target", Options = { "Nearest", "Lowest HP" },
    Callback = function(choice)    -- string
        targetMode = choice
    end,
})

By default a callback does not fire when the control is created. If you want it to — to apply a saved value on startup — use FireOnStart:

Luau
main:Toggle({
    Text = "Fullbright",
    Save = "fullbright",
    FireOnStart = true,   -- applies the restored value immediately
    Callback = function(on) setFullbright(on) end,
})

Organising a long section#

Two tools stop a section becoming a wall of rows:

Headings break it into runs:

Luau
main:Title({ Text = "COMBAT", Icon = "crosshair" })
main:Description("These only apply in a round.")
-- controls…
main:Separator()
main:Title({ Text = "MOVEMENT", Icon = "compass" })

Groups collapse:

Luau
local advanced = main:Group({ Text = "Advanced", Icon = "wrench", Open = false })
 
advanced:Toggle({ Text = "Debug logging" })
advanced:Slider({ Text = "Tick rate", Min = 1, Max = 60 })

A group is a container that grows and shrinks. Controls inside one render flat, because the group already draws the surface. See Groups and search.

See them running#

Every control page carries a live preview like this one. It is the real control, working, and the dropdown in its corner repaints it into any of the nine built-in themes.

Live preview

My Script

v1.0

Enabled

FireOnStart runs the callback once at build time.

Speed

16 studs/s

Mode

Filter

Panic key

Status

idle