evasivedocs
Roblox scriptingLuau 0.748 · 24 guides · 385 API entries
API reference

Menu tabs (UI)

Tabs of your own, sections in the built-in tabs, sub-tabs, widgets and HUD panels.

UI

Tabs of your own in the evasive menu, with sections and widgets. A widget's id is per script. Its value is saved next to the script (<script>.ui.json) and restored when the script runs again.

7 entries

UI.AddTab

function
UI.AddTab(name, build)

Adds a tab after Config. build(tab) runs every frame the overlay draws, menu open or not: it declares the tab's sections and widgets, and cannot yield. Up to 32 script tabs.

Arguments
NameTypeDescription
namestring
buildfunction
Example
Luau
UI.AddTab("Helper", function(tab)
    local opts = tab:Section("Options", "Left")
    opts:Toggle("helper_on", "Turn on")
    opts:SliderInt("helper_dist", "Distance", 10, 3000, 750)
end)

UI.RemoveTab

function
UI.RemoveTab(name)

Removes a tab. It also removes everything the script added to the menu tab of that name with UI.AddToTab.

Arguments
NameTypeDescription
namestring

UI.GetValue

function
UI.GetValue(id) -> any

A widget's value, from anywhere in the script.

Arguments
NameTypeDescription
idstring
Returns
  • any
Example
Luau
if UI.GetValue("enabled") then end

UI.SetValue

function
UI.SetValue(id, value)

Sets a widget's value. A widget not made yet gets it when it is. Never runs callbacks.

Arguments
NameTypeDescription
idstring
valueany
Example
Luau
UI.SetValue("range", 1000)

UI.AddToTab

function
UI.AddToTab(name, build) -> Tab

Adds sections to one of evasive's own menu tabs: Aim, Visuals, Misc, Players, Scripts or Config, in any case. build(tab) runs every frame, like the function of UI.AddTab. tab:Section puts a card on the tab's first page, under the tab's own cards. Calling AddToTab again for the same tab replaces build. Any other name is refused with a hint to use UI.AddTab.

Arguments
NameTypeDescription
namestringAim, Visuals, Misc, Players, Scripts or Config.
buildfunctionCalled with the tab every frame.
Returns
  • Tab
Example
Luau
UI.AddToTab("Visuals", function(tab)
    tab:Section("My ESP", "Left"):Toggle("my_glow", "Glow", false)
end)

UI.AddPanel

function
UI.AddPanel(name, build [, options]) -> Panel

Adds a HUD panel. build(panel) runs every frame and fills it with rows. The panel shows while it has rows. An empty panel shows only while the menu is open, so the user can still place it. Panels can be dragged while the menu is open, and the position is saved. Panel names are case sensitive.

Arguments
NameTypeDescription
namestringThe panel's name, unique per script.
buildfunctionCalled with the panel every frame.
optionsoptionaltablestyle ("list" looks like the keybind list, "strip" like the watermark), title, icon, and the start position x and y.
Returns
  • Panel
Example
Luau
UI.AddPanel("Target", function(p)
    p:Row("health", "87", { value_color = Color3.new(0, 1, 0) })
end, { style = "list", title = "target info", icon = "crosshair" })

UI.RemovePanel

function
UI.RemovePanel(name)

Removes a panel the script added.

Arguments
NameTypeDescription
namestring
Example
Luau
UI.RemovePanel("Target")

Tab (UI)

What UI.AddTab passes to its function.

2 entries

Tab:Section

method
Tab:Section(name, side [, pages] [, maxHeight]) -> Section

A card in the "Left" or "Right" column. With pages it gets page buttons, and sec.page says which one is open. With maxHeight it scrolls.

Arguments
NameTypeDescription
namestring
sidestring
pagesoptional{ string }
maxHeightoptionalnumber
Returns
  • Section
Example
Luau
local sec = tab:Section("Aim", "Left", { "Main", "Advanced" })

Tab:Subtab

method
Tab:Subtab(name) -> Subtab

A page of the tab. On a menu tab, one of its own page names puts sections on that page (Visuals: Players, Models, World, Radar. Misc: General, Overlay. Scripts: Scripts, Console, Settings). Any other name adds a new page after the built-in ones, on Visuals and Misc only. Aim, Players, Config and Scripts refuse a new page with an error. On a script tab it makes a sub-tab bar: tab:Section then lands on the first sub-tab, and the selected sub-tab is saved.

Arguments
NameTypeDescription
namestring
Returns
  • Subtab
Example
Luau
UI.AddToTab("Misc", function(tab)
    tab:Subtab("My page"):Section("Main", "Left"):Toggle("on", "On")
end)

Subtab (UI)

