|
| 08 Jun 2014 08:17 AM |
How would I do this: I want a developer product to giver a player 'points' on the Leaderboard called 'Dollars'. How would I go across this? It says: player.Character.Humanoid.Health = 100 (It is a healing developer product made by a friend) What should I do? |
|
|
| Report Abuse |
|
|
|
| 08 Jun 2014 08:18 AM |
The full script: local MarketplaceService = Game:GetService("MarketplaceService") local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory") local productId = 20063612 MarketplaceService.ProcessReceipt = function(receiptInfo) for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then if receiptInfo.ProductId == productId then player.Character.Humanoid.Health = 100 game.Workspace.DisplayScreen.SurfaceGui.TextBox.Text = player.Name .. " has purchased a healing potion." end end end local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_purchase_" .. receiptInfo.PurchaseId ds:IncrementAsync(playerProductKey, 1) return Enum.ProductPurchaseDecision.PurchaseGranted end |
|
|
| Report Abuse |
|
|
|
| 08 Jun 2014 08:18 AM |
| player.leaderstats.Dollars.Value = player.leadersats.Dollars.Value + 100 |
|
|
| Report Abuse |
|
|
|
| 08 Jun 2014 08:19 AM |
| Simple as that? Thanks, I forgot what to put there (leaderstats). |
|
|
| Report Abuse |
|
|