How do I make a gamepass print something in output once bought?

If somebody were to buy a gamepass from my game, how would I make it actually work? I’m a bit lost and I don’t know what to really put for this since I’m not that experienced at scripting.

All I want is a script that when somebody buys something, it prints something out in Output.

2 Likes

First of all, Happy birthday!

Knowing whether or not a player has purchased an item can be done using some events from the MarketPlaceService. << click the link for more info

There is an event called PromptGamePassPurchaseFinished that will also provide you with 3 values.
The player, the ID of the product, whether or not it was purchased.

There is also a ProcessReceipt callback which is more commonly used.

2 Likes