Tutorial:Handling Gamepasses

In Roblox, Gamepasses are a huge part of gameplay. In this tutorial, we will go over how to make gamepasses give in game bonuses.

We will start by asking ourselves, what a gamepass is. A gamepass is something that sells for Robux, can be purchased one time, and can give in-game bonuses.

Required Instances
Not all Instances show in explorer.

Scripting
In this example, we will give a tool to a player with the gamepass id of '123' be given a tool. Open the script. We are going to start with a simple PlayerAdded method.

Next, we need to define MarketplaceService, the service we will use to check ownership.

Finally, we will check ownership using an if statement. MarketplaceService has a method just for this purpose, called "UserOwnsGamePassAsync".

(replace Tool to your preferred tool.)