Built-in tabs and sub-tabs
Making your own menu tab adds a new tab for your script. Sometimes a setting belongs next to the built-in ones instead: an extra ESP option under Visuals, or a page of your own in Misc. UI.AddToTab and tab:Subtab do that. Sections and widgets work the same as on your own tabs.
Adding to a menu tab
UI.AddToTab(name, fn) takes the name of one of evasive's tabs: Aim, Visuals, Misc, Players, Scripts or Config. Case does not matter, so "visuals" works too. Like UI.AddTab, it calls fn(tab) every frame, and you declare your sections inside it.
UI.AddToTab("Visuals", function(tab)
local sec = tab:Section("My ESP", "Left")
sec:Toggle("my_glow", "Glow", false, function(on)
print("glow", on)
end)
end)tab:Section puts the card on the tab's first page. Your cards go under the column's own cards, and the column scrolls when it runs out of room.
Calling UI.AddToTab again for the same tab replaces the function. Any other name is refused, with a hint to use UI.AddTab for a tab of your own.
Pages of a menu tab
Some menu tabs have pages of their own along the top. tab:Subtab(name) with one of those names puts your sections on that page:
| Tab | Its pages |
|---|---|
| Visuals | Players, Models, World, Radar |
| Misc | General, Overlay |
| Scripts | Scripts, Console, Settings |
UI.AddToTab("Visuals", function(tab)
local models = tab:Subtab("Models")
models:Section("Extra", "Right"):SliderInt("range", "Range", 0, 100, 10)
end)Any other name adds a new page after the built-in ones. That works on Visuals and Misc only. Aim, Players, Config and Scripts refuse a new page with an error that says so.
UI.AddToTab("Misc", function(tab)
local page = tab:Subtab("My page")
page:Section("Main", "Left"):Toggle("on", "On")
end)sub.name holds the sub-tab's name.
Sub-tabs on your own tab
On a tab made with UI.AddTab, tab:Subtab(name) gives the tab a real sub-tab bar. Each sub-tab has its own sections. A plain tab:Section call lands on the first sub-tab, and the sub-tab the user picked is saved.
UI.AddTab("My Script", function(tab)
local main = tab:Subtab("Main")
local keys = tab:Subtab("Keys")
local general = main:Section("General", "Left")
general:Toggle("enabled", "Enabled")
general:SliderInt("range", "Range", 50, 2000, 500)
local binds = keys:Section("Binds", "Left")
binds:Toggle("boost_on", "Speed boost")
local kb = binds:Keybind("boost_key", Enum.KeyCode.F, "hold")
kb:ShowInKeybinds("Speed boost", "boost_on")
end)A section can still have small page buttons of its own: pass a list of page names to Section and read section.page, as on your own tab.
What happens when the script stops
When the script stops, calls UI.RemoveTab, or fails with an error, everything it added goes away on the next frame: its own tabs, its cards in the menu tabs, its pages and its panels. UI.RemoveTab("Visuals") removes only what this script added to Visuals.
Widget values and the selected sub-tab are saved in scripts\<your script>.ui.json and come back the next time the script runs.
The menu search finds script widgets too, wherever they are.
Names
Menu tab names are not case sensitive. Script tab names and panel names are: "My Script" and "my script" are two tabs.
For panels in the style of the keybind list and the watermark, see HUD panels. Every call is listed in the Menu tabs (UI) reference.