### Complete Setup with Secure Mode and Custom Icons
Source: https://docs.sirius.menu/rayfield/secure-mode
A comprehensive example demonstrating the setup of Rayfield with secure mode, a custom asset ID, and custom icons loaded via `getcustomasset()` for UI elements and notifications.
```lua
getgenv().RAYFIELD_SECURE = true
getgenv().RAYFIELD_ASSET_ID = 123456789
local Rayfield = loadstring(game:HttpGet("https://sirius.menu/rayfield"))()
local Window = Rayfield:CreateWindow({
Name = "My Script",
Icon = getcustomasset("my-icons/icon.png"),
})
local Tab = Window:CreateTab("Main", getcustomasset("my-icons/tab.png"))
Tab:CreateLabel("Status", getcustomasset("my-icons/status.png"))
Rayfield:Notify({
Title = "Loaded",
Content = "Script is ready",
Image = getcustomasset("my-icons/notif.png"),
Duration = 5,
})
```
--------------------------------
### Full Rayfield Integration Example
Source: https://docs.sirius.menu/rayfield/anti-detection
This example demonstrates how to set a custom asset ID and then load Rayfield. Ensure the custom asset ID is set before loading the script.
```lua
getgenv().RAYFIELD_ASSET_ID = 123456789
local Rayfield = loadstring(game:HttpGet("https://sirius.menu/rayfield"))()
local Window = Rayfield:CreateWindow({
Name = "My Script",
-- rest of your config
})
```
--------------------------------
### Define Custom Theme in Lua
Source: https://docs.sirius.menu/rayfield/themes
Pass a theme table to `ModifyTheme` or `CreateWindow` to define custom UI colors. This example shows a comprehensive set of color properties for various UI elements.
```lua
{
TextColor = Color3.fromRGB(240, 240, 240),
Background = Color3.fromRGB(25, 25, 25),
Topbar = Color3.fromRGB(34, 34, 34),
Shadow = Color3.fromRGB(20, 20, 20),
NotificationBackground = Color3.fromRGB(20, 20, 20),
NotificationActionsBackground = Color3.fromRGB(230, 230, 230),
TabBackground = Color3.fromRGB(80, 80, 80),
TabStroke = Color3.fromRGB(85, 85, 85),
TabBackgroundSelected = Color3.fromRGB(210, 210, 210),
TabTextColor = Color3.fromRGB(240, 240, 240),
SelectedTabTextColor = Color3.fromRGB(50, 50, 50),
ElementBackground = Color3.fromRGB(35, 35, 35),
ElementBackgroundHover = Color3.fromRGB(40, 40, 40),
SecondaryElementBackground = Color3.fromRGB(25, 25, 25),
ElementStroke = Color3.fromRGB(50, 50, 50),
SecondaryElementStroke = Color3.fromRGB(40, 40, 40),
SliderBackground = Color3.fromRGB(50, 138, 220),
SliderProgress = Color3.fromRGB(50, 138, 220),
SliderStroke = Color3.fromRGB(58, 163, 255),
ToggleBackground = Color3.fromRGB(30, 30, 30),
ToggleEnabled = Color3.fromRGB(0, 146, 214),
ToggleDisabled = Color3.fromRGB(100, 100, 100),
ToggleEnabledStroke = Color3.fromRGB(0, 170, 255),
ToggleDisabledStroke = Color3.fromRGB(125, 125, 125),
ToggleEnabledOuterStroke = Color3.fromRGB(100, 100, 100),
ToggleDisabledOuterStroke = Color3.fromRGB(65, 65, 65),
DropdownSelected = Color3.fromRGB(40, 40, 40),
DropdownUnselected = Color3.fromRGB(30, 30, 30),
InputBackground = Color3.fromRGB(30, 30, 30),
InputStroke = Color3.fromRGB(65, 65, 65),
PlaceholderColor = Color3.fromRGB(178, 178, 178)
}
```
--------------------------------
### Get Rayfield Model via Command Bar
Source: https://docs.sirius.menu/rayfield/anti-detection
Use this Lua command in the command bar to fetch the Rayfield model directly into your Roblox Studio workspace.
```lua
game:GetObjects("rbxassetid://10804731440")[1].Parent = workspace
```
--------------------------------
### Get Visibility
Source: https://docs.sirius.menu/rayfield/windows
Checks if the Rayfield interface is currently visible.
```APIDOC
### Get visibility
```lua theme={null}
Rayfield:IsVisible()
```
```
--------------------------------
### Get Interface Visibility
Source: https://docs.sirius.menu/rayfield/windows
Checks and returns the current visibility state of the Rayfield interface. Returns `true` if visible, `false` otherwise.
```lua
Rayfield:IsVisible()
```
--------------------------------
### Create and Update Color Picker
Source: https://docs.sirius.menu/rayfield/elements/interactive
Initializes a color picker and demonstrates updating the selected color.
```lua
local ColorPicker = Tab:CreateColorPicker({
Name = "Color Picker",
Color = Color3.fromRGB(255,255,255),
Flag = "ColorPicker1", -- A flag is the identifier for the configuration file; make sure every element has a different flag if you're using configuration saving to ensure no overlaps
Callback = function(Value)
-- The function that takes place every time the color picker is moved/changed
-- The variable (Value) is a Color3fromRGB value based on which color is selected
end
})
```
```lua
ColorPicker:Set(Color3.fromRGB(255,255,255))
```
--------------------------------
### Create and Manage Dropdown
Source: https://docs.sirius.menu/rayfield/elements/interactive
Creates a dropdown menu and demonstrates how to refresh the options list and set the selected option.
```lua
local Dropdown = Tab:CreateDropdown({
Name = "Dropdown Example",
Options = {"Option 1", "Option 2"},
CurrentOption = {"Option 1"},
MultipleOptions = false,
Flag = "Dropdown1", -- A flag is the identifier for the configuration file; make sure every element has a different flag if you're using configuration saving to ensure no overlaps
Callback = function(Options)
-- The function that takes place when the selected option is changed
-- The variable (Options) is a table of strings for the current selected options
end,
})
```
```lua
Dropdown:Refresh({"New Option 1","New Option 2"}) -- The new list of options
```
```lua
Dropdown:Set({"Option 2"}) -- "Option 2" will now be selected
```
--------------------------------
### Create a Paragraph
Source: https://docs.sirius.menu/rayfield/elements/text
Initializes a paragraph component with a title and content body.
```lua
local Paragraph = Tab:CreateParagraph({Title = "Paragraph Example", Content = "Paragraph Example"})
```
--------------------------------
### Initialize Rayfield Window
Source: https://docs.sirius.menu/rayfield/windows
Call this function once after loading the library to create the main UI window. It accepts a table of configuration options for UI behavior, themes, and system integrations.
```lua
local Window = Rayfield:CreateWindow({
Name = "Rayfield Example Window",
Icon = 0, -- Icon in Topbar. Can use Lucide Icons (string) or Roblox Image (number). 0 to use no icon (default).
LoadingTitle = "Rayfield Interface Suite",
LoadingSubtitle = "by Sirius",
ShowText = "Rayfield", -- for mobile users to unhide Rayfield, change if you'd like
Theme = "Default", -- Check https://docs.sirius.menu/rayfield/configuration/themes
ToggleUIKeybind = "K", -- The keybind to toggle the UI visibility (string like "K" or Enum.KeyCode)
DisableRayfieldPrompts = false,
DisableBuildWarnings = false, -- Prevents Rayfield from emitting warnings when the script has a version mismatch with the interface.
-- ScriptID = "sid_xxxxxxxxxxxx", -- Your Script ID from developer.sirius.menu — enables analytics, managed keys, and script hosting
ConfigurationSaving = {
Enabled = true,
FolderName = nil, -- Create a custom folder for your hub/game
FileName = "Big Hub"
},
Discord = {
Enabled = false, -- Prompt the user to join your Discord server if their executor supports it
Invite = "noinvitelink", -- The Discord invite code, do not include Discord.gg/. E.g. Discord.gg/ABCD would be ABCD
RememberJoins = true -- Set this to false to make them join the Discord every time they load it up
},
KeySystem = false, -- Set this to true to use our key system
KeySettings = {
Title = "Untitled",
Subtitle = "Key System",
Note = "No method of obtaining the key is provided", -- Use this to tell the user how to get a key
FileName = "Key", -- It is recommended to use something unique, as other scripts using Rayfield may overwrite your key file
SaveKey = true, -- The user's key will be saved, but if you change the key, they will be unable to use your script
GrabKeyFromSite = false, -- If this is true, set Key below to the RAW site you would like Rayfield to get the key from
Key = {"Hello"} -- List of keys that the system will accept, can be RAW file links (pastebin, github, etc.) or simple strings ("hello", "key22")
}
})
```
--------------------------------
### Create a Keybind
Source: https://docs.sirius.menu/rayfield/elements/keybinds
Demonstrates how to create a new keybind element in Rayfield. This includes setting its name, initial key, interaction behavior, a unique flag for configuration, and a callback function to execute when the keybind is activated.
```APIDOC
## Create a Keybind
### Description
Creates a new keybind element with specified properties.
### Method
`Tab:CreateKeybind`
### Parameters
- **Name** (string) - Required - The display name of the keybind.
- **CurrentKeybind** (string) - Required - The initial key assigned to the keybind (e.g., "Q").
- **HoldToInteract** (boolean) - Required - Determines if the keybind requires holding to activate.
- **Flag** (string) - Required - A unique identifier for saving/loading configurations.
- **Callback** (function) - Required - A function that executes when the keybind is triggered. Receives a boolean indicating if the key is being held (if `HoldToInteract` is true).
### Request Example
```lua
local Keybind = Tab:CreateKeybind({
Name = "Keybind Example",
CurrentKeybind = "Q",
HoldToInteract = false,
Flag = "Keybind1",
Callback = function(Keybind) end,
})
```
```
--------------------------------
### Create and Update Button
Source: https://docs.sirius.menu/rayfield/elements/interactive
Defines a button with a callback and demonstrates how to update its label.
```lua
local Button = Tab:CreateButton({
Name = "Button Example",
Callback = function()
-- The function that takes place when the button is pressed
end,
})
```
```lua
Button:Set("Button Example")
```
--------------------------------
### Create and Update Input
Source: https://docs.sirius.menu/rayfield/elements/interactive
Creates a text input field and demonstrates how to update its content programmatically.
```lua
local Input = Tab:CreateInput({
Name = "Input Example",
CurrentValue = "",
PlaceholderText = "Input Placeholder",
RemoveTextAfterFocusLost = false,
Flag = "Input1",
Callback = function(Text)
-- The function that takes place when the input is changed
-- The variable (Text) is a string for the value in the text box
end,
})
```
```lua
Input:Set("New Text") -- The new input text value
```
--------------------------------
### Rayfield Window Initialization
Source: https://docs.sirius.menu/rayfield/windows
Configuration options for the Rayfield window initialization object.
```APIDOC
## Rayfield Window Configuration
### Description
Defines the settings object used to initialize the Rayfield UI library.
### Request Body
- **Name** (string) - Required - The title displayed in the window header.
- **Icon** (number | string) - Optional - Icon shown in the topbar. Pass a Roblox image ID (number), a Lucide icon name (string), or 0 for no icon.
- **LoadingTitle** (string) - Optional - Title shown on the loading screen.
- **LoadingSubtitle** (string) - Optional - Subtitle shown on the loading screen.
- **ShowText** (string) - Optional - Text shown to mobile users to unhide the UI.
- **Theme** (string | table) - Optional - The theme to apply.
- **ToggleUIKeybind** (string | Enum.KeyCode) - Optional - The key that toggles UI visibility.
- **DisableRayfieldPrompts** (boolean) - Optional - Suppresses built-in Rayfield prompts.
- **DisableBuildWarnings** (boolean) - Optional - Prevents Rayfield from emitting warnings.
- **ScriptID** (string) - Optional - Your Script ID from the Sirius Developer Platform.
- **ConfigurationSaving** (object) - Optional - Controls automatic configuration saving.
- **Enabled** (boolean) - Optional
- **FolderName** (string | nil) - Optional
- **FileName** (string) - Optional
- **Discord** (object) - Optional - Prompts the user to join your Discord server.
- **Enabled** (boolean) - Optional
- **Invite** (string) - Optional
- **RememberJoins** (boolean) - Optional
- **KeySystem** (boolean) - Optional - Enables the key system.
- **KeySettings** (object) - Optional - Settings for the key system.
- **Title** (string) - Optional
- **Subtitle** (string) - Optional
- **Note** (string) - Optional
- **FileName** (string) - Optional
- **SaveKey** (boolean) - Optional
- **GrabKeyFromSite** (boolean) - Optional
- **Key** (table) - Optional
```
--------------------------------
### Create and Update Toggle
Source: https://docs.sirius.menu/rayfield/elements/interactive
Creates a toggle element and shows how to programmatically set its state.
```lua
local Toggle = Tab:CreateToggle({
Name = "Toggle Example",
CurrentValue = false,
Flag = "Toggle1", -- A flag is the identifier for the configuration file; make sure every element has a different flag if you're using configuration saving to ensure no overlaps
Callback = function(Value)
-- The function that takes place when the toggle is pressed
-- The variable (Value) is a boolean on whether the toggle is true or false
end,
})
```
```lua
Toggle:Set(false)
```
--------------------------------
### Create a Rayfield Keybind
Source: https://docs.sirius.menu/rayfield/elements/keybinds
Initializes a new keybind element within a tab. Ensure the flag is unique to prevent configuration conflicts.
```lua
local Keybind = Tab:CreateKeybind({
Name = "Keybind Example",
CurrentKeybind = "Q",
HoldToInteract = false,
Flag = "Keybind1", -- A flag is the identifier for the configuration file. Make sure every element has a different flag if you're using configuration saving to ensure no overlaps
Callback = function(Keybind)
-- The function that takes place when the keybind is pressed
-- The variable (Keybind) is a boolean for whether the keybind is being held or not (HoldToInteract needs to be true)
end,
})
```
--------------------------------
### Create a Tab
Source: https://docs.sirius.menu/rayfield/windows
How to create a new tab within a Rayfield window.
```APIDOC
## Window:CreateTab
### Description
Creates a new top-level section inside a window.
### Request Example
```lua
local Tab = Window:CreateTab("Tab Example", 4483362458) -- Title, Image
```
```
--------------------------------
### Input API
Source: https://docs.sirius.menu/rayfield/elements/interactive
This section details how to create and update input fields in the Sirius Menu.
```APIDOC
## POST /api/inputs
### Description
Creates a new input field element.
### Method
POST
### Endpoint
/api/inputs
### Parameters
#### Request Body
- **Name** (string) - Required - The name of the input field.
- **CurrentValue** (string) - Required - The initial value of the input field.
- **PlaceholderText** (string) - Optional - The placeholder text to display when the input is empty.
- **RemoveTextAfterFocusLost** (boolean) - Optional - Whether to remove text after the input loses focus.
- **Flag** (string) - Required - A unique identifier for the input field, used for saving configurations.
- **Callback** (function) - Required - The function to execute when the input field's text changes.
### Request Example
```json
{
"Name": "Input Example",
"CurrentValue": "",
"PlaceholderText": "Enter text here",
"RemoveTextAfterFocusLost": false,
"Flag": "Input1",
"Callback": "function(Text) -- code here end"
}
```
### Response
#### Success Response (200)
- **Input** (object) - The created input field object.
#### Response Example
```json
{
"Input": "{...}"
}
```
## PUT /api/inputs/{flag}
### Description
Updates the text of an existing input field.
### Method
PUT
### Endpoint
/api/inputs/{flag}
### Parameters
#### Path Parameters
- **flag** (string) - Required - The flag identifier of the input field to update.
#### Request Body
- **Text** (string) - Required - The new text for the input field.
### Request Example
```json
{
"Text": "New Input Text"
}
```
### Response
#### Success Response (200)
- **Status** (string) - Indicates the success of the operation.
#### Response Example
```json
{
"Status": "Success"
}
```
```
--------------------------------
### Set Rayfield theme during initialization
Source: https://docs.sirius.menu/rayfield/themes
Defines the theme property when creating a new window.
```lua
local Window = Rayfield:CreateWindow({
Theme = "Default",
-- ...
})
```
--------------------------------
### Create a Label
Source: https://docs.sirius.menu/rayfield/elements/text
Initializes a new label component within a tab. Supports both Roblox image IDs and Lucide icon names.
```lua
local Label = Tab:CreateLabel("Label Example", 4483362458, Color3.fromRGB(255, 255, 255), false) -- Title, Icon, Color, IgnoreTheme
```
```lua
local Label = Tab:CreateLabel("Label Example", "rewind")
```
--------------------------------
### Load Rayfield Library
Source: https://docs.sirius.menu/rayfield/getting-started
Add this line at the top of your script to load the Rayfield library. Ensure you have an active internet connection to fetch the library.
```lua
local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
```
--------------------------------
### Create a Section
Source: https://docs.sirius.menu/rayfield/windows
Sections add a labelled group header inside a tab to organize UI elements.
```APIDOC
## Create a section
Sections add a labelled group header inside a tab.
```lua theme={null}
local Section = Tab:CreateSection("Section Example")
```
```
--------------------------------
### Create Tab with Lucide Icon
Source: https://docs.sirius.menu/rayfield/windows
Creates a new tab in the UI. Supports Lucide icon names for the tab's icon. Ensure the icon is supported by checking the provided list.
```lua
local Tab = Window:CreateTab("Tab Example", "rewind")
```
--------------------------------
### Create and Update Slider
Source: https://docs.sirius.menu/rayfield/elements/interactive
Creates a slider with a defined range and increment, and shows how to update its value.
```lua
local Slider = Tab:CreateSlider({
Name = "Slider Example",
Range = {0, 100},
Increment = 10,
Suffix = "Bananas",
CurrentValue = 10,
Flag = "Slider1", -- A flag is the identifier for the configuration file; make sure every element has a different flag if you're using configuration saving to ensure no overlaps
Callback = function(Value)
-- The function that takes place when the slider changes
-- The variable (Value) is a number that correlates to the value the slider is currently at
end,
})
```
```lua
Slider:Set(10) -- The new slider integer value
```
--------------------------------
### Send a notification
Source: https://docs.sirius.menu/rayfield/notifications
This section details how to send a basic notification with a title, content, duration, and an image.
```APIDOC
## Send a notification
### Description
Sends a notification to the user with specified details.
### Method
`Rayfield:Notify`
### Parameters
#### Request Body
- **Title** (string) - Required - The notification title.
- **Content** (string) - Required - The notification body text.
- **Duration** (number) - Optional - How long the notification stays visible, in seconds.
- **Image** (number | string) - Optional - Icon for the notification. Pass a Roblox image ID (number) or a Lucide icon name (string).
### Request Example
```lua
Rayfield:Notify({
Title = "Notification Title",
Content = "Notification Content",
Duration = 6.5,
Image = 4483362458,
})
```
### Response
This function does not return a value.
```
--------------------------------
### Using Custom Assets for Icons in Secure Mode
Source: https://docs.sirius.menu/rayfield/secure-mode
In secure mode, standard Lucide icon names and Roblox image IDs are blocked. Use `getcustomasset()` to load icons from custom files stored on the executor's filesystem. This applies to various UI elements like labels, windows, and notifications.
```lua
-- Blocked in secure mode:
Tab:CreateLabel("Hello", "alert-circle")
Tab:CreateLabel("Hello", 12345678)
-- Works in every mode:
Tab:CreateLabel("Hello", getcustomasset("my-icons/alert.png"))
```
--------------------------------
### Button API
Source: https://docs.sirius.menu/rayfield/elements/interactive
This section details how to create and update buttons in the Sirius Menu.
```APIDOC
## POST /api/buttons
### Description
Creates a new button element.
### Method
POST
### Endpoint
/api/buttons
### Request Body
- **Name** (string) - Required - The name of the button.
- **Callback** (function) - Required - The function to execute when the button is pressed.
### Request Example
```json
{
"Name": "Button Example",
"Callback": "function() -- code here end"
}
```
### Response
#### Success Response (200)
- **Button** (object) - The created button object.
#### Response Example
```json
{
"Button": "{...}"
}
```
## PUT /api/buttons/{id}
### Description
Updates the text of an existing button.
### Method
PUT
### Endpoint
/api/buttons/{id}
### Parameters
#### Path Parameters
- **id** (string) - Required - The unique identifier of the button to update.
#### Request Body
- **Text** (string) - Required - The new text for the button.
### Request Example
```json
{
"Text": "New Button Text"
}
```
### Response
#### Success Response (200)
- **Status** (string) - Indicates the success of the operation.
#### Response Example
```json
{
"Status": "Success"
}
```
```
--------------------------------
### Enable Configuration Saving
Source: https://docs.sirius.menu/rayfield/getting-started
Call this function after all elements have been created to enable Rayfield's automatic configuration saving and restoration. Each element that supports configuration saving must have a unique `Flag` field.
```lua
Rayfield:LoadConfiguration()
```
--------------------------------
### Lucide icon support
Source: https://docs.sirius.menu/rayfield/notifications
Demonstrates how to use Lucide icon names instead of Roblox image IDs for notification icons.
```APIDOC
## Lucide icon support
### Description
Allows using Lucide icon names for notification icons, offering more flexibility than just Roblox image IDs.
### Method
`Rayfield:Notify` with `Image` parameter as a string.
### Endpoint
N/A (This is a function call within the Rayfield API)
### Parameters
#### Request Body
- **Image** (string) - Required - The name of a Lucide icon.
### Request Example
```lua
Rayfield:Notify({
Title = "Notification Title",
Content = "Notification Content",
Duration = 6.5,
Image = "rewind",
})
```
### Notes
- Not all Lucide icons are supported. Refer to the [full list of supported icons](https://github.com/latte-soft/lucide-roblox/tree/master/icons/compiled/48px).
- Lucide icons and Roblox image IDs are detectable by game anti-cheats. For undetectable scripts, use `getcustomasset()` and refer to [Secure Mode](/rayfield/secure-mode).
```
--------------------------------
### Toggle API
Source: https://docs.sirius.menu/rayfield/elements/interactive
This section details how to create and update toggles in the Sirius Menu.
```APIDOC
## POST /api/toggles
### Description
Creates a new toggle element.
### Method
POST
### Endpoint
/api/toggles
### Parameters
#### Request Body
- **Name** (string) - Required - The name of the toggle.
- **CurrentValue** (boolean) - Required - The initial state of the toggle (true or false).
- **Flag** (string) - Required - A unique identifier for the toggle, used for saving configurations.
- **Callback** (function) - Required - The function to execute when the toggle's state changes.
### Request Example
```json
{
"Name": "Toggle Example",
"CurrentValue": false,
"Flag": "Toggle1",
"Callback": "function(Value) -- code here end"
}
```
### Response
#### Success Response (200)
- **Toggle** (object) - The created toggle object.
#### Response Example
```json
{
"Toggle": "{...}"
}
```
## PUT /api/toggles/{flag}
### Description
Updates the state of an existing toggle.
### Method
PUT
### Endpoint
/api/toggles/{flag}
### Parameters
#### Path Parameters
- **flag** (string) - Required - The flag identifier of the toggle to update.
#### Request Body
- **Value** (boolean) - Required - The new state of the toggle (true or false).
### Request Example
```json
{
"Value": true
}
```
### Response
#### Success Response (200)
- **Status** (string) - Indicates the success of the operation.
#### Response Example
```json
{
"Status": "Success"
}
```
```
--------------------------------
### Dropdown API
Source: https://docs.sirius.menu/rayfield/elements/interactive
This section details how to create and update dropdowns in the Sirius Menu.
```APIDOC
## POST /api/dropdowns
### Description
Creates a new dropdown element.
### Method
POST
### Endpoint
/api/dropdowns
### Parameters
#### Request Body
- **Name** (string) - Required - The name of the dropdown.
- **Options** (table) - Required - A table of strings representing the available options.
- **CurrentOption** (table) - Required - A table containing the currently selected option(s).
- **MultipleOptions** (boolean) - Required - Whether the dropdown allows multiple selections.
- **Flag** (string) - Required - A unique identifier for the dropdown, used for saving configurations.
- **Callback** (function) - Required - The function to execute when the selected option changes.
### Request Example
```json
{
"Name": "Dropdown Example",
"Options": ["Option 1", "Option 2"],
"CurrentOption": ["Option 1"],
"MultipleOptions": false,
"Flag": "Dropdown1",
"Callback": "function(Options) -- code here end"
}
```
### Response
#### Success Response (200)
- **Dropdown** (object) - The created dropdown object.
#### Response Example
```json
{
"Dropdown": "{...}"
}
```
## PUT /api/dropdowns/{flag}/refresh
### Description
Refreshes the option list of an existing dropdown.
### Method
PUT
### Endpoint
/api/dropdowns/{flag}/refresh
### Parameters
#### Path Parameters
- **flag** (string) - Required - The flag identifier of the dropdown to update.
#### Request Body
- **Options** (table) - Required - A table of strings representing the new list of options.
### Request Example
```json
{
"Options": ["New Option 1", "New Option 2"]
}
```
### Response
#### Success Response (200)
- **Status** (string) - Indicates the success of the operation.
#### Response Example
```json
{
"Status": "Success"
}
```
## PUT /api/dropdowns/{flag}/set
### Description
Sets the selected option(s) of an existing dropdown.
### Method
PUT
### Endpoint
/api/dropdowns/{flag}/set
### Parameters
#### Path Parameters
- **flag** (string) - Required - The flag identifier of the dropdown to update.
#### Request Body
- **Options** (table) - Required - A table of strings representing the option(s) to set as selected.
### Request Example
```json
{
"Options": ["Option 2"]
}
```
### Response
#### Success Response (200)
- **Status** (string) - Indicates the success of the operation.
#### Response Example
```json
{
"Status": "Success"
}
```
```
--------------------------------
### Color Picker API
Source: https://docs.sirius.menu/rayfield/elements/interactive
This section details how to create and update color pickers in the Sirius Menu.
```APIDOC
## POST /api/colorpickers
### Description
Creates a new color picker element.
### Method
POST
### Endpoint
/api/colorpickers
### Parameters
#### Request Body
- **Name** (string) - Required - The name of the color picker.
- **Color** (Color3) - Required - The initial color of the color picker.
- **Flag** (string) - Required - A unique identifier for the color picker, used for saving configurations.
- **Callback** (function) - Required - The function to execute when the color picker's value changes.
### Request Example
```json
{
"Name": "Color Picker",
"Color": "Color3.fromRGB(255,255,255)",
"Flag": "ColorPicker1",
"Callback": "function(Value) -- code here end"
}
```
### Response
#### Success Response (200)
- **ColorPicker** (object) - The created color picker object.
#### Response Example
```json
{
"ColorPicker": "{...}"
}
```
## PUT /api/colorpickers/{flag}
### Description
Updates the color of an existing color picker.
### Method
PUT
### Endpoint
/api/colorpickers/{flag}
### Parameters
#### Path Parameters
- **flag** (string) - Required - The flag identifier of the color picker to update.
#### Request Body
- **Color** (Color3) - Required - The new color for the color picker.
### Request Example
```json
{
"Color": "Color3.fromRGB(0,0,0)"
}
```
### Response
#### Success Response (200)
- **Status** (string) - Indicates the success of the operation.
#### Response Example
```json
{
"Status": "Success"
}
```
```
--------------------------------
### Update a Keybind
Source: https://docs.sirius.menu/rayfield/elements/keybinds
Shows how to change the assigned key for an existing keybind element.
```APIDOC
## Update a Keybind
### Description
Updates the key assigned to an existing keybind.
### Method
`Keybind:Set`
### Parameters
- **Keybind** (string) - Required - The new key to assign to the keybind (e.g., "RightCtrl").
### Request Example
```lua
Keybind:Set("RightCtrl")
```
```
--------------------------------
### Modify Rayfield theme at runtime
Source: https://docs.sirius.menu/rayfield/themes
Updates the active theme of an existing window instance.
```lua
Window.ModifyTheme('Default')
```
--------------------------------
### Create Section in Tab
Source: https://docs.sirius.menu/rayfield/windows
Adds a labelled section header within a tab to group related UI elements. Use this to organize content effectively.
```lua
local Section = Tab:CreateSection("Section Example")
```
--------------------------------
### Update a Paragraph
Source: https://docs.sirius.menu/rayfield/elements/text
Updates the title and content of an existing paragraph instance.
```lua
Paragraph:Set({Title = "Paragraph Example", Content = "Paragraph Example"})
```
--------------------------------
### Create a Tab in Rayfield
Source: https://docs.sirius.menu/rayfield/windows
Use this to create a new tab within a Rayfield window. Pass the desired tab title and an image ID for the tab icon.
```lua
local Tab = Window:CreateTab("Tab Example", 4483362458) -- Title, Image
```
--------------------------------
### Send a notification with a Lucide icon
Source: https://docs.sirius.menu/rayfield/notifications
Displays a notification using a string name to reference a supported Lucide icon.
```lua
Rayfield:Notify({
Title = "Notification Title",
Content = "Notification Content",
Duration = 6.5,
Image = "rewind",
})
```
--------------------------------
### Access Rayfield Flags
Source: https://docs.sirius.menu/rayfield/elements/interactive
Shows how to access the global flags table to read current element values.
```lua
Rayfield.Flags
```
--------------------------------
### Set Interface Visibility
Source: https://docs.sirius.menu/rayfield/windows
Globally controls the visibility of the entire Rayfield interface. Setting it to `false` hides the interface.
```lua
Rayfield:SetVisibility(false)
```
--------------------------------
### Reading Element Values
Source: https://docs.sirius.menu/rayfield/elements/interactive
This section explains how to read the current values of interactive elements.
```APIDOC
## GET /api/elements/{element_name}/value
### Description
Retrieves the current value of a specified interactive element.
### Method
GET
### Endpoint
/api/elements/{element_name}/value
### Parameters
#### Path Parameters
- **element_name** (string) - Required - The name of the element (e.g., 'Input1', 'Toggle1', 'Slider1').
### Response
#### Success Response (200)
- **Value** (any) - The current value of the element. The type depends on the element (e.g., string for input, boolean for toggle, number for slider, table for dropdown).
#### Response Example
```json
{
"Value": "Current Input Text"
}
```
## GET /api/flags/values
### Description
Retrieves all saved flag values from the configuration.
### Method
GET
### Endpoint
/api/flags/values
### Response
#### Success Response (200)
- **Flags** (object) - An object containing key-value pairs of all saved flags and their current values.
#### Response Example
```json
{
"Flags": {
"Toggle1": true,
"Slider1": 50,
"ColorPicker1": "Color3.fromRGB(100,100,100)"
}
}
```
```
--------------------------------
### Enable Secure Mode and Set Custom Asset ID
Source: https://docs.sirius.menu/rayfield/secure-mode
Set the RAYFIELD_SECURE and RAYFIELD_ASSET_ID flags before loading Rayfield to enable secure mode and use a custom asset ID for the Rayfield model. This is essential for maximum anti-detection.
```lua
getgenv().RAYFIELD_SECURE = true
getgenv().RAYFIELD_ASSET_ID = 123456789 -- your re-uploaded model
local Rayfield = loadstring(game:HttpGet("https://sirius.menu/rayfield"))()
```
--------------------------------
### Slider API
Source: https://docs.sirius.menu/rayfield/elements/interactive
This section details how to create and update sliders in the Sirius Menu.
```APIDOC
## POST /api/sliders
### Description
Creates a new slider element.
### Method
POST
### Endpoint
/api/sliders
### Parameters
#### Request Body
- **Name** (string) - Required - The name of the slider.
- **Range** (table) - Required - A table containing the minimum and maximum values for the slider (e.g., `{0, 100}`).
- **Increment** (number) - Required - The increment value for the slider.
- **Suffix** (string) - Optional - A suffix to display next to the slider value.
- **CurrentValue** (number) - Required - The initial value of the slider.
- **Flag** (string) - Required - A unique identifier for the slider, used for saving configurations.
- **Callback** (function) - Required - The function to execute when the slider's value changes.
### Request Example
```json
{
"Name": "Slider Example",
"Range": [0, 100],
"Increment": 10,
"Suffix": "Bananas",
"CurrentValue": 10,
"Flag": "Slider1",
"Callback": "function(Value) -- code here end"
}
```
### Response
#### Success Response (200)
- **Slider** (object) - The created slider object.
#### Response Example
```json
{
"Slider": "{...}"
}
```
## PUT /api/sliders/{flag}
### Description
Updates the value of an existing slider.
### Method
PUT
### Endpoint
/api/sliders/{flag}
### Parameters
#### Path Parameters
- **flag** (string) - Required - The flag identifier of the slider to update.
#### Request Body
- **Value** (number) - Required - The new value for the slider.
### Request Example
```json
{
"Value": 50
}
```
### Response
#### Success Response (200)
- **Status** (string) - Indicates the success of the operation.
#### Response Example
```json
{
"Status": "Success"
}
```
```
--------------------------------
### Label API
Source: https://docs.sirius.menu/rayfield/elements/text
This section covers the creation and updating of labels in Rayfield, including support for Lucide icons.
```APIDOC
## Label API
### Description
Provides functionality to create and update labels within the Rayfield UI.
### Create Label
```lua theme={null}
local Label = Tab:CreateLabel("Label Example", 4483362458, Color3.fromRGB(255, 255, 255), false) -- Title, Icon, Color, IgnoreTheme
```
### Lucide Icon Support
Labels can utilize Lucide icon names instead of Roblox image IDs for icons.
```lua theme={null}
local Label = Tab:CreateLabel("Label Example", "rewind")
```
Not all Lucide icons are supported. See the [full list of supported icons](https://github.com/latte-soft/lucide-roblox/tree/master/icons/compiled/48px). Credit to [Lucide](https://lucide.dev/) and [Latte Softworks](https://github.com/latte-soft/).
Lucide icons and Roblox image IDs are detectable by game anti-cheats. If you need your script to be undetectable, use `getcustomasset()` instead. See [Secure Mode](/rayfield/secure-mode) for details.
### Update Label
```lua theme={null}
Label:Set("Label Example", 4483362458, Color3.fromRGB(255, 255, 255), false) -- Title, Icon, Color, IgnoreTheme
```
```
--------------------------------
### Create a Divider
Source: https://docs.sirius.menu/rayfield/elements/text
Adds a horizontal divider line to the tab.
```lua
local Divider = Tab:CreateDivider()
```
--------------------------------
### Update a Label
Source: https://docs.sirius.menu/rayfield/elements/text
Modifies the properties of an existing label instance.
```lua
Label:Set("Label Example", 4483362458, Color3.fromRGB(255, 255, 255), false) -- Title, Icon, Color, IgnoreTheme
```
--------------------------------
### Send a standard notification
Source: https://docs.sirius.menu/rayfield/notifications
Displays a notification using a numeric Roblox image ID for the icon.
```lua
Rayfield:Notify({
Title = "Notification Title",
Content = "Notification Content",
Duration = 6.5,
Image = 4483362458,
})
```
--------------------------------
### Paragraph API
Source: https://docs.sirius.menu/rayfield/elements/text
This section details how to create and update paragraphs in Rayfield.
```APIDOC
## Paragraph API
### Description
Provides functionality to create and update paragraphs within the Rayfield UI.
### Create Paragraph
```lua theme={null}
local Paragraph = Tab:CreateParagraph({Title = "Paragraph Example", Content = "Paragraph Example"})
```
### Update Paragraph
```lua theme={null}
Paragraph:Set({Title = "Paragraph Example", Content = "Paragraph Example"})
```
```
--------------------------------
### Divider API
Source: https://docs.sirius.menu/rayfield/elements/text
This section explains how to create and update dividers in Rayfield.
```APIDOC
## Divider API
### Description
Provides functionality to create and update dividers within the Rayfield UI.
### Create Divider
```lua theme={null}
local Divider = Tab:CreateDivider()
```
### Update Divider
Toggle the divider's visibility.
```lua theme={null}
Divider:Set(false) -- Visible
```
```
--------------------------------
### Set Visibility
Source: https://docs.sirius.menu/rayfield/windows
Controls the overall visibility of the Rayfield interface.
```APIDOC
### Set visibility
```lua theme={null}
Rayfield:SetVisibility(false)
```
```
--------------------------------
### Create a Divider
Source: https://docs.sirius.menu/rayfield/windows
Dividers add a horizontal rule inside a tab to visually separate content.
```APIDOC
## Create a divider
Dividers add a horizontal rule inside a tab to visually separate content.
```lua theme={null}
local Divider = Tab:CreateDivider()
```
```
--------------------------------
### Update a Divider
Source: https://docs.sirius.menu/rayfield/elements/text
Toggles the visibility of an existing divider.
```lua
Divider:Set(false) -- Visible
```
--------------------------------
### Update a Rayfield Keybind
Source: https://docs.sirius.menu/rayfield/elements/keybinds
Updates the assigned key for an existing keybind instance.
```lua
Keybind:Set("RightCtrl") -- Keybind (string)
```
--------------------------------
### Update Divider Visibility
Source: https://docs.sirius.menu/rayfield/windows
Controls the visibility of a divider. Setting the value to `false` hides the divider.
```lua
Divider:Set(false)
```
--------------------------------
### Destroy the Interface
Source: https://docs.sirius.menu/rayfield/windows
Removes and cleans up the Rayfield interface from the game.
```APIDOC
## Destroy the interface
```lua theme={null}
Rayfield:Destroy()
```
```
--------------------------------
### Destroy Rayfield Interface
Source: https://docs.sirius.menu/rayfield/windows
Completely removes and cleans up the Rayfield interface from the game. Use this when the interface is no longer needed to free up resources.
```lua
Rayfield:Destroy()
```
--------------------------------
### Update Section Label
Source: https://docs.sirius.menu/rayfield/windows
Changes the displayed label of an existing section. This is useful for dynamically updating section titles.
```lua
Section:Set("Section Example")
```
--------------------------------
### Lucide Icon Support
Source: https://docs.sirius.menu/rayfield/windows
You can use a Lucide icon name in place of a Roblox image ID for UI elements. Note that not all Lucide icons are supported, and using them might be detectable by game anti-cheats.
```APIDOC
## Lucide Icon Support
You can use a [Lucide icon](https://lucide.dev/icons/) name in place of a Roblox image ID.
```lua theme={null}
local Tab = Window:CreateTab("Tab Example", "rewind")
```
Not all Lucide icons are supported. See the [full list of supported icons](https://github.com/latte-soft/lucide-roblox/tree/master/icons/compiled/48px). Credit to [Lucide](https://lucide.dev/) and [Latte Softworks](https://github.com/latte-soft/).
Lucide icons and Roblox image IDs are detectable by game anti-cheats. If you need your script to be undetectable, use `getcustomasset()` instead. See [Secure Mode](/rayfield/secure-mode) for details.
```
--------------------------------
### Update a Section
Source: https://docs.sirius.menu/rayfield/windows
Updates the label of an existing section.
```APIDOC
### Update a section
```lua theme={null}
Section:Set("Section Example")
```
```
--------------------------------
### Set Custom Rayfield Asset ID
Source: https://docs.sirius.menu/rayfield/anti-detection
Set the global variable `RAYFIELD_ASSET_ID` before loading Rayfield to use your custom UI model. If not set, the default detectable ID is used.
```lua
getgenv().RAYFIELD_ASSET_ID = 123456789 -- your asset ID here
```
--------------------------------
### Update a Divider
Source: https://docs.sirius.menu/rayfield/windows
Updates the visibility of a divider.
```APIDOC
### Update a divider
```lua theme={null}
Divider:Set(false) -- Whether the divider's visibility is to be set to true or false.
```
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.