Advertisement
Cakey3101

DevProductsHandler - Part 9!

May 18th, 2024
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.96 KB | Source Code | 0 0
  1. local MarketPlaceService = game:GetService("MarketplaceService")
  2. local Players = game:GetService("Players")
  3.  
  4. local DevProductIDS = {
  5.     1234567890; -- 2.5K Coins
  6.     1234567890; -- 10K Coins
  7.     1234567890; -- 25K Coins
  8.     1234567890; -- 50K Coins
  9.     1234567890; -- 100K Coins
  10. }
  11.  
  12. MarketPlaceService.ProcessReceipt = function(receiptInfo)
  13.     local player = Players:GetPlayerByUserId(receiptInfo.PlayerId)
  14.     if not player then
  15.         return Enum.ProductPurchaseDecision.NotProcessedYet
  16.     end
  17.    
  18.     if receiptInfo.ProductId == DevProductIDS[1] then
  19.         player.leaderstats.Coins.Value += 2500
  20.     elseif receiptInfo.ProductId == DevProductIDS[2] then
  21.         player.leaderstats.Coins.Value += 10000
  22.     elseif receiptInfo.ProductId == DevProductIDS[3] then
  23.         player.leaderstats.Coins.Value += 25000
  24.     elseif receiptInfo.ProductId == DevProductIDS[4] then
  25.         player.leaderstats.Coins.Value += 50000
  26.     elseif receiptInfo.ProductId == DevProductIDS[5] then
  27.         player.leaderstats.Coins.Value += 100000
  28.     end
  29. end
Tags: lua
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement