Menu
Table to work with cheat menu.
AddOptionBool(path: table
, name: string
, default: boolean
): integer
table
, name: string
, default: boolean
): integer
path
table
path to option
name
string
option name
default
boolean
default value
Creates menu toggle option. Returns option id.
Example
AddOptionButton(path: table
, name: string
, callback: function
): integer
table
, name: string
, callback: function
): integer
path
table
path to option
name
string
option name
callback
function
callback function which will be called when button is pressed
Creates menu button option. Returns option id.
Example
AddOptionCombo(path: table
, name: string
, items: table
, default: integer
): integer
table
, name: string
, items: table
, default: integer
): integer
path
table
path to option
name
string
option name
items
table
table with items
default
integer
default value (0-based index of item in table)
Creates menu combobox option. Returns option id.
Example
AddOptionSlider(path: table
, name: string
, min: integer
, max: integer
, default: integer
): integer
table
, name: string
, min: integer
, max: integer
, default: integer
): integer
path
table
path to option
name
string
option name
min
integer
minimum value
max
integer
maximum value
default
integer
default value
Creates integer slider option. Returns option id.
Example
AddOptionSliderFloat(path: table
, name: string
, min: number
, max: number
, default: number
): integer
table
, name: string
, min: number
, max: number
, default: number
): integer
path
table
path to option
name
string
option name
min
number
minimum value
max
number
maximum value
default
number
default value
Creates float slider option. Returns option id.
Example
AddKeyOption(path: table
, name: string
, default: Enum.ButtonCode
): integer
table
, name: string
, default: Enum.ButtonCode
): integer
path
table
path to option
name
string
option name
default
Enum.ButtonCode
default value
Creates keybind option. Returns option id.
Example
AddOptionMultiSelect(path: table
, name: string
, elements: table
, isOneItemMode: boolean
): integer
table
, name: string
, elements: table
, isOneItemMode: boolean
): integer
path
table
path to option
name
string
option name
elements
table
table with elements in the format {stringId, pathToImage, isEnabledByDefault}. see example
isOneItemMode
boolean
if true, only one element can be selected at a time
Creates multi select icon option. Returns option id.
Example
IsSelected(optionID: integer
, elementName: string
): boolean
integer
, elementName: string
): boolean
optionID
integer
option id
elementName
string
name of element
Returns true
if element from Menu.AddOptionMultiSelect
is selected.
GetItems(optionID: integer
): table
integer
): table
optionID
integer
option id
Returns the 1-based indexed table with all element names from Menu.AddOptionMultiSelect, maintaining the same order as in the menu.
SetSelected(optionID: integer
, elementName: string
, value: boolean
, callBack [?]
: boolean
): void
integer
, elementName: string
, value: boolean
, callBack [?]
: boolean
): void
optionID
integer
option id
elementName
string
name of element
value
boolean
new value of element
callBack [?]
boolean
if true
then OnMenuOptionChange
callback will be called (default: true)
Sets the selected state of an element from the Menu.AddOptionMultiSelect
option
MoveItem(optionID: integer
, elementName: string
, newIdx: integer
, callBack [?]
: boolean
): void
integer
, elementName: string
, newIdx: integer
, callBack [?]
: boolean
): void
optionID
integer
option id
elementName
string
name of element
newIdx
integer
new index of element. 1-based
callBack [?]
boolean
if true
then OnMenuOptionChange
callback will be called (default: true)
Moves element from Menu.AddOptionMultiSelect
option to new index.
AddOptionInputText(path: table
, name: string
, defaultText: string
): integer
table
, name: string
, defaultText: string
): integer
path
table
path to option
name
string
option name
defaultText
string
default text
Creates input text option. Returns option id.
Example
SetInputText(optionID: integer
, text: string
, callBack [?]
: boolean
): void
integer
, text: string
, callBack [?]
: boolean
): void
optionID
integer
option id
text
string
new text
callBack [?]
boolean
if true
then OnMenuOptionChange
callback will be called (default: false)
Sets the text to Menu.AddOptionInputText
option.
GetInputText(optionID: integer
): string
integer
): string
optionID
integer
option id
Gets the text from Menu.AddOptionInputText
option.
AddOptionTip(optionID: integer
, tipInfo: string
): void
integer
, tipInfo: string
): void
optionID
integer
option id
tipInfo
string
tip text. Could use for new line and {{paht_to_image}} for image
Adds tip to option.
Example
IsEnabled(optionID: integer
): boolean
integer
): boolean
optionID
integer
option id
Returns true
if Menu.AddOptionBool
option is enabled.
AddOptionColorPicker(path: table
, name: string
, r: number
, g: number
, b: number
, a: number
): integer
table
, name: string
, r: number
, g: number
, b: number
, a: number
): integer
path
table
path to option
name
string
option name
r
number
default red value
g
number
default green value
b
number
default blue value
a
number
default alpha value
Creates color picker option. Returns option id.
Example
SetColorValue(optionID: integer
, r: integer
, g: integer
, b: integer
, a: integer
, callBack [?]
: boolean
): void
integer
, r: integer
, g: integer
, b: integer
, a: integer
, callBack [?]
: boolean
): void
optionID
integer
option id
r
integer
red color value
g
integer
green color value
b
integer
blue color value
a
integer
alpha color value
callBack [?]
boolean
if true
then OnMenuOptionChange
callback will be called (default: true)
Sets value to Menu.AddOptionColorPicker
option.
SetValue(optionID: integer
, value: number | integer
, callBack [?]
: boolean
): void
integer
, value: number | integer
, callBack [?]
: boolean
): void
optionID
integer
option id
value
number | integer
new value
callBack [?]
boolean
if true
then OnMenuOptionChange
callback will be called (default: true)
Sets value to Menu.AddOptionSlider
, Menu.AddOptionSliderFloat
, Menu.AddOptionCombo
and Menu.AddKeyOption
option.
SetValue(optionID: integer
, value: boolean
, callBack [?]
: boolean
): boolean
integer
, value: boolean
, callBack [?]
: boolean
): boolean
optionID
integer
option id
value
boolean
new value
callBack [?]
boolean
if true
then OnMenuOptionChange
callback will be called (default: true)
Sets Menu.AddOptionBool
option value.
GetValue(optionID: integer
): number | table
integer
): number | table
optionID
integer
option id
Gets Menu.AddOptionSlider
, Menu.AddOptionSliderFloat
, Menu.AddOptionColorPicker
, Menu.AddOptionCombo
and Menu.AddKeyOption
option value.
IsKeyDown(optionID: integer
): boolean
integer
): boolean
optionID
integer
option id
Returns true
if Menu.AddKeyOption
key is pressed.
IsKeyDownOnce(optionID: integer
): boolean
integer
): boolean
optionID
integer
option id
Returns true
if Menu.AddKeyOption
key is pressed once.
RemoveOption(optionID: integer
): void
integer
): void
optionID
integer
option id
Removes option from menu.
AddOptionIcon(categoryList: table
, icon: string
): void
table
, icon: string
): void
categoryList
table
category list
icon
string
icon path
Adds icon to menu category.
Example
RemoveOptionIcon(categoryList: table
): void
table
): void
categoryList
table
category list
Removes icon from menu category.
AddOptionIcon(optionID: integer
, icon: string
): void
integer
, icon: string
): void
optionID
integer
option id
icon
string
icon path
Adds icon to option.
Example
RemoveOptionIcon(optionID: integer
): void
integer
): void
optionID
integer
option id
Removes icon from option.
RemoveMenu(categoryList: table
): void
table
): void
categoryList
table
category list
Removes menu category.
FindMenu(categoryList: table
, name: string
, type: Enum.MenuType
): integer | nil
table
, name: string
, type: Enum.MenuType
): integer | nil
categoryList
table
category list
name
string
option name
type
Enum.MenuType
option type
Returns option id by option name. Not the best way to get option id, pretty slow.
Example
OpenMenuList(categoryList: table
): void
table
): void
categoryList
table
category list
Pops out the menu category list.
KeyCodeToString(keycode: Enum.ButtonCode
): string | nil
Enum.ButtonCode
): string | nil
keycode
Enum.ButtonCode
key code
Returns key name by key code.
Example
GetKeyString(optionID: integer
): string | nil
integer
): string | nil
optionID
integer
option id
Returns key name by Menu.AddKeyOption
option id.
Example
Last updated