A Gamepass is a one-time purchase that gives players a permanent perk in your game

A Gamepass in Roblox is an item players buy once with Robux (the in-game currency) and keep forever, even if they rejoin the game later. Unlike developer products, which players can buy multiple times, a Gamepass is a single transaction that unlocks something permanent — extra abilities, cosmetics, or convenience features.

To create one, you need a published game on Roblox, access to Roblox Studio, and the ability to create items in your game's settings. The process involves three main steps: creating the Gamepass in your game's configuration, writing the code to detect when a player owns it, and then deciding what reward or feature the Gamepass unlocks.

This guide walks through each step so you understand how the system works and can set up your first Gamepass without guessing at the process.

Key Takeaways

  • You create a Gamepass through your game's settings on the Roblox website, not inside Studio — you set the name, description, and price there.
  • Once created, the Gamepass gets an ID number that you use in a script to check whether a player owns it.
  • The script runs when a player joins and uses the MarketplaceService to ask Roblox if that player has purchased the Gamepass.
  • If the player owns it, you trigger whatever reward you want — extra speed, a special tool, a cosmetic item, or access to a zone.
  • Test your Gamepass in Studio using the Run button before publishing, because bugs in the detection script mean players won't receive their reward.

Creating the Gamepass in your game's settings

Go to the Roblox website and sign in to your account. Navigate to your game's main page, then click the three dots menu and select Edit Game. On the left sidebar, click Monetization, then Passes.

Click the Create a Pass button. You'll fill in a name (something like "Speed Boost" or "VIP Access"), write a short description that explains what players get, set the price in Robux, and upload an icon image. The icon appears in the shop, so make it clear and recognizable. Once you save, Roblox assigns the Gamepass an ID number — write this down or copy it, because you'll need it in your script.

The Gamepass now exists and players can see it in your game's shop, but nothing happens when they buy it yet. That's where the script comes in.

Writing the script to detect Gamepass ownership

Open your game in Roblox Studio. In the Explorer window on the left, find ServerScriptService (a folder that holds scripts that run on Roblox's servers, not on players' computers). Right-click it and select Insert Object, then choose Script. This creates a new script where you'll write the detection code.

At the top of the script, paste this code:

local MarketplaceService = game:GetService("MarketplaceService") local gamepassID = 12345678 -- Replace with your actual Gamepass ID game.Players.PlayerAdded:Connect(function(player)   local hasPass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamepassID)   if hasPass then     -- Put your reward code here   end end)

Replace 12345678 with the actual ID number from your Gamepass settings. This script runs every time a player joins the game. It asks Roblox's servers whether that player owns your Gamepass. If they do, the code inside the if hasPass then block runs — that's where you add the reward.

Adding the reward your Gamepass unlocks

What happens when a player owns the Gamepass depends on what you want to give them. Here are three common examples:

Example 1: Give the player extra speed. Replace the comment with:

player.Character.Humanoid.WalkSpeed = 25 -- Normal speed is 16

Example 2: Give the player a special tool. First, create a tool in your game (a sword, gun, or item), place it in ServerStorage, and name it "SpecialTool". Then replace the comment with:

local tool = game.ServerStorage:WaitForChild("SpecialTool"):Clone() tool.Parent = player.Backpack

Example 3: Add a tag or value to track the player. This is useful if you want to check later whether they own the pass. Replace the comment with:

local passOwner = Instance.new("BoolValue") passOwner.Name = "HasGamepass" passOwner.Parent = player

You can combine multiple rewards in the same if block. The script runs once when the player joins, so if you want the reward to apply every time they respawn, you'll need a separate script that checks for the tag you created.

Testing your Gamepass in Studio

Before publishing, test that your script works. Click the Run button in Studio to start a test game. Your character will spawn — open the command bar (press F9) and type:

game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer, 12345678)

Replace 12345678 with your Gamepass ID. This opens a fake purchase prompt. Click Purchase (it won't charge you). Your character should immediately receive the reward — if you gave speed, you'll move faster; if you gave a tool, it appears in your backpack.

If nothing happens, check that your Gamepass ID is correct and that your script has no errors. Look at the Output window (View > Output) for red error messages. Common mistakes include typos in the ID, forgetting to replace the comment with actual reward code, or placing the script in the wrong folder.

Publishing your game and monitoring sales

Once testing passes, publish your game by clicking File > Publish to Roblox. Your Gamepass is now live and players can purchase it from your game's shop.

To see how many players have bought your Gamepass, go back to your game's settings on the Roblox website, click Monetization, then Passes**, and select your Gamepass. You'll see the total sales, revenue, and a list of recent purchases. Roblox takes a percentage of each sale (the rate varies), and the rest goes into your account as Robux.

If players report that they bought the Gamepass but didn't receive the reward, the most common cause is a script error. Check the Output window in Studio while running a test, and verify that the Gamepass ID in your script matches the ID in your game's settings exactly.

Common mistakes and how to fix them

The Gamepass doesn't appear in the shop. Make sure you published the game after creating the Gamepass. If you created the Gamepass before publishing, republish the game so Roblox syncs the new item.

Players buy the Gamepass but don't get the reward. Check three things: the Gamepass ID in your script matches the one in your settings, the script is in ServerScriptService (not in a player's backpack or somewhere else), and there are no red errors in the Output window. If the script has errors, fix them and republish.

The reward only works sometimes or only for some players. If you're giving a tool or changing the character, make sure the character exists before you try to modify it. Use player.Character:WaitForChild("Humanoid") to wait for the character to fully load before running reward code.

You want to change the Gamepass price or description. Go back to your game's settings on the Roblox website, click Monetization, select the Gamepass, and edit it. Changes take effect immediately — you don't need to republish the game.

Frequently Asked Questions

Can I give a Gamepass reward to players who already own it when they rejoin?

Yes. The script checks ownership every time a player joins, so if they own the Gamepass, they get the reward each time they rejoin. If the reward is a tool, you might want to check whether they already have it before giving it again, so they don't end up with duplicates.

What's the difference between a Gamepass and a developer product?

A Gamepass is a one-time permanent purchase. A developer product can be bought multiple times and is usually consumable — like in-game currency or a temporary boost. Use Gamepasses for permanent perks and developer products for things players buy repeatedly.

How much Robux should I charge for a Gamepass?

Prices range from 50 to 1,000 Robux depending on what you're offering. A small perk like extra speed might be 50–100 Robux. A major advantage like a powerful weapon or exclusive area might be 200–500 Robux. Look at similar games to see what players expect to pay.

Can I test a Gamepass without publishing my game?

Yes. Use the Run button in Studio to test locally. The fake purchase prompt lets you simulate buying the Gamepass and see if the reward works. You don't need to publish until you're confident the script is correct.

What happens if I delete a Gamepass after players have bought it?

Players keep the Gamepass and it stays in their inventory, but it will no longer appear in your shop. If you delete the Gamepass by accident, you can recreate it with the same ID and it will work again for existing owners. Avoid deleting Gamepasses that players have already purchased.