πŸ’»ui

Example available!

βš™οΈUI Interaction

Elements:

add_checkbox

ui.add_checkbox(name: string): MenuItem

Name
Type
Description

name

string

Item name

Creates and returns a menu item object, or throws an error on failure.

add_combobox

ui.add_combobox(name: string, items: {, ...}): MenuItem

Name
Type
Description

name

string

Item name

items

string

Items

Creates and returns a menu item object, or throws an error on failure.

add_sliderint

ui.add_sliderint(name: string, min: number, max: number): MenuItem

Name
Type
Description

name

string

Item name

min

number

Minimum value

max

number

Maximum value

Creates and returns a menu item object, or throws an error on failure.

add_sliderfloat

ui.add_sliderfloat(name: string, min: number, max: number): MenuItem

Name
Type
Description

name

string

Item name

min

number

Minimum value

max

number

Maximum value

Creates and returns a menu item object, or throws an error on failure.

add_button

ui.add_button(name: string): MenuItem

Name
Type
Description

name

string

Item name

Creates and returns a menu item object, or throws an error on failure.

add_colorpicker

ui.add_colorpicker(name: string): MenuItem

Name
Type
Description

name

string

Item name

Creates and returns a menu item object, or throws an error on failure.

add_label

ui.add_label(name: string): MenuItem

Name
Type
Description

name

string

Item name

Creates and returns a menu item object, or throws an error on failure.

add_hotkey

ui.add_hotkey(name: string): MenuItem

Name
Type
Description

name

string

Item name

Creates and returns a menu item object, or throws an error on failure.

add_input

ui.add_input(name: string): MenuItem

Name
Type
Description

name

string

Item name

Creates and returns a menu item object, or throws an error on failure.

get_keybind_state

ui.get_keybind_state(name: string)

Name
Type
Description

name

string

Item name

Returns true, if keybind is active.

get_keybind_mode

ui.get_keybind_mode(name: string)

Name
Type
Description

name

string

Item name

Returns the keybind mode.

set_keybind_state

ui.set_keybind_state(name: string, var: boolean)

Name
Type
Description

name

string

Item name

var

boolean

Item var

Sets the keybind boolean value.

Functions:

:get

<element>:get(): any

Returns the value of the menu item.

:set

<element>:set(value: any)

Name
Type
Description

value

any

The value to which the menu item will be set

Sets the value of the menu item.

:set_visible

<element>:set_visible(state: boolean)

Name
Type
Description

state

boolean

New visibility state

Shows or hides the menu item depending on the value of state.

:set_callback

Works only in callbacks.

<element>:set_callback(callback: function)

Name
Type
Description

callback

function

Function that will be called when the menu item is interacted with

local checkbox = ui.add_checkbox("Checkbox")

cheat.push_callback("on_paint", function()
    checkbox:set_callback(function()
        cheat.notify("Callback")
    end)
end)

Sets the callback to the specified menu item.

:set_group

<element>:set_group(group: number)

Name
Type
Description

group

number

1 - Left group 2 - Right group

Sets the group to the specified menu item.

Combobox additive functions:

:set_items

<element>:set_items(items: {, ...})

Name
Type
Description

items

string

Table with string values

Sets a table with items. ui.add_combobox menu item objects only.

:get_items

<element>:get_items(): table

Returns the table of items. ui.add_combobox menu item objects only.

Hotkey additive functions:

:get_mode

<element>:get_mode(): number

Returns the current keybind mode. ui.add_hotkey menu item objects only.

Find menu items:

ui.find_menu_int(item_name: string): MenuItem

Name
Type
Description

item_name

string

-

--> Example
local fake_lag_limit = ui.find_menu_int("Antiaim.fake_lag_limit")

fake_lag_limit:set(10)

cheat.notify(fake_lag_limit:get())

Returns the MenuItem object that corresponds to the specified name.

Last updated