What tab:Subtab returns (the UISubtab type). On a menu tab it is one of the tab's pages, built-in or new. On a script tab it is one sub-tab of the tab's sub-tab bar.

2 entries

Subtab.name

field

The sub-tab's name.

Returns
  • string

Subtab:Section

method
Subtab:Section(name, side [, pages] [, maxHeight]) -> Section

A card on this sub-tab, in the "Left" or "Right" column. It takes the same arguments as Tab:Section. Script cards go under the column's own cards, and the column scrolls when it runs out of room.

Arguments
NameTypeDescription
namestring
sidestring
pagesoptional{ string }
maxHeightoptionalnumber
Returns
  • Section
Example
Luau
UI.AddToTab("Visuals", function(tab)
    tab:Subtab("Models"):Section("Extra", "Right"):SliderInt("r", "Range", 0, 100, 10)
end)

Section (UI)

Widgets go into a section in the order they are declared. Every widget takes an optional callback last. It runs when the user changes the widget, never on SetValue.

13 entries

Section.page

field

The open page of a section made with pages, from 0.

Returns
  • number
Example
Luau
if sec.page == 0 then
    sec:Toggle("a", "A")
else
    sec:Toggle("b", "B")
end

Section:Toggle

method
Section:Toggle(id, label [, default] [, callback]) -> Widget

A checkbox.

Arguments
NameTypeDescription
idstring
labelstring
defaultoptionalboolean
callbackoptionalfunction
Returns
  • Widget
Example
Luau
sec:Toggle("esp", "ESP", true, function(on) print(on) end)

Section:Keybind

method
Section:Keybind(id [, key] [, mode] [, callback]) -> Keybind

A key on the end of the toggle row above it. mode: "hold", "toggle", "always" or "click". No key and no mode means always on, and a key without a mode means "toggle". Left click rebinds it in the menu, right click picks the mode.

Arguments
NameTypeDescription
idstring
keyoptional(number | EnumItem)
modeoptionalstring
callbackoptionalfunction
Returns
  • Keybind
Example
Luau
sec:Toggle("aim", "Aim")
local kb = sec:Keybind("aim_key", Enum.KeyCode.E, "hold")

Section:SliderInt

method
Section:SliderInt(id, label, min, max [, default] [, callback]) -> Widget

A whole-number slider.

Arguments
NameTypeDescription
idstring
labelstring
minnumber
maxnumber
defaultoptionalnumber
callbackoptionalfunction
Returns
  • Widget
Example
Luau
sec:SliderInt("fov", "FOV", 10, 800, 180)

Section:SliderFloat

method
Section:SliderFloat(id, label, min, max [, default] [, format] [, callback]) -> Widget

A decimal slider. The format argument is a printf format such as "%.1f".

Arguments
NameTypeDefaultDescription
idstring
labelstring
minnumber
maxnumber
defaultoptionalnumber
formatoptionalstring"%.2f"
callbackoptionalfunction
Returns
  • Widget
Example
Luau
sec:SliderFloat("smooth", "Smoothing", 0, 20, 6, "%.1f")

Section:Combo

method
Section:Combo(id, label, items [, default] [, callback]) -> Combo

A drop-down. Its value is the index of the chosen item, counted from 0. The callback gets the index and the text.

Arguments
NameTypeDescription
idstring
labelstring
items{ string }
defaultoptionalnumber
callbackoptionalfunction
Returns
  • Combo
Example
Luau
sec:Combo("part", "Target", { "Head", "Torso" }, 0)

Section:Button

method
Section:Button(label [, width] [, height] [, callback]) -> Widget

A button. Pass width and height to size it.

Arguments
NameTypeDescription
labelstring
widthoptionalnumber
heightoptionalnumber
callbackoptionalfunction
Returns
  • Widget
Example
Luau
sec:Button("Reset", function() UI.SetValue("fov", 180) end)

Section:ColorPicker

method
Section:ColorPicker(id [, r] [, g] [, b] [, a] [, callback]) -> Widget

A colour on the end of the toggle row above it, channels 0 to 1. Its value is a Color3 and the alpha, and the callback gets both.

Arguments
NameTypeDescription
idstring
roptionalnumber
goptionalnumber
boptionalnumber
aoptionalnumber
callbackoptionalfunction
Returns
  • Widget
Example
Luau
sec:Toggle("box", "Box")
sec:ColorPicker("box_color", 1, 0, 0, 1)

Section:ColorPair

method
Section:ColorPair(id1, color1, id2, color2 [, callback]) -> Widget

Two colours on the toggle row above, each {r, g, b, a}. The callback gets c1, a1, c2, a2.

