> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sirius.menu/llms.txt
> Use this file to discover all available pages before exploring further.

# Rayfield Gen2

> A full rebuild of the Rayfield Interface Suite for Roblox. Faster, more stable, and built to last.

Sentivel
Endorsed by Rayfield

Status pages and uptime monitoring for whatever you ship. Free to start.

Take a look


[Open](https://www.sentivel.com/?ref=sirius-docs\&utm_source=sirius-docs\&utm_medium=referral\&utm_content=banner)

![Rayfield Gen2](https://mintcdn.com/sirius-b451bfde/i5Ltpj53aNl_8MQt/images/gen2-teaser.png?fit=max\&auto=format\&n=i5Ltpj53aNl_8MQt\&q=85\&s=6b42655d844f340aef3645468aab033f)

Rayfield Gen2 is a ground-up rebuild of the Rayfield Interface Suite. It builds its entire interface in code, so there is no model to load and nothing to trace. State can save to disk between sessions, the whole interface can be themed and translated at runtime, and every element is designed to feel the same on a phone as it does on a desktop.

Create a window, add tabs, and fill them with elements. That is the whole model.

```lua Stable theme={null}
local Rayfield = loadstring(game:HttpGet("https://sirius.menu/gen2"))()

local window = Rayfield:CreateWindow({
    name = "Example",
    subtitle = "Rayfield Gen2",
    sidebarLayout = true,
})

local tab = window:CreateTab({ name = "Home", icon = 93364949241311 })

tab:CreateToggle({
    name = "Auto Sprint",
    callback = function(value) print(value) end,
})
```

```lua Preview theme={null}
local Rayfield = loadstring(game:HttpGet("https://sirius.menu/gen2-preview"))()

local window = Rayfield:CreateWindow({
    name = "Example",
    subtitle = "Rayfield Gen2",
    sidebarLayout = true,
})

local tab = window:CreateTab({ name = "Home", icon = 93364949241311 })

tab:CreateToggle({
    name = "Auto Sprint",
    callback = function(value) print(value) end,
})
```

Stable is the release. [Preview](https://docs.sirius.menu/rayfield-gen2/preview.md) is a rolling build from `dev`, for trying what is coming next.

## Highlights

> [card] Undetectable by design
>
> Built entirely in code with no marketplace model. [Secure mode](https://docs.sirius.menu/rayfield-gen2/secure-mode.md) leaves nothing an anti-cheat can fingerprint.

> [card] Saves itself
>
> Pass a `configuration` table and every value persists and restores as its original type. No boilerplate. See [Saving](https://docs.sirius.menu/rayfield-gen2/saving.md).

> [card] Themed at runtime
>
> Six built-in themes, or bring your own. Swap it live and every colour tweens across. See [Themes](https://docs.sirius.menu/rayfield-gen2/themes.md).

> [card] Speaks every language
>
> Translate every label at runtime from a table or your own resolver. See [Localization](https://docs.sirius.menu/rayfield-gen2/localization.md).

## Start here

> [card] [Getting started](https://docs.sirius.menu/rayfield-gen2/getting-started.md)
>
> Load the library and build your first window.

> [card] [Windows](https://docs.sirius.menu/rayfield-gen2/windows.md)
>
> Every window property and method.

> [card] [Elements](https://docs.sirius.menu/rayfield-gen2/elements/overview.md)
>
> Buttons, toggles, sliders, and the rest.

> [card] [Themes](https://docs.sirius.menu/rayfield-gen2/themes.md)
>
> Restyle everything to match your script.

## Conventions

Every property is optional unless marked required. Properties are camelCase, and PascalCase spellings work too, so `name` and `Name` both land.

**Icons.** Anywhere an `icon` is accepted, pass an asset id number or an `rbxassetid://`, `rbxthumb://`, or `rbxasset://` string. Pass `nil`, `0`, or `""` for none.

**Flags.** Value elements save on their own under a key derived from their name. Pass an explicit `flag` when you want a stable key of your own. See [Saving](https://docs.sirius.menu/rayfield-gen2/saving.md).

**Reordering.** Every element handle can be moved within its tab with `MoveTo(index)`, `MoveToTop()`, `MoveToBottom()`, `MoveUp()`, and `MoveDown()`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.