Roblox Shop GUI: Build a Shop in Studio
Build a Roblox shop GUI in Studio: layout, item cards with UIGridLayout, opening the shop, and safe purchases for coins, game passes and developer products.
A shop is where your game earns, and it's also the screen players judge hardest. If it's cramped on mobile, if the prices are hard to read, or if a purchase seems to vanish, players close it and don't come back.
This guide covers the three parts of a Roblox shop GUI: the layout players see, the client script that opens it and sends requests, and the server code that actually grants items. It follows Roblox's Creator Documentation on UI, passes and developer products (checked November 29, 2026).
What a good shop screen contains
A clear shop layout: title, balance, a grid of cards, one obvious Buy action.
- Header: shop name and a close button (top-right, large enough to tap).
- Balance: the player's coins or gems, always visible while shopping.
- Tabs or categories if you sell more than about 8 items (Pets, Boosts, Passes).
- Item cards: icon, name, price, and one button. Highlight "Best value" or "Limited" sparingly.
- Feedback: a clear "Purchased!" or "Not enough coins" message.
Step 1: Build the panel
- In StarterGui, add a ScreenGui named
ShopGui. - Add a Frame
ShopPanel: AnchorPoint(0.5, 0.5), PositionUDim2.fromScale(0.5, 0.5), SizeUDim2.fromScale(0.6, 0.7), a UIAspectRatioConstraint (about 1.6), andVisible = false. - Add UICorner and UIStroke for shape and outline.
- Add a header TextLabel, a balance TextLabel and a
CloseButton.
Sizing with Scale and an aspect-ratio constraint is what keeps the shop usable on a phone. See Roblox GUI size for the details.
Step 2: Item cards in a grid
- Inside the panel, add a ScrollingFrame
ItemListfilling the space under the header. - Inside it, add a UIGridLayout with
CellSizelikeUDim2.fromScale(0.3, 0.42)and a smallCellPadding. - Make one card template Frame: an ImageLabel for the icon, a TextLabel for the name, a TextLabel for the price, and a TextButton
BuyButton. Put it in ReplicatedStorage asItemCardTemplate. - Set the ScrollingFrame's
AutomaticCanvasSizeto Y so it grows as cards are added.
Then generate cards from a data table so prices live in one place:
-- LocalScript inside ShopGui
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local items = require(ReplicatedStorage:WaitForChild("ShopItems"))
local template = ReplicatedStorage:WaitForChild("ItemCardTemplate")
local buyRemote = ReplicatedStorage:WaitForChild("BuyItem")
local panel = script.Parent:WaitForChild("ShopPanel")
local list = panel:WaitForChild("ItemList")
for id, item in items do
local card = template:Clone()
card.Name = id
card.ItemName.Text = item.name
card.Price.Text = item.price .. " Coins"
card.Icon.Image = item.image
card.BuyButton.Activated:Connect(function()
buyRemote:FireServer(id)
end)
card.Parent = list
end
ShopItems is a ModuleScript returning something like { SpeedBoost = { name = "Speed Boost", price = 100, image = "rbxassetid://..." } }.
Step 3: Open and close the shop
Toggle ShopPanel.Visible from a HUD button's Activated event, or open it when a player walks up to a shopkeeper using a ProximityPrompt (its Triggered event fires on the server; send a RemoteEvent to that player's client to show the panel). Always give the panel a close button. Mobile players can't press Escape.
Step 4: Handle in-game currency purchases on the server
Never trust the client about prices or balances. The server checks and grants:
-- Script in ServerScriptService
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local items = require(ReplicatedStorage.ShopItems)
local buyRemote = ReplicatedStorage.BuyItem
buyRemote.OnServerEvent:Connect(function(player, itemId)
local item = items[itemId]
if not item then return end
local coins = player.leaderstats.Coins
if coins.Value < item.price then return end
coins.Value -= item.price
-- grant the item here and save it with your data system
end)
Step 5: Robux purchases (passes and developer products)
For Robux, use MarketplaceService:
| You sell | Use | Prompt | Grant |
|---|---|---|---|
| A permanent perk (VIP, 2x coins) | Game pass | PromptGamePassPurchase | Check UserOwnsGamePassAsync, listen to PromptGamePassPurchaseFinished |
| Something bought repeatedly (coins, boosts) | Developer product | PromptProductPurchase | Grant only inside the server's ProcessReceipt callback, then return PurchaseGranted |
ProcessReceipt is where developer-product items must be granted, and it should save the purchase before returning PurchaseGranted so players aren't charged without receiving the item. Pass icons are shown as circles, so center the art; specs are in our Roblox game icon size guide.
Shop design tips that sell without annoying
- One primary color for Buy buttons, used nowhere else.
- Show the price on the button itself.
- Put the best-value item in the first row, not hidden at the bottom.
- Don't open the shop automatically on join; let players choose.
- Disable the Buy button (grey it out) when the player can't afford an item.
Build the layout in minutes
The layout is the slow part. Game Thumb's Roblox UI Maker has shop and inventory starting points, or you can describe your own ("cartoon pet shop, six cards, coin balance, tabs for Pets and Boosts"). It produces editable Frames, TextLabels and TextButtons, lets you check the Desktop, Tablet and Mobile previews, and exports Luau that builds the ScreenGui in Studio. Then you wire it up with the scripts above. Need card icons? Make them with the Roblox game icon maker and drop the asset IDs into ImageLabels.
Export Luau, paste it into the Studio Command Bar, and the ScreenGui appears in StarterGui.
FAQ
How do I make a shop GUI in Roblox? Create a ScreenGui with a hidden panel, add item cards in a ScrollingFrame with a UIGridLayout, open it from a button or ProximityPrompt, and handle purchases on the server.
How do I make a shop GUI open with a ProximityPrompt?
Put a ProximityPrompt on the shopkeeper part, and in its server-side Triggered event fire a RemoteEvent to that player; the client sets the shop panel visible.
How do I sell items for Robux in my shop? Use game passes for one-time perks and developer products for repeatable purchases, prompting through MarketplaceService and granting developer products in ProcessReceipt.
Why should purchases be checked on the server? Exploiters can change anything on their client, including prices and balances. Only the server can be trusted to deduct currency and grant items.
Sources
- Roblox Creator Docs: UI: ScreenGui, frames, layouts and scrolling frames.
- Roblox Creator Docs: Passes: selling and checking game passes.
- Roblox Creator Docs: Developer products: PromptProductPurchase and ProcessReceipt.
- Roblox Creator Docs: Proximity prompts: opening UI near an object.