AROYN UI LIBRARY / GETTING STARTED

Your first window

Choose ownership, add pages and register stable preference flags.

Initialize once#

Load one Aroyn module for related windows. Choose a stable Id to replace a previous owned GUI on a clean rerun, and a configuration namespace specific to your application or game.

LUAU
local Aroyn = loadstring(game:HttpGet(
    "https://lib.aroyn.xyz/stable/0.1.0/Aroyn.lua"
))()
local parent = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
local window = Aroyn:CreateWindow({
    Parent = parent, Id = "my-preferences", Title = "AROYN", Logo = Aroyn.Logo,
    Size = UDim2.fromOffset(680, 440),
    Config = {Namespace = "my-app", AutoLoad = false, AutoSave = false},
})
local general = window:CreatePage({Name = "General", Icon = "components"})
local section = general:CreateSection({Title = "Preferences"})
local enabled = section:CreateToggle({Name = "Enabled", Flag = "enabled", Default = false})
local settings = window:CreatePage({Name = "Settings", Icon = "settings"})
settings:CreateSection({Title = "About"}):CreateButton({
    Name = "Return to General", Text = "Go back",
    Callback = function() general:Select() end,
})

Restore after construction#

Register controls before loading when possible. This makes sensitive exclusions explicit and lets you inspect load errors at the call site. Missing files leave current defaults unchanged.

LUAU
local ok, info = window:LoadConfig("main")
if not ok then warn(info.Code, info.Message) end
-- enabled:GetValue() now reads the restored value if loading succeeded.
-- Your runtime still decides whether any feature should start.

The first page is selected automatically. SelectPage("Settings") or settings:Select() switches pages while keeping input values and selections. The title bar and icon rail remain stationary during transitions.

Minimize or remove#

LUAU
window:SetMinimized(true)  -- morphs to the floating restore launcher
window:SetMinimized(false) -- restores the same pages and values
-- Later, when your application exits:
window:Destroy()