CyberMax
CyberMax › Answers

How to make a Roblox game pass (and give the perk in a script)

Updated 2026-10-17 · Roblox and game developers · by CyberMax

Short answer

Create the pass in Creator Hub > your experience > Monetization > Passes, set its price and copy its ID. In a server script, check MarketplaceService:UserOwnsGamePassAsync(userId, passId) when the player joins and give the perk; also listen to PromptGamePassPurchaseFinished so a pass bought during play works right away.

Copy-paste code

ServerScriptService/Passes.server.lua

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

local VIP_PASS = 0000000 -- your pass id

local function givePerk(player)
	player:SetAttribute("VIP", true)
	-- e.g. double coins: check player:GetAttribute("VIP") where coins are awarded
end

Players.PlayerAdded:Connect(function(player)
	local ok, owns = pcall(MarketplaceService.UserOwnsGamePassAsync, MarketplaceService, player.UserId, VIP_PASS)
	if ok and owns then givePerk(player) end
end)

MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, passId, purchased)
	if purchased and passId == VIP_PASS then givePerk(player) end
end)

-- client button: MarketplaceService:PromptGamePassPurchase(player, VIP_PASS)

Good to know

Passes don't use ProcessReceipt (that is for developer products).

Wrap UserOwnsGamePassAsync in pcall: it is a web call and can fail; you can re-check a minute later.

Roblox keeps 30% of each pass sale; you keep 70%. Plan prices with the free game pass price planner.

Stallwren Shop & Currency System: A shop and currencies that never lose a purchase

from $8

Stallwren is a tested shop and currency system: multi-currency wallet, a validated catalogue with sales and limited-time items, purchases charged once, developer product receipts granted exactly once, game passes and a shop UI.

Secure checkout · 14-day fix-or-refund if it doesn't work as described (terms)

Questions

Where do I find the pass ID?

Creator Hub > Monetization > Passes; the number in the pass's URL.

Do passes need to be Listed?

To appear outside your game (for example on Roblox's surfaces), yes.

Free: the Roblox Starter Kit

7 free Luau modules (damage, pets, shop formatting, admin audit log, tycoon guards and more) plus 3 free calculators, then 5 short emails with the scripting fixes we see go wrong most often.

You get one email to confirm first. Then the kit, and 5 short emails over two weeks. One-click unsubscribe in every email; we never share your address.

Related answers

How to use developer products in Roblox (ProcessReceipt that never double-grants)Sell coins and boosts with developer products: the ProcessReceipt pattern that records each PurchaseId so a puHow to make a shop GUI in Roblox that exploiters can't abuseBuild an in-game currency shop: the GUI sends only an item id, the server looks up the price, checks coins and