I made this develper product to change your health to 89, but it is not working
**Notes: **
The button is a text button in a surface gui, when you click it it PromptsPurchase to you. You buy it, and the script inside the part that has the surface gui doesnt work. Here is the script:
local MarketplaceService = Game:GetService("MarketplaceService")
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")
local productId = 20068872
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 = -89
end
end
end
local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_purchase_" .. receiptInfo.PurchaseId
ds:IncrementAsync(playerProductKey, 1)
return Enum.ProductPurchaseDecision.PurchaseGranted
end

1 comment
Dude one problem, I know I tried that before, But the thing is that when you rejoin you get an extra point amount so I fixed it.