Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- service = game:GetService("MarketplaceService")
- extramoneyid = 20026140
- extramoney = 100
- service.ProcessReceipt = function(receipt)
- local players = game.Players:GetPlayers()
- for index=1, #players do
- local player = players[index]
- if player.userId == receipt.PlayerId then
- -- got the right player
- if receipt.ProductId == extramoneyid then
- -- they purchased the extra money product
- player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + extramoney
- return Enum.ProductPurchaseDecision.PurchaseGranted
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement