RazLib

A clean, loadstring-compatible Roblox UI library. Rayfield-inspired API. Built for script developers.

Loadstring compatible Mobile support 9 built-in themes No dependencies
Get Started View Source llms.txt

Quick Start

Step 1 — Load the library
local RazLib = loadstring(game:HttpGet("https://razzles.xyz/RazLib"))()
Step 2 — Create a window
local Window = RazLib:CreateWindow({
    Name            = "My Script",
    LoadingTitle    = "RazLib",
    LoadingSubtitle = "by Razzles",
    Theme           = "Default",
    ToggleKeybind   = Enum.KeyCode.LeftControl,
    ConfigurationSaving = {
        Enabled    = true,
        FolderName = "MyScript",
        FileName   = tostring(game.PlaceId)
    }
})
Step 3 — Add tabs and elements
local Tab = Window:CreateTab("Main")

Tab:CreateSection("Combat")

Tab:CreateToggle({
    Name         = "God Mode",
    CurrentValue = false,
    Callback     = function(v)
        -- v is true/false
    end
})

Tab:CreateSlider({
    Name         = "Walk Speed",
    Range        = {16, 200},
    Increment    = 1,
    CurrentValue = 16,
    Suffix       = " studs/s",
    Callback     = function(v)
        game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = v
    end
})

Tab:CreateButton({
    Name        = "Teleport to Spawn",
    Description = "Teleports your character to the spawn",
    Callback    = function()
        -- do something
    end
})

API Reference

RazLib:CreateWindow(settings)

Creates the main UI window. Returns a Window object.

SettingTypeDefaultDescription
Namestring"RazLib"Window title text
LoadingTitlestring"RazLib"Loader screen header
LoadingSubtitlestring"by Raz"Loader screen sub-text
Themestring | table"Default"Theme name or custom theme table
ToggleKeybindEnum.KeyCodeLeftControlShow/hide keybind
ShowTextstring"Show"Mobile button label
Discord.EnabledboolfalseShow Discord button
Discord.Invitestring""discord.gg invite code
ConfigurationSaving.EnabledboolfalseSave element states to file
KeySystemboolfalseEnable key gate

Window:CreateTab(name, icon?)

Adds a tab. Returns a Tab object.

Window:SetTheme(name | table)

Switch theme at runtime.

Tab Elements

MethodReturnsDescription
Tab:CreateSection(name)Divider label
Tab:CreateLabel(text, color?){Set}Static text row
Tab:CreateButton({Name, Description?, Callback})Clickable row with ripple effect
Tab:CreateToggle({Name, CurrentValue, Callback}){Set}Checkbox toggle
Tab:CreateSlider({Name, Range, Increment, CurrentValue, Suffix?, Callback}){Set}Drag slider with value box
Tab:CreateInput({Name, PlaceholderText, CurrentValue?, Callback}){Set}Text input field
Tab:CreateDropdown({Name, Options, CurrentOption, MultipleOptions?, Callback}){Set, Refresh}Single or multi-select dropdown
Tab:CreateKeybind({Name, CurrentKeybind, HoldToInteract?, Callback}){Set}Key-capture input
Tab:CreateColorPicker({Name, Color, Callback}){Set}HSV color picker

RazLib:Notify({Title, Content, Duration?})

Shows a slide-in notification. Returns an object with :Dismiss().

RazLib:Prompt({Title, Content, Duration, Callback})

Shows a Yes/No confirmation dialog with a countdown timer. Callback receives (yes: bool, no: bool).


Themes

Pass the theme name string to Theme in CreateWindow, or call Window:SetTheme("Ocean") at runtime.

Default
Ocean
AmberGlow
Light
Amethyst
Green
Bloom
DarkBlue
Serenity