guide / build roblox ui with ai

Build Roblox UI with AI, from Figma to Luau

Make production Roblox GUIs with AI without hallucinated rectangles. penui exposes 2,576+ Figma-extracted components across 15 packs over MCP so Claude Code, Cursor, or Gemini CLI assemble a scaled ScreenGui directly in Roblox Studio.

penui is paired with the AI coding agent you already run. Read Build UI with your AI for that pairing, and Figma to Roblox for how a Figma file becomes the screen.

  • 15 Figma packs
  • 2,576+ components
  • 33 MCP tools
  • Native or 9-slice art

direct answer

How to build Roblox UI with AI in 4 steps

Quick summary

To build a Roblox GUI with AI, connect the penui MCP server alongside Roblox Studio MCP instead of asking an LLM to hand-code coordinates from scratch. The agent calls get_studio_workflow, finds matching Figma-extracted pieces with search_units or search_components, composes one scaled Luau ScreenGui script via compose_units or compose_screen, and inserts it into StarterGui with execute_luau.

  1. Connect MCPInstall penui (Node 20+, stdio) and Roblox Studio MCP in your AI editor.
  2. Search unitsAgent runs search_units and picks pieces from a single style pack.
  3. Compose Luaucompose_units or compose_screen outputs one scaled ScreenGui script.
  4. Run in StudioRoblox Studio MCP executes the script via execute_luau into StarterGui.

