Skip to content

Shop UI

Tabs, item cards and buy buttons wired to game passes, dev products or coins.

  • Edit one ITEMS table to list your passes, products and coin items.
  • Robux items open the official purchase prompt; owned passes show OWNED.
  • Coin items fire ReplicatedStorage.ShopBuy so your server charges coins.
  • Opens with a small pop animation from the side button.

37 GUI objects · ShopController LocalScript, 135 lines

Preview the ShopController script
local gui = script.Parent
-- Shop UI controller. Free kit from rbxtoolshub.com.
-- Edit ITEMS below. Robux items open the Roblox purchase prompt.
-- "Coins" items fire ReplicatedStorage.ShopBuy (a RemoteEvent you create) so your server can charge coins.

local Players = game:GetService("Players")
local MarketplaceService = game:GetService("MarketplaceService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")

local player = Players.LocalPlayer

local ITEMS = {
	{ Tab = "Passes", Name = "Speed Coil", Icon = "⚡", Kind = "GamePass", Id = 0, Price = 99 },
	{ Tab = "Passes", Name = "VIP", Icon = "👑", Kind = "GamePass", Id = 0, Price = 199 },
	{ Tab = "Passes", Name = "2x Coins", Icon = "💰", Kind = "GamePass", Id = 0, Price = 149 },
	{ Tab = "Boosts", Name = "Gravity Coil", Icon = "🪐", Kind = "Product", Id = 0, Price = 99 },
	{ Tab = "Items", Name = "Pet Slot", Icon = "🐾", Kind = "Coins", Price = 500 },
	{ Tab = "Items", Name = "Sword", Icon = "🗡️", Kind = "Coins", Price = 750 },
}

local shop = gui:WaitForChild("Shop")
local grid = shop:WaitForChild("Items")
local tabs = shop:WaitForChild("Tabs")
local template = grid:WaitForChild("ItemTemplate")
local openButton = gui:WaitForChild("OpenShop")
local closeButton = shop:WaitForChild("Header"):WaitForChild("Close")

template.Visible = false
for _, child in grid:GetChildren() do
	if child:IsA("Frame") and child ~= template then
		child:Destroy()
	end
end

local scale = Instance.new("UIScale")
scale.Parent = shop

local function owns(item)
	if item.Kind ~= "GamePass" or item.Id == 0 then
…