What a Gamepass is and how it works on Roblox

A Gamepass on Roblox is an in-game purchase that gives players a permanent benefit or feature inside your game. Unlike items that disappear after use, a Gamepass stays with the player forever — or for as long as your game exists. When someone buys your Gamepass, Roblox takes a cut (typically 30%), and you keep the rest as Robux, Roblox's in-game currency.

Gamepasses are one of the main ways Roblox developers earn money. A player might buy a Gamepass to unlock a special ability, skip a tutorial, get extra starting cash, or access a private area. The key difference from other monetization is that the purchase is permanent — the player owns it forever on that account, even if they leave and come back months later.

To create a Gamepass, you need to own a game on Roblox (or have permission from the game owner), have a Roblox account with a verified email, and understand how to write basic Lua code or use Roblox's built-in systems to detect when a player owns the pass.

Key Takeaways

  • Create a Gamepass through your game's settings on the Roblox website, set a price in Robux, and write code in your game to check if a player owns it.
  • Roblox takes 30% of the sale price, so a 100 Robux Gamepass earns you 70 Robux after the platform fee.
  • You must use the MarketplaceService in Roblox Studio to detect ownership and trigger the Gamepass benefit when a player joins or respawns.
  • Test your Gamepass in a private server before publishing so you can confirm the benefit works and players can actually purchase it.
  • Gamepasses must offer a real, permanent benefit — cosmetic-only passes or passes that don't work are against Roblox rules and can get your game moderated.

Setting up your Gamepass in the Roblox website

Log into your Roblox account and go to your game's page. Click the three-dot menu and select Configure this Game. In the left sidebar, find Monetization and click Passes. Click the Create a Pass button.

Fill in the pass name (something like "Double XP" or "VIP Access"), write a description that explains what the player gets, and upload an icon image (at least 512 × 512 pixels). Set the price in Robux — most passes range from 50 to 500 Robux, though you can go higher. Roblox will show you how much you earn after the 30% fee. Click Create Pass when you're done.

The pass now exists on Roblox, but it does nothing yet. Players can see it and buy it, but your game has no code telling it to give them the benefit. That's the next step.

Writing the code to detect and reward Gamepass owners

Open your game in Roblox Studio. You need to write a script that runs when a player joins and checks whether they own the Gamepass. The script uses MarketplaceService, a Roblox system that talks to the Roblox servers and confirms ownership.

In ServerScriptService (a folder in the Explorer panel), create a new Script. Paste this basic code:

local MarketplaceService = game:GetService("MarketplaceService") local gamepassId = 12345678 -- Replace with your actual Gamepass ID game.Players.PlayerAdded:Connect(function(player)   local success, owns = pcall(function()     return MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamepassId)   end)   if success and owns then     -- Give the player the benefit here     print(player.Name .. " owns the Gamepass!")   end end)

Find your Gamepass ID by going back to your game's Passes page on the Roblox website. The ID is in the URL or shown on the pass card. Replace 12345678 with that number. The code now checks every player when they join and prints a message if they own it. Replace the print line with the actual benefit — for example, giving them extra health, unlocking a door, or adding currency to their account.

Common Gamepass benefits and how to code them

The simplest benefit is a one-time reward when the player joins. If your game uses a currency system, you might add 1000 coins to their account. If you store coins in a folder called "leaderstats" inside the player, the code looks like this:

if success and owns then   player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 1000 end

Another common benefit is a permanent stat boost — for example, a Gamepass that doubles XP gains. You would store a boolean (true or false) in the player's data and check it whenever they earn XP. A third type is access to a private area: you can place a door with a script that only lets players with the Gamepass pass through.

The most important rule is that the benefit must be permanent and meaningful. Roblox moderators reject Gamepasses that are purely cosmetic (like a hat that doesn't change gameplay) or that don't actually work. The benefit should be something that changes how the player experiences the game.

Testing your Gamepass before publishing

Before you let real players buy your Gamepass, test it in a private server. In Roblox Studio, click Test to run the game locally. Your script will run, but MarketplaceService won't actually check your account — it will return false because you're in a test environment.

To properly test, publish your game and create a private server (most games have a private server option in the menu). Join as yourself and try to buy the Gamepass using Robux. If the purchase works and the benefit appears, you're ready. If the benefit doesn't trigger, check your script for errors — look at the Output window in Studio for red error messages.

A common mistake is using the wrong Gamepass ID or forgetting to replace the placeholder number. Another is writing code that only runs once when the game starts, so players who join later don't get checked. Use PlayerAdded (as shown above) to check every player as they join.

Pricing strategy and what players expect

Gamepass prices vary widely depending on the benefit. A small boost (like 10% extra XP) might be 50 to 100 Robux. A major convenience (like skipping a long tutorial) might be 200 to 400 Robux. A permanent stat multiplier (like 2x coins forever) could be 500 Robux or more. Look at similar games in your genre to see what players are used to paying.

Remember that Roblox takes 30%, so a 100 Robux pass earns you 70 Robux. If your game has 100 players and 10% buy the pass, that's 10 sales × 70 Robux = 700 Robux for you. Robux can be converted to real money through the Developer Exchange program, though the exchange rate is not 1:1 and Roblox takes another cut there.

Avoid pricing Gamepasses so high that players feel forced to buy them to enjoy the game. The best Gamepasses feel like a nice bonus, not a requirement. If your game is hard without the Gamepass, players will leave instead of buying it.

Frequently Asked Questions

How do I find my Gamepass ID?

Go to your game's page on the Roblox website, click Configure, then Monetization, then Passes. Click on your pass. The ID appears in the URL (the long number after /passes/) or is shown on the pass details page. Copy that number into your script.

Can I change the price of my Gamepass after I create it?

Yes. Go to your game's Passes page, click the pass, and edit the price. The change takes effect immediately for new purchases. Players who already bought it keep it forever at the old price.

What happens if my script has an error and the Gamepass benefit doesn't work?

Players can still buy the pass, but they won't get the benefit. Check the Output window in Roblox Studio for error messages. Common issues are a wrong Gamepass ID, code that doesn't run when players join, or trying to give a benefit that doesn't exist in your game.

Can I make a Gamepass that gives cosmetic items only?

Roblox allows cosmetic Gamepasses if they also include a gameplay benefit. A hat alone is not enough. A hat plus a 5% speed boost is acceptable. Read Roblox's monetization policy to confirm your pass meets their rules before publishing.

Do I need Robux to create a Gamepass?

No. Creating the pass is free. You only earn Robux when players buy it. However, you do need a verified email on your Roblox account and ownership of the game (or permission from the owner).