Skip to main content

Create a window

Rayfield:CreateWindow() is the entry point for your UI. Call it once after loading the library.

Options

string
required
The title displayed in the window header.
number | string
Icon shown in the topbar. Pass a Roblox image ID (number), a Lucide icon name (string), or 0 for no icon.
string
Title shown on the loading screen.
string
Subtitle shown on the loading screen.
string
Text shown to mobile users to unhide the UI.
string | table
The theme to apply. Pass a theme identifier string or a custom theme table. See Themes.
string | Enum.KeyCode
The key that toggles UI visibility.
boolean
Suppresses built-in Rayfield prompts.
boolean
Prevents Rayfield from emitting warnings when there is a version mismatch between your script and the interface.
object
Controls automatic configuration saving.
object
Prompts the user to join your Discord server on supported executors.
The key system UI loads a detectable Roblox model. In Secure mode, the key UI is blocked entirely. Users must have a saved key from a previous session or they won’t be able to load the script.
boolean
Enables the key system. Configure it with KeySettings.
object
Settings for the key system. Only used when KeySystem is true.

Create a tab

Tabs are the top-level sections inside a window. Each tab can hold its own elements.

Lucide icon support

You can use a Lucide icon name in place of a Roblox image ID.
Not all Lucide icons are supported. See the full list of supported icons. Credit to Lucide and Latte Softworks.
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 for details.

Create a section

Sections add a labelled group header inside a tab.

Update a section


Create a divider

Dividers add a horizontal rule inside a tab to visually separate content.

Update a divider


Visibility

Set visibility

Get visibility


Destroy the interface