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

HUD panels

A HUD panel is a small box on screen that looks like evasive's own: the keybind list or the watermark. Your script fills it with rows, and the user drags it where they want it.

A first panel

UI.AddPanel(name, fn, options) adds a panel. evasive calls fn(panel) every frame, and each panel:Row call adds one row for that frame.

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" })

The options are all optional:

Option What it does
style "list" looks like the keybind list. "strip" looks like the watermark.
title The title shown in the panel's header.
icon The header icon.
x, y Where the panel starts, before the user moves it.

Rows

panel:Row(text, value, options) adds a row with the text on the left and the value on the right. The value and the options can be left out.

Row option What it does
color The colour of the text, a Color3.
value_color The colour of the value.
icon An icon at the start of the row.
lit true gives the row the accent bar, as the keybind list does for an active bind.

The icon names are show, keyboard, bomb, crosshair, target, skull, x, error, info, radar, tachometer, wifi, map, time and zap. A number is used as an icon font codepoint.

panel:Title(text, note) changes the title for this frame, with an optional dim note after it. panel:Hide() hides the panel for this frame.

When a panel shows

A panel shows while it has rows. A panel with no rows shows only while the menu is open, so the user can still find it and move it. That makes it easy to hide a panel when there is nothing to say: just add no rows.

The panel can be dragged while the menu is open, and its position is saved in scripts\<your script>.ui.json.

A live player panel

This panel lists the five closest players with their distance, and lights up anyone closer than 50 studs. A setting on the Misc tab turns it on and off.

Luau
local Players = game:GetService("Players")

UI.AddToTab("Misc", function(tab)
    tab:Section("Nearby panel", "Right"):Toggle("nearby_on", "Show nearby players", true)
end)

UI.AddPanel("Nearby", function(p)
    if not UI.GetValue("nearby_on") then
        p:Hide()
        return
    end
    local me = Players.LocalPlayer
    local myRoot = me.Character and me.Character:FindFirstChild("HumanoidRootPart")
    if not myRoot then
        return
    end
    local list = {}
    for _, player in Players:GetPlayers() do
        local root = player ~= me and player.Character and player.Character:FindFirstChild("HumanoidRootPart")
        if root then
            table.insert(list, { name = player.Name, dist = (root.Position - myRoot.Position).Magnitude })
        end
    end
    table.sort(list, function(a, b)
        return a.dist < b.dist
    end)
    p:Title("nearby", #list .. " players")
    for i = 1, math.min(5, #list) do
        local entry = list[i]
        p:Row(entry.name, math.floor(entry.dist) .. " studs", { icon = "target", lit = entry.dist < 50 })
    end
end, { style = "list", title = "nearby", icon = "radar" })

Removing a panel

UI.RemovePanel(name) takes a panel away while the script keeps running. When the script stops or fails, its panels go away on the next frame.

Panel names are case sensitive. Every call is listed in the Menu tabs (UI) reference, and Built-in tabs and sub-tabs covers adding widgets to evasive's own tabs.