Advertisement
Guest User

lolhi

a guest
Aug 22nd, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. local MarketplaceService = Game:GetService("MarketplaceService")
  2. local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")
  3.  
  4. CASHID = 19382769
  5.  
  6. MarketplaceService.ProcessReceipt = function(receiptInfo)
  7.     local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_product_" .. receiptInfo.ProductId
  8.     local numberBought = ds:IncrementAsync(playerProductKey, 1)
  9.     for i,v in pairs (game.Players:GetChildren()) do
  10.         if v.userId == receiptInfo.PlayerId then
  11.             if receiptInfo.ProductId == CASHID then
  12.            
  13.  
  14.                 lds = v:FindFirstChild("leaderstats")
  15.                 if lds ~= nil then
  16.                     cs = lds:FindFirstChild("Money")
  17.                     if cs ~= nil then
  18.                         cs.Value = cs.Value + 10
  19.                     end
  20.                    
  21.                     --Can you change it to speed increase.
  22.  
  23.                    
  24.                    
  25.                    
  26.                    
  27.                 end
  28.             end
  29.         end
  30.     end
  31.     return Enum.ProductPurchaseDecision.PurchaseGranted    
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement