Game Passes

A Game Pass is a method of monetization that allows you to charge a one-time Robux fee in order for users to access special privileges within an experience, such as entry to a restricted area, an in-experience avatar item, or a permanent power-up.

Creating Game Passes

When you're creating an image to use for your game pass, consider the following requirements:

  • Use a template of 512×512 pixels.
  • Save the image in either .jpg, .gif, .png, .tga, or .bmp format.
  • Don't include important details outside of the circular boundaries because the upload process trims and crops the final badge into a circular image.
Good circular trimming
Bad circular trimming

To create a new Game Pass:

  1. Navigate to Roblox.com.

  2. In the horizontal navigation, select the Create tab. The Experiences space displays.

  3. Click the dropdown menu to the right of the experience you want to create a Game Pass for, then the Create Pass menu item. The Create a Pass space displays.

  4. Click the Choose File button. A file browser displays.

  5. Select the image you want to display as the icon, then click the Open button.

  6. Fill in the following fields:

    • Pass Name: A title for your Game Pass.
    • Description: A description what a potential user should expect when they purchase the Game Pass.
  7. Click the Preview button. A preview of your Game Pass displays.

  8. If you are satisfied with the preview, click the Verify Upload button, otherwise click the Cancel button to make further edits.

The Game Pass displays below the Create a Pass space. When you select the name of the Game Pass, the Game Pass' main page displays.

Locating Game Pass IDs

A Game Pass ID is the unique identifier of a Game Pass. You will need this ID to assign the Game Pass a special privilege.

To locate a GamePassID:

  1. Navigate to Roblox.com.

  2. In the horizontal navigation, select the Create tab. The Experiences space displays.

  3. In the left-hand navigation, select Passes.

  4. Select the name of a Game Pass. The Game Pass' main page displays with its GamePassID in the URL.

Monetizing Game Passes

Once you have created a Game Pass, you can configure its settings to monetize it.

To monetize a Game Pass:

  1. Navigate to Roblox.com.

  2. In the horizontal navigation, select the Create tab. The Experiences space displays.

  3. In the left-hand navigation, select Passes. All of your Game Passes display in the Passes space.

  4. Click the dropdown menu to the right of the Game Pass you want to monetize, then the Configure menu item. The Configure Pass page displays.

  5. In the left-hand navigation, select Sales.

  6. Enable the Item for Sale toggle.

  7. In the Price field, enter the amount of Robux you want to charge users for the Game Pass. The price you enter affects the amount of Robux you earn per sale.

  8. Click the Save button.

The Game Pass is now available in the Store tab of your experience's page.

Assigning Game Pass Privileges

Once a user purchases a Game Pass, they'll expect to receive the associated special privilege when they play your experience. This does not happen automatically, so you must check which users own the Game Pass and assign the special privilege to them.

The following script checks when any user enters the experience, then verifies if that user owns the Game Pass with the matching ID set in the variable gamePassID. Place this code in a Script within ServerScriptService so the server can handle the special privilege given to the user.


1local MarketplaceService = game:GetService("MarketplaceService")
2local Players = game:GetService("Players")
3
4local gamePassID = 0000000 -- Change this to your game pass ID
5
6local function onPlayerAdded(player)
7 local hasPass = false
8
9 -- Check if the player already owns the game pass
10 local success, message = pcall(function()
11 hasPass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamePassID)
12 end)
13
14 -- If there's an error, issue a warning and exit the function
15 if not success then
16 warn("Error while checking if player has pass: " .. tostring(message))
17 return
18 end
19
20 if hasPass then
21 print(player.Name .. " owns the game pass with ID " .. gamePassID)
22 -- Assign this player the ability or bonus related to the game pass
23 end
24end
25
26-- Connect "PlayerAdded" events to the "onPlayerAdded()" function
27Players.PlayerAdded:Connect(onPlayerAdded)
28

Prompting In-Experience Purchases

While users can purchase Game Passes directly from your experience's main page, you can also offer in-experience purchases to players through a shop or vendor NPC within the experience.

Reference the example server-side and client-side scripts for a basic model to prompt users to purchase Game Passes.

Server-side Example Script

Place this code in a Script object within ServerScriptService so the server can handle the special privilege given to the player.


1local MarketplaceService = game:GetService("MarketplaceService")
2
3local gamePassID = 0000000 -- Change this to your game pass ID
4
5-- Function to handle a completed prompt and purchase
6local function onPromptGamePassPurchaseFinished(player, purchasedPassID, purchaseSuccess)
7 if purchaseSuccess and purchasedPassID == gamePassID then
8 print(player.Name .. " purchased the game pass with ID " .. gamePassID)
9 -- Assign this player the ability or bonus related to the game pass
10 end
11end
12
13-- Connect "PromptGamePassPurchaseFinished" events to the "onPromptGamePassPurchaseFinished()" function
14MarketplaceService.PromptGamePassPurchaseFinished:Connect(onPromptGamePassPurchaseFinished)
15

Client-side Example Script

The following code implements a promptPurchase() function which safely checks if a user has a Game Pass and prompts them to purchase it if they do not already have it. Place this code in a LocalScript and call promptPurchase() in situations such as when the user clicks a button or when their character touches a part.


1local MarketplaceService = game:GetService("MarketplaceService")
2local Players = game:GetService("Players")
3
4local gamePassID = 0000000 -- Change this to your game pass ID
5
6-- Function to prompt purchase of the game pass
7local function promptPurchase()
8 local player = Players.LocalPlayer
9 local hasPass = false
10
11 local success, message = pcall(function()
12 hasPass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamePassID)
13 end)
14
15 if not success then
16 warn("Error while checking if player has pass: " .. tostring(message))
17 return
18 end
19
20 if hasPass then
21 -- Player already owns the game pass; tell them somehow
22 else
23 -- Player does NOT own the game pass; prompt them to purchase
24 MarketplaceService:PromptGamePassPurchase(player, gamePassID)
25 end
26end
27