Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local CoinsDataStore = game:GetService("DataStoreService"):GetDataStore("Coins")
- local MPS = game:GetService("MarketplaceService")
- local Coins10 = script.ID.Value
- MPS.ProcessReceipt = function(Info)
- if Info.ProductId == Coins10 then
- local Player = game.Players:GetPlayerByUserId(Info.PlayerId)
- if Player then
- CoinsDataStore:SetAsync(Player.UserId, Player.Coins.Value)
- Player.Coins.Value += 10
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement