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