Arguments
NameTypeDescription
id1string
color1{ number }
id2string
color2{ number }
callbackoptionalfunction
Returns
  • Widget
Example
Luau
sec:ColorPair("vis", { 0, 1, 0, 1 }, "hid", { 1, 0, 0, 1 })

Section:InputText

method
Section:InputText(id, label [, default] [, callback]) -> Widget

A text field. The callback runs when it loses focus.

Arguments
NameTypeDescription
idstring
labelstring
defaultoptionalstring
callbackoptionalfunction
Returns
  • Widget
Example
Luau
sec:InputText("name", "Name", "")

Section:Text

method
Section:Text(text)

A line of text.

Arguments
NameTypeDescription
textstring

Section:Tip

method
Section:Tip(text)

A tooltip on the widget above.

Arguments
NameTypeDescription
textstring

Section:Spacing

method
Section:Spacing()

A gap.

Widget (UI)

What the widget functions return.

3 entries

Widget.value

field

The current value.

Returns
  • any

Widget:GetValue

method
Widget:GetValue() -> any

The current value (a ColorPair gives c1, a1, c2, a2).

Returns
  • any

Widget:SetValue

method
Widget:SetValue(value)

Sets the value. The callback does not run.

Arguments
NameTypeDescription
valueany
Example
Luau
toggle:SetValue(true)

Keybind (UI)

What Section:Keybind returns.

9 entries

Keybind.value

field

true while the bind is active.

Returns
  • boolean

Keybind:IsEnabled

method
Keybind:IsEnabled() -> boolean

The same as .value.

Returns
  • boolean
Example
Luau
if kb:IsEnabled() then end

Keybind:GetKey

method
Keybind:GetKey() -> number | EnumItem

The bound key (an Enum.KeyCode item if it was given as one).

Returns
  • number | EnumItem

Keybind:SetKey

method
Keybind:SetKey(key)

Binds another key.

Arguments
NameTypeDescription
keynumber | EnumItem
Example
Luau
kb:SetKey(Enum.KeyCode.Q)

Keybind:GetKeyName

method
Keybind:GetKeyName() -> string

The key's name in lower case: "f", "lmb", "rmb", "none", ...

Returns
  • string

Keybind:GetType

method
Keybind:GetType() -> string

The mode: "hold", "toggle", "always" or "click".

Returns
  • string

Keybind:SetType

method
Keybind:SetType(mode)

Changes the mode.

Arguments
NameTypeDescription
modestring
Example
Luau
kb:SetType("toggle")

Keybind:ShowInKeybinds

method
Keybind:ShowInKeybinds(label, toggleId)

Lists the bind as label in evasive's keybind list (Misc > Panels) while the toggle toggleId is on.

Arguments
NameTypeDescription
labelstring
toggleIdstring
Example
Luau
kb:ShowInKeybinds("Aim", "aim")

Keybind:HideFromKeybinds

method
Keybind:HideFromKeybinds()

Takes it out of the keybind list.

Combo (UI)

What Section:Combo returns.

6 entries

Combo:Add

method
Combo:Add(item)

Adds an item.

Arguments
NameTypeDescription
itemstring

Combo:Remove

method
Combo:Remove(item)

Removes an item.

Arguments
NameTypeDescription
itemstring

Combo:Clear

method
Combo:Clear()

Removes every item.

Combo:GetItems

method
Combo:GetItems() -> { string }

The items.

Returns
  • { string }

Combo:GetText

method
Combo:GetText() -> string

The chosen item's text.

Returns
  • string

Combo:SetValue

method
Combo:SetValue(index)

Chooses the item at index, from 0.

Arguments
NameTypeDescription
indexnumber

Panel (UI)

What UI.AddPanel passes to its function (the UIPanel type). A HUD panel in the style of the keybind list or the watermark, which the user can drag while the menu is open.

3 entries

Panel:Row

method
Panel:Row(text [, value] [, options])

Adds a row for this frame: text on the left, value on the right. options: color (the text), value_color, icon, and lit (the accent bar of the keybind list). Icons: show, keyboard, bomb, crosshair, target, skull, x, error, info, radar, tachometer, wifi, map, time, zap, or a codepoint number.

Arguments
NameTypeDescription
textstring
valueoptionalstring
optionsoptionaltablecolor, value_color, icon, lit.
Example
Luau
p:Row("speed", "16", { icon = "tachometer", lit = true })

Panel:Title

method
Panel:Title(text [, note])

Sets the panel's title for this frame, with an optional dim note after it.

Arguments
NameTypeDescription
textstring
noteoptionalstring
Example
Luau
p:Title("target info", "3 players")

Panel:Hide

method
Panel:Hide()

Hides the panel for this frame.