Advertisement
Sungmingamerpro13

CoinsProduct v2

Dec 14th, 2024
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.43 KB | None | 0 0
  1. local CoinsDataStore = game:GetService("DataStoreService"):GetDataStore("Coins")
  2.  
  3. local MPS = game:GetService("MarketplaceService")
  4. local Coins10 = script.ID.Value
  5.  
  6. MPS.ProcessReceipt = function(Info)
  7.     if Info.ProductId == Coins10 then
  8.         local Player = game.Players:GetPlayerByUserId(Info.PlayerId)
  9.        
  10.         if Player then
  11.             CoinsDataStore:SetAsync(Player.UserId, Player.Coins.Value)
  12.             Player.Coins.Value += 10
  13.         end
  14.     end
  15. end
  16.  
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement