I understand how to make a gamepass but I have a simpsons game and I was wondering how to make it so that when someone buys the game pass they get donuts? Please help.
Under the handle purchase script, do something like game.Players.LocalPlayer.leaderstats.money = game.Players.LocalPlayer.leaderstats.money + 5 -- or whatever amount you want to increase it by... see the example place for product purchases which is a link in the wiki tutorial at wiki.roblox.com. It'll have a comment in the script saying something like, --handle purchase, in the receipt script
PassId = 219106579 game:GetService("Players").PlayerAdded:connect(function(Player) if game:GetService("GamePassService"):PlayerHasPass(Player, PassId) then Player:WaitForChild("leaderstats"):WaitForChild("donuts").Value = 100 end end)
Will this script work?
Closed as Not Constructive by Goulstem, ConnorVIII, and Tempestatem
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?