Help in creating a script

Hello !, I need help, I am trying to create a GamePass script that puts you in a team, I mean you buy the GamePass and the script automatically puts you in a team, does anyone know how it would be created? My scripts fail, thanks (If I am in the wrong category, please correct me)

Can you post the code you already have?

Hey Valentino7754!

jumbopushpop112 is right, really you should give us an example of your attempt but I’ll try to steer you in the right direction anyway.

You’re saying you want the gamepass to put you on a team, correct? Well, do you want to gamepass to put them on the team every time they join or only after the first time they purchase it? If that is the case might I suggest using a developer product instead? A developer product is like a game pass that you can buy over and over again.

I will give you resources for each and explain a little how they work. The first thing you should familiarize yourself with is the MarketplaceService. The MarketplaceService is used for almost all of the monetization methods on Roblox.

To detect when a player has purchased a gamepass you can use this event:

To detect when a player has purchased a developer product you HAVE TO use this event.

To set a players team you can edit this property of the player:

Hope all this helps! Let me know if you need anymore information.