Skip to content

menu

Functions to add elements

Info

You can add elements in every location you want
For example: Ragebot/Globals or Visuals/Other

add_check_box

menu.add_check_box(label: string, location: string, default_value?: boolean, context_location?: string): check_box_t

Name Type Description
label string Label of the check box
location string Location of the check box
default_value boolean Optional. Default value of the check box
context_location string Optional. Location of the context menu
Example
local my_checkbox = menu.add_check_box("My Checkbox!", "Misc/Misc")
What is "context"?

With context you can add a context menu to your element, which will be shown if you right click on it.

1
2
3
4
5
local my_checkbox = menu.add_check_box("My Checkbox!", "Misc/Misc", false, "Misc/Misc/Test")
--"Misc/Misc/Test" is the context location
--all elements with this context location will be shown in the context menu
local context_checkbox = menu.add_check_box("Context Checkbox", "Misc/Misc/Test", true)
local context_slider = menu.add_slider_int("Context Slider", "Misc/Misc/Test", 0, 100, 50)
If you right click on "My Checkbox!", it will show you the context menu with "Context Checkbox" and "Context Slider".


add_slider_int

menu.add_slider_int(label: string, location: string, min: number, max: number, default_value?: number): slider_int_t

Name Type Description
label string Label of the slider
location string Location of the slider
min number Minimum value of the slider
max number Maximum value of the slider
default_value number Optional. Default value of the slider
Example
local my_slider = menu.add_slider_int("My Slider :)", "Misc/Misc", 0, 255)

add_slider_float

menu.add_slider_float(label: string, location: string, min: number, max: number, default_value?: number): slider_float_t

Name Type Description
label string Label of the slider
location string Location of the slider
min number Minimum value of the slider
max number Maximum value of the slider
default_value number Optional. Default value of the slider
Example
local my_slider = menu.add_slider_float("My Slider :)", "Misc/Misc", 0, 255)

add_combo_box

menu.add_combo_box(label: string, location: string, items: string[], default_value?: number): combo_box_t

Name Type Description
label string Label of the combo box
location string Location of the combo box
items string[] Array of items for the combo box
default_value number Optional. Default value of the combo box
Example
local combobox =
    menu.add_combo_box("Extra", "Ragebot/Globals", {"DDoS on peek", "Crash all enemies"}, 0)

add_multi_combo_box

menu.add_multi_combo_box(label: string, location: string, items: string[], default_value?: number[]): multi_combo_box_t

Name Type Description
label string Label of the multi combo box
location string Location of the multi combo box
items string[] Array of items for the multi combo box
default_value number[] Optional. List of active by default indeces
Example
local combobox =
    menu.add_combo_box("Extra", "Ragebot/Globals", {"DDoS on peek", "Crash all enemies", "Crash myself"}, {0, 1})

add_key_bind

menu.add_key_bind(label: string, location: string, show_label?: boolean, key?: number, type?: number, display_in_list?: boolean): key_bind_t

Name Type Description
label string Label of the key bind
location string Location of the key bind
show_label boolean Optional. Whether to show the label
key number Optional. The key for the key bind
type number Optional. The type for the key bind
display_in_list boolean Optional. Whether to display the key bind in the key bind list
Example

This code will create a key bind attached to check box

local box = menu.add_check_box("best cheat", "Ragebot/Globals")
local bind = menu.add_key_bind("best cheat", "Ragebot/Globals", false)
This is how to create a standalone key bind
local bind = menu.add_key_bind("best cheat", "Ragebot/Globals")


add_color_picker

menu.add_color_picker(label: string, location: string, show_label?: boolean, show_alpha?: boolean, default_value?: color_t): color_picker_t

Name Type Description
label string Label of the color picker
location string Location of the color picker
show_label boolean Optional. Whether to show the label
show_alpha boolean Optional. Whether to show the alpha channel
default_value color_t Optional. Default color for the color picker
Example

This code will create a color picker attached to check box

local box = menu.add_check_box("test", "Ragebot/Globals")
local color_picker = menu.add_color_picker("test", "Ragebot/Globals", false)
This code will create a standalone color picker
local color_picker = menu.add_color_picker("test", "Ragebot/Globals")


add_button

menu.add_button(label: string, location: string, callback: function): button_t

Name Type Description
label string Label of the button
location string Location of the button
callback function Callback which will be executed when the button is pressed
Example
1
2
3
local my_button = menu.add_button("My button", "Misc/Misc", function()
    print("My button exec!")
end)

Functions to find elements

find_check_box

menu.find_check_box(label: string, location: string): check_box_t

Name Type Description
label string Label of the check box
location string Location of the check box
Example
local ragebot_enabled = menu.find_check_box("Enabled", "Ragebot/Globals")

find_slider_int

menu.find_slider_int(label: string, location: string): slider_int_t

Name Type Description
label string Label of the slider
location string Location of the slider
Example
local ragebot_fov = menu.find_slider_int("FOV", "Ragebot/Globals")

find_slider_float

menu.find_slider_float(label: string, location: string): slider_float_t

Name Type Description
label string Label of the slider
location string Location of the slider
Example
local viewmodel_fov = menu.find_slider_float("FOV", "Visuals/Viewmodel")

find_combo_box

menu.find_combo_box(label: string, location: string): combo_box_t

Name Type Description
label string Label of the combo box
location string Location of the combo box

find_multi_combo_box

menu.find_multi_combo_box(label: string, location: string): multi_combo_box_t

Name Type Description
label string Label of the multi combo box
location string Location of the multi combo box

find_key_bind

menu.find_key_bind(label: string, location: string): key_bind_t

Name Type Description
label string Label of the key bind
location string Location of the key bind

find_color_picker

menu.find_color_picker(label: string, location: string): color_picker_t

Name Type Description
label string Label of the color picker
location string Location of the color picker

Other functions

get_menu_rect

menu.get_menu_rect(): vec4_t

Example
register_callback("paint", function()
    if menu.is_visible() then
        local menu_rect = menu.get_menu_rect()

        render.rect_filled_fade(
            vec2_t.new(menu_rect.x - 5, menu_rect.y - 5),
            vec2_t.new(menu_rect.z + 5, menu_rect.w + 5),
            color_t.new(1, 0, 0, 0.3),
            color_t.new(0, 0, 1, 0),
            color_t.new(0, 0, 1, 0.3),
            color_t.new(1, 0, 0, 0)
        )
    end
end)

is_visible

menu.is_visible(): boolean


dump

menu.dump()

Prints all elements to console