Under the hood, penui serves 33 MCP tools, 6 MCP resources (penui://index, penui://docs/usage, penui://docs/studio-workflow, penui://pack/{id}, penui://component/{id}), and the build-roblox-ui prompt. See the MCP UI tools reference for full schemas.

the problem & fix

Why raw AI ScreenGuis break and how penui fixes them

When you tell a standalone coding model to "make a Roblox shop GUI," it has to guess pixel sizes, corner radii, padding, gradients, and 9-slice insets in text. The result is misaligned boxes and mismatched buttons.

Without penui (raw LLM)

Guesses UDim2 sizes and offsets blindly, invents flat placeholder rectangles, mixes fonts and border styles between screens, and breaks SliceCenter whenever a panel scales onto mobile or tablet viewports.

With penui (Figma to Luau)

Reads real .fig extractions: exact bounds, 9-slice insets, Fredoka One and Montserrat text layers, pack color tokens, children + offsetInParent, repeat positions, and pre-split layers (full.png, notext.png, parts/*.png).

Because penui is an AI Roblox ScreenGui builder backed by real designer assets rather than generative image guessing, every generated instance stays 100% editable inside Roblox Studio's Explorer.

verified library previews

Real Roblox GUI screens built in one prompt

Every preview below comes directly from penui's 15 packs (13 UI design packs + 2 icon packs with 800+ CC0 icons). Your AI sticks to one pack per screen so headers, cards, badges, and buttons always match.

Roblox Stud Shop GUI built with penui stud-shop pack

Item & Gamepass Shops

stud-shop

Tabbed storefronts, featured bundles, Robux price pills, and repeat item grids cloned cleanly with Clone().

"Build a Roblox Shop ScreenGui using stud-shop with 6 gamepass cards and a close button."
Roblox Season Pass and Battle Pass UI from penui season-pass pack

Battle & Season Passes

season-pass

Free and premium reward tracks, XP progress bars, tier badges, lock overlays, and claim states aligned to pixel offsets.

"Create a 4-tier Season Pass ScreenGui from season-pass with free and premium rows."
Roblox Simulator HUD with health, currency counters, and side navigation from full-game-hud

Simulator & Game HUDs

full-game-hud

Corner-anchored coin/gem counters, health/XP bars, side menu icon rails, and action buttons scaled for desktop and phone.

"Assemble a Simulator HUD from full-game-hud with top-right currencies and left menu buttons."
Roblox Inventory and Pet Slot Grid GUI from slots-anime pack

Inventories & Pet Grids

slots-anime

Rarity-bordered slots, equipped badges, item detail sidebars, and search/equip action bars ready to wire to Luau data.

"Build an anime inventory ScreenGui from slots-anime with a 4x3 rarity grid and details panel."
Roblox Daily Rewards, Bundles, and HUD buttons from ang3lz-hud pack

Daily Rewards & Bundles

ang3lz-hud

Limited-time offer banners, countdown labels, multiplier pills, and high-contrast click/collect CTAs.

"Add a limited bundle popup and bottom click bar using ang3lz-hud in StarterGui."
Roblox Rebirth and Upgrade Modal GUI from rebirth-ui pack

Rebirth & Upgrade Windows

rebirth-ui

Before/after stat comparisons, requirement progress meters, and confirm buttons extracted directly from Figma layers.

"Generate a Rebirth modal from rebirth-ui showing current multiplier, cost, and upgrade CTA."

rendering modes

Native Roblox instances vs. 9-slice image upload

You do not have to upload a single image to start building. Choose native Luau instances for instant iteration, or upload pre-split PNGs for pixel-exact Figma art.

Native mode (zero uploads)

Builds panels, buttons, headers, tiles, bars, and inputs with Frame, UICorner, UIGradient, UIStroke, and TextLabel. Runs immediately in Studio—even on the free Starter plan.

Pixel-exact 9-slice mode

Uploads pre-split layers (notext.png + parts/*.png) with exact SliceCenter insets via upload_unit_assets, Studio upload_image, or Open Cloud upload_assets.

DimensionNative Instances9-Slice Uploaded Art
Roblox instancesFrame, UICorner, UIGradient, UIStroke, TextLabelImageLabel / ImageButton + ScaleType.Slice + TextLabel
Asset setupNone—works offline and without ROBLOX_API_KEYAuto-uploaded via upload_unit_assets, Studio upload_image, or Open Cloud upload_assets
Best used forRapid prototyping, clean flat/gradient UIs, zero-dependency screensStylized simulator/anime frames, glossy bevels, textures, and icons
Responsive scalingScale-based UDim2 + UIAspectRatioConstraintScale-based UDim2 + preserved corners from Figma 9-slice insets

copy & run

MCP setup snippet & example AI prompts

penui runs locally over stdio (Node 20+) and connects to Claude Code, Claude Desktop, Cursor, Windsurf, VS Code Copilot, Zed, Gemini CLI, Codex, Antigravity, Continue, Cline, and Roo.

terminal — automatic client setup
# Interactive setup for your installed AI clients
$ npx penui-mcp setup

# Or from a cloned repo (legacy remote: https://github.com/StefNoob/roferoUI)
$ node tools/setup.mjs --client cursor
$ node tools/setup.mjs --client claude-code --key rk_your_key
mcp.json — manual config (Cursor / Claude Desktop / Windsurf)
{
  "mcpServers": {
    "penui": {
      "command": "node",
      "args": ["/path/to/penui/mcp/server.mjs"],
      "env": { "PENUI_API_KEY": "rk_your_key" }
    }
  }
}

Need full client paths or Open Cloud asset upload env vars? Read the penui MCP installation docs.

Prompt 01 · Full Screen in Studio

"Call penui's get_studio_workflow, find a shop frame and 6 item cards in stud-shop with search_units, compose one scaled ScreenGui using compose_units, and insert it into StarterGui via execute_luau."

Prompt 02 · Zero-Upload Native UI

"Use penui in native mode (Frame + UICorner + UIGradient + UIStroke) with starter-frames and penui-icons to build a clean Settings modal in StarterGui/SettingsGui."

Prompt 03 · Pixel-Exact 9-Slice Art

"Inspect season-pass tokens with get_design_tokens, upload the unit layers via upload_unit_assets, and run compose_units to place a 4-tier Season Pass inside Roblox Studio."

plans & access

Start free, unlock all 15 Figma packs

Search, browse, design tokens, and the full 33-tool MCP server work out of the box. Upgrade only when you need all 15 packs and higher monthly composition quotas.

Starter
€0

Free forever. 4 starter/open-source packs (starter-frames, buttons, game-icons, penui-icons with 800+ CC0 icons) and native builds.

Indie
€12.99/mo

Or €10.39/mo billed yearly (€124.68/yr). All 15 packs, @1x/@2x/notext/SVG, and automatic asset uploads.

Unlocked
€22.99/mo

Or €18.39/mo billed yearly (€220.68/yr). Everything in Indie with no weekly cap (~125 full screens/mo).

Lifetime
€199 once

Pay once, own forever. All current + future Figma packs and no monthly MCP cap.

Compare quotas and yearly savings on the penui pricing page.

questions

Frequently asked questions

Can AI build Roblox UI?

Yes. When paired with penui over MCP and Roblox Studio MCP, an AI agent can search 2,576+ designer-made Figma components across 15 packs, compose a responsive Luau ScreenGui script with exact offsets and 9-slice insets, and place it straight into StarterGui via execute_luau.

How do you build Roblox GUI with AI without ugly placeholder boxes?

Do not ask an LLM to invent coordinates and gradients from zero context. Instead, give the agent penui's pre-extracted Figma metadata and pre-split layered units (full.png, notext.png, and parts/*.png) so it searches real game UI pieces, keeps every widget in one consistent pack, and assembles them with compose_units or compose_screen.

Does it work with Claude Code, Cursor, Gemini CLI, and Roblox Studio MCP?

Yes. penui exposes 33 MCP tools, 6 MCP resources, and the build-roblox-ui prompt over standard MCP stdio (Node.js 20+), working with Claude Code, Claude Desktop, Cursor, Windsurf, VS Code Copilot, Zed, Gemini CLI, Codex, Antigravity, Continue, Cline, and Roo alongside Roblox Studio MCP.

Native Frame/UICorner vs 9-slice image upload: which should I use?

Native mode requires zero asset uploads and builds panels, buttons, bars, and inputs with Frame, UICorner, UIGradient, UIStroke, and TextLabel. Uploaded mode uses ImageLabel with exact 9-slice SliceCenter insets via upload_unit_assets, Studio upload_image, or Open Cloud upload_assets when you want pixel-exact Figma textures, icons, and illustrations.

Does penui replace the AI coding agent I already run?

No. penui is paired with the AI coding agent you already run. It is the UI library beside that agent, not a separate chatbot.