### KeybindMode Enum Example Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-gui/enums-and-types Shows how to add a keybind with a specific KeybindMode. ```lua local bind = cat:add_keybind("Activate", Enum.KeyCode.E, Enum.KeybindMode.Toggle) ``` -------------------------------- ### KeyCode Enum Example for Keybind Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-gui/enums-and-types Shows how to add a keybind using the KeyCode enum. ```lua local bind = cat:add_keybind("Activate", Enum.KeyCode.F) ``` -------------------------------- ### Full End-to-End rbxcli_ui Legacy Example Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-ui-legacy/end-to-end-example This script demonstrates setting up a tab with all available control types, reading their values on a button press, and ensuring reload safety. It uses the legacy v1 API. ```lua local TAB_NAME = "Demo" -- Idempotent setup: wipe any previous tab from the last reload. pcall(function() rbxcli_ui.remove_tab(TAB_NAME) end) local tab = rbxcli_ui.add_tab(TAB_NAME, "code") local cat = tab:add_category("Controls", 360) -- One of every control kind, with sensible defaults. local enable = cat:add_toggle("Enable", false) local fov = cat:add_slider("FOV", 0, 180, 90, false) local maxItems = cat:add_slider("Max Items", 0, 100, 10, true) local mode = cat:add_dropdown("Mode", { "Closest", "Lowest HP", "Random" }, 0) local color = cat:add_color("Marker Color", { 1, 0, 0, 1 }) local aimKey = cat:add_keybind("Aim Key", 0, 0) local name = cat:add_input("Player Name", "", 64) cat:add_separator() cat:add_label("Press Apply to read every value at once.") -- A button that reads the entire state on demand. This is the simplest way to -- inspect what the UI is currently holding without wiring change callbacks -- everywhere. cat:add_button("Apply", function() print("enable :", enable:get()) print("fov :", fov:get()) print("max items :", maxItems:get()) print("mode index :", mode:get_index()) local rgba = color:get() print(("color rgba : %.2f %.2f %.2f %.2f"):format(rgba[1], rgba[2], rgba[3], rgba[4])) print("aim key :", aimKey:get_key()) print("player name :", name:get()) end) -- Gate the "Aim Key" picker behind the "Enable" toggle so it only shows up -- when the rest of the script is active. set_visible keeps the keybind alive -- so the bound key survives hides. aimKey:set_visible(false) enable = cat:add_toggle("Enable", false, function(on: boolean) aimKey:set_visible(on) end) ``` -------------------------------- ### Settings Registration and Access Source: https://docs.rbxcli.dev/rbxcli_docs.d.luau Functions for registering settings schemas, getting, setting, resetting, and observing setting values. ```lua settings.register("myNamespace", { key = "defaultValue" }) local value = settings.get("myNamespace.key") settings.set("myNamespace.key", "newValue") settings.reset("myNamespace.key") settings.observe("myNamespace.key", function(old, new) print(old, new) end) local schema = settings.get_schema("myNamespace.key") local namespaces = settings.list_namespaces() local keys = settings.list_keys("myNamespace") ``` -------------------------------- ### Full End-to-End rbxcli_gui Example Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-gui/end-to-end-example This script registers a tab, adds various control types, and implements a master toggle and keybind activation handler. It includes state management and UI refresh logic. ```lua local gui = rbxcli_gui pcall(function() gui.remove_tab("AimDemo") end) local state = { enabled = false, sensitivity = 0.35, targetPart = "Head", bindKey = Enum.KeyCode.E, } local tab = gui.add_tab("AimDemo", { icon = Enum.TabIcon.Joystick }) -- Status line at the top, rewritten on every change. local statusCat = tab:add_category("Status") local status = statusCat:add_label("idle") local function refresh() status:set_text(string.format( "enabled=%s | target=%s | sens=%.2f", tostring(state.enabled), state.targetPart, state.sensitivity)) end -- Main controls. local coreCat = tab:add_category("Aimbot") local enabled = coreCat:add_toggle("Enabled", false, function(v) state.enabled = v refresh() end) local sens = coreCat:add_slider("Sensitivity", 0.0, 1.0, state.sensitivity, Enum.SliderValueType.Float, function(n) state.sensitivity = n refresh() end) -- Forward-declared so the callback can read back from it. local partDD partDD = coreCat:add_dropdown("Target Part", { "Head", "Torso", "HumanoidRootPart" }, 1, function(_) state.targetPart = partDD:get_selected() or "Head" refresh() end) local bind = coreCat:add_keybind("Activate", state.bindKey, Enum.KeybindMode.PressAndHold, function(k) state.bindKey = k refresh() end) -- Separate channel from the rebind callback above. bind:on_activated(function(active) print("aim", active and "ACTIVE" or "idle") end) -- Master toggle hides the dependent controls when off. set_visible keeps the -- controls alive, so their state survives a hide/show cycle. local function setCoreVisible(v) sens:set_visible(v) partDD:set_visible(v) bind:set_visible(v) end enabled:on_changed(function(v) setCoreVisible(v) end) setCoreVisible(false) refresh() ``` -------------------------------- ### Dropdown Indexing and Selection Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-gui/dropdowns Demonstrates how to add a dropdown, get and set its index, and retrieve the selected option. Shows how index 0 represents no selection and how out-of-range indices raise errors. ```lua local mode = cat:add_dropdown("Mode", { "Alpha", "Beta", "Gamma" }, 1) mode:get_index() -- 1 mode:get_selected() -- "Alpha" mode:set_index(0) mode:get_index() -- 0 (no selection) mode:get_selected() -- nil mode:set_index(2) mode:get_selected() -- "Beta" ``` -------------------------------- ### TabIcon Enum Examples Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-gui/enums-and-types Demonstrates the usage of TabIcon enums to set the glyph for a tab. ```lua Enum.TabIcon.Code -- default script glyph Enum.TabIcon.Eye -- visuals glyph Enum.TabIcon.Joystick -- controller glyph ``` ```lua local tab = rbxcli_gui.add_tab("Visuals", { icon = Enum.TabIcon.Eye }) ``` -------------------------------- ### Settings Management Source: https://docs.rbxcli.dev/rbxcli_docs.d.luau Functions for registering, getting, setting, and observing configuration settings. ```APIDOC ## Settings Management ### Description Functions for registering, getting, setting, and observing configuration settings. ### Methods - `register(namespace: string, schema: any): any` - `get(fqn: string): any` - `set(fqn: string, value: any): any` - `reset(fqn: string): any` - `observe(fqn: string, callback: (oldValue: any, newValue: any) -> ()): any` - `get_schema(fqn: string): any` - `list_namespaces(): any` - `list_keys(namespace: string): any` ``` -------------------------------- ### Idempotent Setup Pattern for Script Reloads Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-ui-legacy/lifecycle-and-cleanup Implements the essential reload-safe pattern by removing any existing tab with the same name before adding a new one. This prevents duplicate tabs from accumulating during development reloads. ```lua local TAB_NAME = "My Script" pcall(function() rbxcli_ui.remove_tab(TAB_NAME) end) local tab = rbxcli_ui.add_tab(TAB_NAME, "code") local main = tab:add_category("Main", 320) main:add_toggle("Enable", false, function() end) main:add_slider("FOV", 0, 180, 90, false, function() end) ``` -------------------------------- ### Handling Destroyed Control Proxies Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-ui-legacy/lifecycle-and-cleanup Demonstrates the behavior of a destroyed control proxy. Subsequent calls to `:get()` return nil, and setters become silent no-ops after an initial warning. ```lua local tog = cat:add_toggle("Flag", false) tog:destroy() tog:enable() -- silent no-op, warns once print(tog:get()) -- nil ``` -------------------------------- ### GuiKeybind Fields and Methods Source: https://docs.rbxcli.dev/datatypes/GuiKeybind This snippet details the fields and methods available for the GuiKeybind datatype, including how to get and set properties, and how to register callbacks for activation and changes. ```APIDOC ## GuiKeybind struct Keybind proxy returned by `GuiCategory:add_keybind`. Carries a bound key and an activation mode. Remarks Two independent event streams: the change callback fires on rebind; `on_activated` fires on activation-state transitions. Most feature code wants `on_activated`. ## Fields (16) category:GuiCategory?destroy:() -> ()get_key:() -> KeyCodeget_mode:() -> KeybindModeis_active:() -> booleanis_destroyed:() -> booleanis_visible:() -> booleankind:ControlKindlabel:stringname:stringon_activated:(callback: (active: boolean) -> ()) -> GuiConnectionon_changed:(callback: (key: number) -> ()) -> GuiConnectionset_key:(key: KeyCode) -> ()set_label:(text: string) -> ()set_mode:(mode: KeybindMode) -> ()set_visible:(visible: boolean) -> () ## Fields `category` : GuiCategory? Back-reference to the owning category. `nil` after the owning tab is gone. `destroy` : () -> () Marks the keybind destroyed. `get_key` : () -> KeyCode Returns the bound `KeyCode`. `get_mode` : () -> KeybindMode Returns the activation mode. `is_active` : () -> boolean Returns the current latched activation state. Remarks In `Toggle` mode it is the latched-on flag. In `PressAndHold` mode it mirrors the key's down-state. `is_destroyed` : () -> boolean Returns the destroyed flag. `is_visible` : () -> boolean Returns the visibility flag. `kind` : ControlKind Always `Enum.ControlKind.Keybind`. `label` : string Current label text. `name` : string Alias for `label`. `on_activated` : (callback: (active: boolean) -> ()) -> GuiConnection Registers an activation listener. Remarks Fires on activation-state transitions only, one event per transition rather than per frame the key is held. Independent of `on_changed`; disconnecting one channel does not affect the other. `on_changed` : (callback: (key: number) -> ()) -> GuiConnection Registers an additional rebind listener. Remarks Receives the raw integer key code, not a `KeyCode` enum value. Use `get_key()` if you want the typed value. `set_key` : (key: KeyCode) -> () Sets the bound key. Remarks Fires the change callback on the next main-thread turn. `set_label` : (text: string) -> () Replaces the label. `set_mode` : (mode: KeybindMode) -> () Sets the activation mode. Remarks The UI mode picker updates in lockstep with the new value. `set_visible` : (visible: boolean) -> () Shows or hides the keybind row. ``` -------------------------------- ### Get Product Information Source: https://docs.rbxcli.dev/rbxcli_docs.json Retrieves information about the RbxCli build, including its name, version, build date, and the Roblox version it was built for. ```APIDOC ## get_product_information ### Description Returns a table with RbxCli build information: `name` (string), `version` (string), `build` (string, DD-MM-YYYY), `built_for_roblox_version` (string). ### Method `rbxcli.get_product_information(): ProductInformation` ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example ```lua local info = rbxcli.get_product_information() print(info.name, info.version, info.build, info.built_for_roblox_version) ``` ### Response #### Success Response (200) - `ProductInformation` (table): Contains build details. - `name` (string): The name of the RbxCli build. - `version` (string): The version of RbxCli. - `build` (string): The build date in DD-MM-YYYY format. - `built_for_roblox_version` (string): The Roblox version the build was compiled for. #### Response Example ```json { "name": "RbxCli", "version": "0.6.0a-alpha", "build": "25-12-2023", "built_for_roblox_version": "version-12345678" } ``` ``` -------------------------------- ### Reload-Safe Tab Creation Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-ui-legacy/creating-tabs To ensure your tab setup is safe across script reloads, you can optionally remove the previous tab before creating a new one. `pcall` is used to handle cases where the tab might not exist yet. ```lua -- Optional: remove the previous tab to start from a clean slate. -- pcall keeps the script alive if the tab does not exist yet. pcall(function() rbxcli_ui.remove_tab("My Script") end) local tab = rbxcli_ui.add_tab("My Script", "code") ``` -------------------------------- ### Get Control Value Without Callback Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-ui-legacy/adding-controls Demonstrates adding a control without a callback and retrieving its value later using the `:get()` method. ```lua local sensitivity = cat:add_slider("Sensitivity", 0, 10, 1, false) -- no callback -- elsewhere, when you need the value local current = sensitivity:get() ``` -------------------------------- ### memory.immediate_watch() Source: https://docs.rbxcli.dev/libraries/memory Sets up an immediate watch on a memory address. Requires the 'Memory' ScriptPermission. ```APIDOC ## memory.immediate_watch(address: number, width: number, refresh_rate_in_ms: number) ### Description Sets up an immediate watch on a memory address. Requires the 'Memory' ScriptPermission. ### Parameters #### Path Parameters - **address** (number) - Required - The memory address to watch. - **width** (number) - Required - The size of the memory to watch (in bytes). - **refresh_rate_in_ms** (number) - Required - The interval in milliseconds between checks. ### Returns - **Event**: An event that is triggered when the watched memory changes. ``` -------------------------------- ### get Source: https://docs.rbxcli.dev/libraries/settings Retrieves the current value of a specific setting using its fully-qualified name. ```APIDOC ## get ### Description Reads the current value of a setting. ### Parameters #### Path Parameters - **fqn** (string) - Required - Fully-qualified name (e.g. `user.myscript.foo`). ``` -------------------------------- ### RunService.PreSimulation Source: https://docs.rbxcli.dev/rbxcli_docs.json Fires before the local physics world is stepped. Passes no arguments. ```APIDOC ## RunService.PreSimulation ### Description Fires before the local physics world is stepped. Passes no arguments. ### Type Event ### Access read ### Realm vm ### Safety unsafe ### Since 1.6.9-alpha ``` -------------------------------- ### Instance.GetFullName Source: https://docs.rbxcli.dev/rbxcli_docs.json Gets the full path name of an Instance. This is a direct wrapper around the Roblox API. ```APIDOC ## Instance.GetFullName ### Description Gets the full path name of an Instance. ### Method N/A (SDK Method) ### Endpoint N/A (SDK Method) ### Parameters None ### Response #### Success Response - **string** - The full name of the instance. ``` -------------------------------- ### print Source: https://docs.rbxcli.dev/libraries/globals Prints its arguments to the VM output log. Multiple arguments are separated by tabs. Scalars are stringified the same way tostring would do it; tables are pretty-printed recursively. ```APIDOC ## print ### Description Prints its arguments to the VM output log. Multiple arguments are separated by tabs. Scalars are stringified the same way `tostring` would do it; tables are pretty-printed recursively (Roblox Studio style) with cycle detection when the `core.luau.pretty_print` setting is enabled. Tables with an `__iter` metamethod are walked via `__iter` so their actual contents are emitted. With the setting off, behaves like the classic Luau `print` (each argument stringified via `tostring`). ### Method () → () ### Parameters #### Path Parameters - **...** (any) - Required - The values to print. ### Response #### Success Response () - Returns nothing. #### Response Example (No specific example provided in source) ``` -------------------------------- ### get Source: https://docs.rbxcli.dev/libraries/image Returns the cached Image previously stored under a given name, or nil if no such image is cached. ```APIDOC ## get ### Description Returns the cached `Image` previously stored under `name` by `image.load` or `image.load_file`, or `nil` if no such image is cached. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body * **name** (string) - Required - The cache key to look up. ### Request Example None ### Response #### Success Response (Image?) * Returns the `Image` handle if found in cache. #### Response Example None ERROR HANDLING: - Returns `nil` if no image is cached under the specified name. ``` -------------------------------- ### ControlKind Enum Example Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-gui/enums-and-types Demonstrates checking the kind of a UI control using the ControlKind enum. ```lua print(myToggle.kind == Enum.ControlKind.Toggle) -- true ``` -------------------------------- ### Handling Destroyed Proxies with pcall Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-gui/lifecycle-and-cleanup Shows how to use `pcall` to gracefully handle errors when interacting with potentially destroyed proxies, converting loud errors into soft warnings. ```lua local ok, err = pcall(function() tog:set_boolean(true) end) if not ok then warn("toggle gone:", err) end ``` -------------------------------- ### Color4 Constructor and Conversion Source: https://docs.rbxcli.dev/rbxcli_docs.d.luau Demonstrates creating Color4 objects using the constructor or converting from RGBA, HSVA, and Hex formats. ```lua local color1 = Color4.new(1, 0, 0, 1) local color2 = Color4.fromRGBA(0, 1, 0, 0.5) local color3 = Color4.fromHSVA(0.5, 1, 1, 1) local color4 = Color4.fromHex("#FF00FF") ``` -------------------------------- ### SliderValueType Enum Examples Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-gui/enums-and-types Illustrates adding sliders with either Int or Float value types. ```lua local fov = cat:add_slider("FOV", 1, 360, 120, Enum.SliderValueType.Int) local sens = cat:add_slider("Sensitivity", 0.0, 1.0, 0.35, Enum.SliderValueType.Float) ``` -------------------------------- ### warn Source: https://docs.rbxcli.dev/libraries/globals Prints its arguments to the VM output log as a warning. Behaves exactly like print, but the message is tagged at the warning level. ```APIDOC ## warn ### Description Prints its arguments to the VM output log as a warning. Behaves exactly like `print` (including the `core.luau.pretty_print` setting toggle), but the message is tagged at the warning level so it stands out. ### Method () → () ### Parameters #### Path Parameters - **...** (any) - Required - The values to warn with. ### Response #### Success Response () - Returns nothing. #### Response Example (No specific example provided in source) ``` -------------------------------- ### Listening to Activation Events Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-gui/keybinds Sets up a callback function that fires when the keybind's active state changes (e.g., toggled on/off, or key pressed/released for PressAndHold). ```lua bind:on_activated(function(active: boolean) if active then print("ACTIVE") else print("idle") end end) ``` -------------------------------- ### Get Nil Parented Instances Source: https://docs.rbxcli.dev/libraries/rbxcli Returns instances that are currently parented to nil within the instance cache on Roblox. ```Lua rbxcli.get_nil_instances() -> { Instance } ``` -------------------------------- ### lib.fs.create_directory Source: https://docs.rbxcli.dev/rbxcli_docs.json Creates a directory, including any missing parent directories, at the specified path. Errors if the path already exists as a file or directory. ```APIDOC ## lib.fs.create_directory ### Description Creates a directory, including any missing parent directories, at the specified path. Errors if the path already exists as a file or directory. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Method Not applicable (function call) ### Endpoint Not applicable (function call) ### Request Example ```lua -- Example usage: fs.create_directory("my_folder/sub_folder") ``` ### Response #### Success Response - **nil** (nil) - Indicates successful creation. #### Response Example ```json { "example": null } ``` ``` -------------------------------- ### add_ttf_font Source: https://docs.rbxcli.dev/libraries/font Adds a font given its binary TrueType font data to the custom fonts folder of this RbxCli installation. ```APIDOC ## add_ttf_font(fontName: string, ttfData: buffer): boolean ### Description Adds a font given its binary TrueType font data to the custom fonts folder of this RbxCli installation. Returns `true` if the font is successfully added. ### Parameters #### Path Parameters - **fontName** (string) - Required - The name of the font. - **ttfData** (buffer) - Required - The TTF data. ### Response #### Success Response (true) - **boolean** - Returns `true` if the font is successfully added. ``` -------------------------------- ### Create a Basic Tab with Controls Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-gui/getting-started This snippet demonstrates the minimal code required to create a tab, add a category, and include a label and a button. ```lua local gui = rbxcli_gui local tab = gui.add_tab("Hello", { icon = Enum.TabIcon.Code }) local cat = tab:add_category("Greeting") cat:add_label("This is a script-owned tab.") cat:add_button("Click me", function() print("clicked") end) ``` -------------------------------- ### GuiLabel Source: https://docs.rbxcli.dev/rbxcli_docs.json Represents a static text label. It displays text and provides methods to get and set the text, and manage visibility. ```APIDOC ## GuiLabel ### Description Static text proxy returned by `GuiCategory:add_label`. Displays text and allows for text updates and visibility control. ### Fields - **category** (GuiCategory?) - Back-reference to the owning category. `nil` after the owning tab is gone. - **destroy** (() -> ()) - Marks the label destroyed. - **get_text** (() -> string) - Returns the displayed text. - **is_destroyed** (() -> boolean) - Returns the destroyed flag. - **is_visible** (() -> boolean) - Returns the visibility flag. - **kind** (ControlKind) - Always `Enum.ControlKind.Label`. - **label** (string) - Current label text. - **name** (string) - Alias for `label`. - **set_label** ((text: string) -> ()) - Replaces the displayed text. Equivalent to `set_text`. - **set_text** ((text: string) -> ()) - Replaces the displayed text. ``` -------------------------------- ### Instance Methods Source: https://docs.rbxcli.dev/instances/Instance Methods available on the Instance class. ```APIDOC ## Instance Methods ### GetChildren - **Description**: Returns a table of the instance's direct children. - **Returns**: { Instance } ### GetDescendants - **Description**: Returns a table of all descendants of the instance. - **Returns**: { Instance } ### GetFullName - **Description**: Returns the full hierarchical name of the instance. - **Returns**: string ### IsA - **Description**: Checks if the instance is of a specific class or inherits from it. - **Parameters**: - **className** (string) - The name of the class to check against. - **Returns**: boolean ### OfClass - **Description**: Checks whether the instance class name is the same as the one provided. Does not check inheritance. - **Parameters**: - **className** (string) - The name of the class to check against. - **Returns**: boolean ### FindFirstChild - **Description**: Finds the first child of the instance that matches the given name. - **Parameters**: - **name** (string) - The name of the child to find. - **Returns**: Instance ### FindFirstChildCached - **Description**: Equivalent to FindFirstChild but first looks up an internal cache, if it doesn't find it there, it will fallback to normal FindFirstChild. - **Parameters**: - **name** (string) - The name of the child to find. - **Returns**: Instance ### FindFirstChildOfClass - **Description**: Finds the first child of the instance that is of the specified class. - **Parameters**: - **className** (string) - The name of the class to find. - **Returns**: Instance ### FindFirstChildWhichIsA - **Description**: Finds the first child of the instance that is of the specified class or inherits from it. - **Parameters**: - **className** (string) - The name of the class to find. - **Returns**: Instance ### GetAttribute - **Description**: Gets the value of an attribute from the instance. - **Parameters**: - **name** (string) - The name of the attribute. - **Returns**: any ### SetAttribute - **Description**: Sets the value of an attribute on the instance. - **Parameters**: - **name** (string) - The name of the attribute. - **value** (any) - The value to set the attribute to. - **Returns**: () ### GetAttributes - **Description**: Returns a table of all attributes on the instance. - **Returns**: { string: any } ### GetTags - **Description**: Returns all tags associated with the instance. - **Returns**: ...any ### HasTag - **Description**: Checks if the instance has a specific tag. - **Parameters**: - **tag** (string) - The tag to check for. - **Returns**: boolean ### IsAncestorOf - **Description**: Checks if the given instance is an ancestor of this instance. - **Parameters**: - **instance** (Instance) - The instance to check. - **Returns**: boolean ### IsInvalidInstance - **Description**: Performs a series of checks to determine if the instance is invalid (deleted). Use sparingly as running it too often can be expensive. - **Returns**: boolean ### WaitForChild - **Description**: Waits for a child with the specified name to be added to the instance and returns it. If the child is already present, it returns it immediately. This method yields until the child is found. - **Parameters**: - **name** (string) - The name of the child to wait for. - **Returns**: () ``` -------------------------------- ### Reload-Safe Tab Setup Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-gui/lifecycle-and-cleanup Provides a pattern to prevent duplicate tabs from being added during script reloads by removing the tab if it already exists. ```lua local TAB_NAME = "My Script" pcall(function() rbxcli_gui.remove_tab(TAB_NAME) end) local tab = rbxcli_gui.add_tab(TAB_NAME, { icon = Enum.TabIcon.Code }) local main = tab:add_category("Main") main:add_toggle("Enable", false) main:add_slider("FOV", 0, 180, 90, Enum.SliderValueType.Int) ``` -------------------------------- ### GuiInput Methods Source: https://docs.rbxcli.dev/datatypes/GuiInput Provides an overview of the methods available for interacting with GuiInput objects. ```APIDOC ## GuiInput Methods ### Description Provides methods to manage and retrieve information about a single-line text input. ### Methods - **`destroy()`** Marks the input as destroyed. - **`get_text()` -> `string`** Returns the current text content of the input field. - **`is_destroyed()` -> `boolean`** Checks if the input has been marked as destroyed. - **`is_visible()` -> `boolean`** Checks if the input is currently visible. - **`on_changed(callback: (value: string) -> ()) -> GuiConnection`** Registers a callback function to be executed when the input's value changes. The callback fires on commit, not per keystroke. - **`set_label(text: string)`** Sets or replaces the label text for the input. - **`set_text(text: string)`** Sets the text content of the input field. This action fires the change callback on the next main-thread turn. - **`set_visible(visible: boolean)`** Sets the visibility of the input field, showing or hiding it as specified. ``` -------------------------------- ### Keybind Control Methods Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-ui-legacy/kind-specific-methods Set and get the key code for a keybind control using set_key() and get_key(). The key is represented by its numeric code. ```lua local kb = cat:add_keybind("Aim Key", 0, 0, function(key: number) print("bound:", key) end) kb:set_key(65) -- bound to key code 65 (A on US layout) print(kb:get_key()) -- 65 ``` -------------------------------- ### create_instance Source: https://docs.rbxcli.dev/libraries/rbxcli Creates a new instance of a specified class and parents it to a given instance using Hybrid Mode. Returns the created instance or an error message. ```APIDOC ## create_instance ### Description Creates a new instance of `className` parented to `parent` via Hybrid Mode. Returns the new Instance on success, or `nil, errorMessage` on failure. ### Parameters #### Path Parameters - **className** (string) - Required - Class name of the instance to create. - **parent** (Instance) - Required - Parent for the new instance. ### Errors - `hybrid mode disabled` - Hybrid mode not enabled. - `hybrid mode not ready` - Hybrid bridge has not finished initialising. ``` -------------------------------- ### Get Instance Cache Source: https://docs.rbxcli.dev/libraries/rbxcli Retrieves the instance cache from the Roblox Luau VM. This function yields and may return an actor or main thread. ```Lua rbxcli.get_instances() -> RemoteGCTableProxy? ``` -------------------------------- ### List and Clear Registered Tabs Source: https://docs.rbxcli.dev/tutorials/api-usage/rbxcli-ui-legacy/creating-tabs Use `rbxcli_ui.list_tabs()` to get a list of all currently registered script-owned tabs. `rbxcli_ui.clear()` removes all script-owned tabs at once. ```lua for _, name in rbxcli_ui.list_tabs() do print("registered tab:", name) end rbxcli_ui.clear() -- remove every script-owned tab ``` -------------------------------- ### join_server Source: https://docs.rbxcli.dev/libraries/roblox Launches the Roblox client to join a specific place or server instance using the `roblox://` URL scheme. ```APIDOC ## join_server ### Description Launches the Roblox client to join the given place / server instance via the `roblox://` URL scheme. ### Method N/A (Function Call) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters - **placeId** (number) - Required - The PlaceId to join. - **gameInstanceId** (string?) - Optional - Optional server JobId; when present, joins that specific server. ### Returns - **boolean**: `true` if ShellExecute reported success (which only means the launcher was invoked, not that the join completed). ``` -------------------------------- ### lib.settings.list_namespaces Source: https://docs.rbxcli.dev/rbxcli_docs.json Lists all currently registered namespaces for settings. This is useful for discovering available configuration categories. ```APIDOC ## lib.settings.list_namespaces ### Description Lists all currently registered namespaces for settings. This is useful for discovering available configuration categories. ### Method function ### Parameters None ### Returns - **table** - Description: An array of namespace name strings. ``` -------------------------------- ### get_tracked_size Source: https://docs.rbxcli.dev/libraries/physics Gets the size of a part as it is recorded in the local physics simulation. This is useful for accurate spatial calculations based on the simulation's state. ```APIDOC ## get_tracked_size ### Description Returns the size of `part` as recorded in the local physics simulation. ### Parameters #### Path Parameters - **part** (BasePart) - Required - The tracked part. ### Returns - Vector3: The size of the part in the physics simulation. ### Errors - Errors if the part is not tracked. ``` -------------------------------- ### lib.fs.create_file Source: https://docs.rbxcli.dev/rbxcli_docs.json Creates an empty file at the specified path. Errors if the path already exists as a file or directory. ```APIDOC ## lib.fs.create_file ### Description Creates an empty file at the specified path. Errors if the path already exists as a file or directory. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Method Not applicable (function call) ### Endpoint Not applicable (function call) ### Request Example ```lua -- Example usage: fs.create_file("my_new_file.txt") ``` ### Response #### Success Response - **nil** (nil) - Indicates successful creation. #### Response Example ```json { "example": null } ``` ``` -------------------------------- ### Get Tracked Part Size Source: https://docs.rbxcli.dev/libraries/physics Returns the size of a part as recorded in the local physics simulation. This function errors if the part is not currently tracked by the simulation. ```lua get_tracked_size(part:BasePart) ``` -------------------------------- ### lib.settings.list_keys Source: https://docs.rbxcli.dev/rbxcli_docs.json Lists all setting keys registered within a specific namespace. This helps in identifying individual settings available under a given namespace. ```APIDOC ## lib.settings.list_keys ### Description Lists all setting keys registered within a specific namespace. This helps in identifying individual settings available under a given namespace. ### Method function ### Parameters #### Path Parameters - **namespace** (string) - Description: The namespace to list keys from. ### Errors - **LuaError unknown namespace** - Description: No namespace registered under that name. ### Returns - **table** - Description: An array of key strings. ``` -------------------------------- ### Get Tracked Part CFrame Source: https://docs.rbxcli.dev/libraries/physics Retrieves the CFrame (position and orientation) of a part as recorded in the local physics simulation. This function errors if the part is not currently tracked. ```lua get_tracked_cframe(part:BasePart) ``` -------------------------------- ### make_launch_url Source: https://docs.rbxcli.dev/libraries/roblox Constructs the launch URL that would be invoked by `join_server` without actually launching the client. Useful for diagnostics. ```APIDOC ## make_launch_url ### Description Returns the launch URL `roblox.join_server` would invoke without launching the client. Useful for copy-paste / diagnostics. ### Method N/A (Function Call) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters - **placeId** (number) - Required - The PlaceId to join. - **gameInstanceId** (string?) - Optional - Optional server JobId; when present, joins that specific server. ### Returns - **string**: The constructed launch URL. ``` -------------------------------- ### GuiInput Source: https://docs.rbxcli.dev/rbxcli_docs.json Represents a single-line text input field. It allows users to enter text, and provides methods to get and set the text, manage visibility, and register change callbacks. ```APIDOC ## GuiInput ### Description Single-line text input proxy returned by `GuiCategory:add_input`. Allows users to input text and provides methods for text manipulation and event handling. ### Fields - **category** (GuiCategory?) - Back-reference to the owning category. `nil` after the owning tab is gone. - **destroy** (() -> ()) - Marks the input destroyed. - **get_text** (() -> string) - Returns the current buffer contents. - **is_destroyed** (() -> boolean) - Returns the destroyed flag. - **is_visible** (() -> boolean) - Returns the visibility flag. - **kind** (ControlKind) - Always `Enum.ControlKind.Input`. - **label** (string) - Current label text. - **name** (string) - Alias for `label`. - **on_changed** ((callback: (value: string) -> ()) -> GuiConnection) - Registers an additional change listener. Fires on commit, not per keystroke. - **set_label** ((text: string) -> ()) - Replaces the label. - **set_text** ((text: string) -> ()) - Writes the buffer. Fires the change callback on the next main-thread turn. Not truncated by `max_length` even when the new string is longer; only typed entry is. - **set_visible** ((visible: boolean) -> ()) - Shows or hides the input. ### Remarks The constructor callback and any `on_changed` listener fire with the new string on commit. ``` -------------------------------- ### create_directory Source: https://docs.rbxcli.dev/libraries/fs Creates a directory, including any missing parent directories, at the specified path. Errors if the path already exists as a file or directory. ```APIDOC ## create_directory ### Description Creates a directory (and any missing parents) at `path`. Errors if the path already exists as a file or directory. ### Parameters #### Path Parameters - **path** (string) - Required - Directory path to create. ``` -------------------------------- ### Color3 Constructors Source: https://docs.rbxcli.dev/datatypes/Color3 Provides static methods to create new Color3 instances using different color models (RGB, HSV) or from a hex string. ```APIDOC ## Color3.new ### Description Returns a new Color3 with the specified normalized R, G, B values. ### Parameters * **red** (number) - Normalized red value, ranging from 0 to 1. Defaults to 0. * **green** (number) - Normalized green value, ranging from 0 to 1. Defaults to 0. * **blue** (number) - Normalized blue value, ranging from 0 to 1. Defaults to 0. ### Returns * Color3 ``` ```APIDOC ## Color3.fromRGB ### Description Returns a new Color3 with the specified R, G, B values. ### Parameters * **red** (number) - Red value, ranging from 0 to 255. Defaults to 0. * **green** (number) - Green value, ranging from 0 to 255. Defaults to 0. * **blue** (number) - Blue value, ranging from 0 to 255. Defaults to 0. ### Returns * Color3 ``` ```APIDOC ## Color3.fromHSV ### Description Returns a new Color3 with the specified normalized H, S, V values. ### Parameters * **hue** (number) - Normalized hue value, ranging from 0 to 1. Defaults to 0. * **saturation** (number) - Normalized saturation value, ranging from 0 to 1. Defaults to 0. * **value** (number) - Normalized value, ranging from 0 to 1. Defaults to 0. ### Returns * Color3 ``` ```APIDOC ## Color3.fromHex ### Description Returns a new Color3 from a hex colour string, e.g. `"#FF5733"` or `"FF5733"`. ### Parameters * **hex** (string) - The hex colour string. ### Returns * Color3 ``` -------------------------------- ### File System Module Source: https://docs.rbxcli.dev/rbxcli_docs.d.luau Provides asynchronous functions for file system operations like creating, writing, reading, and listing files and directories. ```APIDOC ## File System Module ### Description Asynchronous file system operations. ### File Operations - **create_file(path: string) -> nil** Creates a new file. @since 1.4.2-alpha - **write_async(path: string, data: buffer) -> nil** Asynchronously writes data to a file. @yields @since 1.4.2-alpha - **read_async(path: string) -> buffer** Asynchronously reads data from a file. @yields @since 1.4.2-alpha - **append_async(path: string, data: buffer) -> nil** Asynchronously appends data to a file. @yields @since 1.4.2-alpha - **is_file(path: string) -> boolean** Checks if a path is a file. @since 1.4.2-alpha ### Directory Operations - **create_directory(path: string) -> nil** Creates a new directory. @since 1.4.2-alpha - **is_directory(path: string) -> boolean** Checks if a path is a directory. @since 1.4.2-alpha - **list_directories(directory: string) -> { string }** Lists subdirectories within a directory. @since 1.4.2-alpha - **list_objects(directory: string) -> { string }** Lists all objects (files and directories) within a directory. @since 1.4.2-alpha - **list_files(directory: string) -> { string }** Lists files within a directory. @since 1.4.2-alpha ``` -------------------------------- ### Get GC Count by Type Source: https://docs.rbxcli.dev/tutorials/api-usage/getgc Prints the total number of objects of a specified type within the Luau VM heap. Use 'table', 'number', 'string', etc., as TYPE_NAME. Targeting 'table' is most common. ```lua print(#gc.getgc("TYPE_NAME")) ``` -------------------------------- ### UDim2 Constructors Source: https://docs.rbxcli.dev/datatypes/UDim2 Provides methods to create new UDim2 instances. ```APIDOC ## UDim2.new ### Description Creates a UDim2. Accepts either four numbers `(xScale, xOffset, yScale, yOffset)` or two UDim values `(x, y)`. ### Parameters - **xScale** (number | UDim) - X scale or X UDim. - **xOffset** (number | UDim?) - X offset or Y UDim. - **yScale** (number?) - Y scale (only when using 4-number form). - **yOffset** (number?) - Y offset (only when using 4-number form). ### Returns - UDim2 ``` ```APIDOC ## UDim2.fromScale ### Description Creates a UDim2 with scale components `(x, y)` and zero offsets. ### Parameters - **x** (number) - X scale. - **y** (number) - Y scale. ### Returns - UDim2 ``` ```APIDOC ## UDim2.fromOffset ### Description Creates a UDim2 with offset components `(x, y)` and zero scales. ### Parameters - **x** (number) - X offset. - **y** (number) - Y offset. ### Returns - UDim2 ``` -------------------------------- ### lib.roblox.make_launch_url Source: https://docs.rbxcli.dev/rbxcli_docs.json Constructs a URL to launch a specific Roblox game instance. This is useful for creating direct links to games or specific servers. ```APIDOC ## lib.roblox.make_launch_url ### Description Constructs a URL to launch a specific Roblox game instance. ### Method N/A (Function Call) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters - **placeId** (number) - Required - The ID of the Roblox place to launch. - **gameInstanceId** (string?) - Optional - The specific instance ID of the game server to join. ### Response #### Success Response - **string** - The generated launch URL. ``` -------------------------------- ### GuiButton Methods Source: https://docs.rbxcli.dev/datatypes/GuiButton This section details the methods available for interacting with a GuiButton instance. ```APIDOC ## GuiButton Methods ### Description Provides methods to manage and interact with a GUI button. ### Methods - **`destroy()`** Marks the button as destroyed. It will be removed visually on the next UI refresh. - **`is_destroyed()`** -> `boolean` Returns `true` if the button has been marked as destroyed, `false` otherwise. - **`is_visible()`** -> `boolean` Returns `true` if the button is currently visible, `false` otherwise. - **`on_changed(callback: () -> ())`** -> `GuiConnection` Registers a callback function to be executed when the button is pressed. The callback receives no arguments. Constructor callbacks fire first, followed by registered extras in order. - **`set_label(text: string)`** Sets or updates the text displayed on the button. - **`set_visible(visible: boolean)`** Controls the visibility of the button. Set to `true` to show, `false` to hide. ``` -------------------------------- ### HttpService.JSONEncode Source: https://docs.rbxcli.dev/rbxcli_docs.json Encodes a Luau table as a JSON string. Arrays (consecutive integer keys starting at 1) are encoded as JSON arrays; string-keyed tables become JSON objects; empty tables encode as []. ```APIDOC ## HttpService.JSONEncode ### Description Encodes a Luau table as a JSON string. Arrays (consecutive integer keys starting at 1) are encoded as JSON arrays; string-keyed tables become JSON objects; empty tables encode as []. ### Method JSONEncode ### Parameters - **table** (table) - Required - The table to encode. ### Returns - string ### Errors - VMException read failure -- Failed to read backing memory while executing this method. ### Realm vm ### Safety unsafe ### Since 1.6.9-1-alpha ``` -------------------------------- ### lib.memory.immediate_watch Source: https://docs.rbxcli.dev/rbxcli_docs.json Sets up an immediate memory watch where the handler runs inline on the polling thread. ```APIDOC ## lib.memory.immediate_watch ### Description Same as `memory.watch` but the handler runs inline on the polling thread while holding the VM lock. Use only for performance-critical paths where the deferred dispatch latency is too high; the handler will block further polling until it returns. ### Parameters #### Path Parameters - **address** (number) - Required - Remote address to watch. - **width** (number) - Required - Number of bytes to read per tick. - **refresh_rate_in_ms** (number) - Required - Poll interval in milliseconds. ### Remarks The handler executes inline on the polling thread while holding the VM lock; long-running handlers stall further polling. ### Errors - VMException library disabled -- Memory Library is disabled in the Configuration Tab. - LuaError invalid width -- `width` must be in [1, 4096]. - LuaError invalid refresh -- `refresh_rate_in_ms` is below the minimum poll interval. ### Returns - Event ``` -------------------------------- ### Get Tracked Part Physics Pool ID Source: https://docs.rbxcli.dev/libraries/physics Retrieves the physics pool ID for a tracked part's physics object. This can be compared against PhysicsPool constants to determine if the object is dynamic, mixed, or static. Errors if the part is not tracked. ```lua get_part_pool(part:BasePart) ``` -------------------------------- ### create_file Source: https://docs.rbxcli.dev/libraries/fs Creates an empty file at the specified path. Errors if the path already exists as a file or directory. ```APIDOC ## create_file ### Description Creates an empty file at `path`. Errors if the path already exists as a file or directory. ### Parameters #### Path Parameters - **path** (string) - Required - File path to create. ```