Menu

The way you interact with Orbit's menu is a little bit different from other cheats. You cannot just create a checkbox by itself.

CheckBox("Checkbox", false) --this will cause bugs

You need to reserve space in memory for the menu element beforehand, so it won't cause any bugs. This avoids reallocation, improves performance, and makes sure the pointers are stable throughout the lifetime of the script. This function is deprecated as of Orbit V9.5.8, menu element creation is handled by Orbit automatically.

--Deprecated as of Orbit V9.5.8, you can simply ignore this ReserveMenuElement(4) --reserve memory for 4 elements CheckBox("Checkbox1", false) CheckBox("Checkbox2", false) CheckBox("Checkbox3", false) CheckBox("Checkbox4", false)

You also cannot create a menu element twice with the same name. If you do, they'll be treated as the same element, which will cause more bugs to occur.

CheckBox("Checkbox", false) CheckBox("Checkbox", false) --this will cause bugs with ImGui

On top of that, since Orbit V5.9.5 luas must be separated into their own tab. This is done by getting the name of each lua file and formatting it, which Orbit does for you. Due to a sol limitation, the file name must be returned from the script itself.

local TabName = Tab() --get the tab CheckBox("Checkbox" .. TabName, false) --combine the checkbox name with tabname
CheckBox(string name, bool default)
CheckBox("Checkbox" .. TabName, false)
SliderInt(string name, int min, int max, int default)
SliderInt("Sliderint" .. TabName, 1, 10, 5)
SliderFloat(string name, float min, float max, float default)
SliderFloat("Sliderfloat" .. TabName, 1.0, 10.0, 5.0)
ColorPicker(string name, Color default)
ColorPicker("Colorpicker" .. TabName, Color(255, 255, 255, 255))

Its true that in lua, tables start with an index of 1. However, in c++ they start from 0. Therefore, if you want the default value of a dropdown to be the first element, you'll have to pass 0 as the last argument.

CreateDropDown(string name, string table elements, int default)
CreateDropDown("Combo" .. TabName, {"First", "Second", "Third"}, 0) --0 is first in c++

"CreateText" lets you organize the lua tab to your needs. You can skip rows with empty text elements if you wanted to, better label features etc.

CreateText(string text)
CreateText("This is text" .. TabName)

"CreateKeyBind" creates a keybind menu element. If you specify 0 as the default value, it will be empty. Pressing 'ESC' will also reset the keybind's value. The keybind's value is a VK Keycode. Read more about it in the "Input" tab.

CreateKeyBind(string text, int default)
CreateKeyBind("DDoS Key" .. TabName, 69)
GetCheckBox(string name)
local bool = GetCheckBox("Checkbox" .. TabName) --returns a bool
GetSliderInt(string name)
local int = GetSliderInt("Sliderint" .. TabName) --returns an int
GetSliderFloat(string name)
local float = GetSliderFloat("Sliderfloat" .. TabName) --returns a float
GetColorPicker(string name)
local color = GetColorPicker("ColorPicker" .. TabName) --returns a color object

If you are confused by what this is, just note that it returns the current index of the table of possible elements. This is done in the c++ code, not in lua, therefore the first index is 0 here.

GetDropDown(string name)
local int = GetDropDown("Dropdown" .. TabName)

"GetKeyBind" returns whether or not a keybind's value is pressed or not.

GetKeyBind(string name)
GetKeyBind("DDos Key" .. TabName)