Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local MarketplaceService = Game:GetService("MarketplaceService")
- local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")
- CASHID = 19382769
- MarketplaceService.ProcessReceipt = function(receiptInfo)
- local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_product_" .. receiptInfo.ProductId
- local numberBought = ds:IncrementAsync(playerProductKey, 1)
- for i,v in pairs (game.Players:GetChildren()) do
- if v.userId == receiptInfo.PlayerId then
- if receiptInfo.ProductId == CASHID then
- lds = v:FindFirstChild("leaderstats")
- if lds ~= nil then
- cs = lds:FindFirstChild("Money")
- if cs ~= nil then
- cs.Value = cs.Value + 10
- end
- --Can you change it to speed increase.
- end
- end
- end
- end
- return Enum.ProductPurchaseDecision.PurchaseGranted
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement