Advertisement
Guest User

Untitled

a guest
Dec 26th, 2014
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. service = game:GetService("MarketplaceService")
  2. extramoneyid = 20026140
  3. extramoney = 100
  4.  
  5. service.ProcessReceipt = function(receipt)
  6.     local players = game.Players:GetPlayers()
  7.     for index=1, #players do
  8.         local player = players[index]
  9.  
  10.         if player.userId == receipt.PlayerId then
  11.             -- got the right player
  12.             if receipt.ProductId == extramoneyid then
  13.                 -- they purchased the extra money product
  14.                 player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + extramoney
  15.                 return Enum.ProductPurchaseDecision.PurchaseGranted
  16.             end
  17.         end
  18.     end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement