Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Game Pass for in game money? [closed]

Asked by 9 years ago

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.

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?

2 answers

Log in to vote
0
Answered by 9 years ago

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

0
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? omarz123 5 — 9y
0
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 dragonkeeper467 453 — 9y
0
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 Goulstem 8144 — 9y
0
ok I'm sorry dragonkeeper467 453 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

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?

0
You should comment, rather than putting an answer on your own question. Goulstem 8144 — 9y