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.
Game Pass for in game money?
2 answers
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?
1 comment
You should comment, rather than putting an answer on your own question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
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 work?
it should, http://www.roblox.com/Developer-Product-Sample-place?id=147965737 here is the dev place, sorry for being lazy, inside the script that handles the purchase it should comment where you give the player whatever they bought in the pass
First of all, you should put any code you provide in code block. Secondly, if you're going to answer then answer fully.. saying 'do something like' and then not even providing full code isn't a good answer
ok I'm sorry