Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Developer Product issue?

Asked by
yurhomi10 192
10 years ago

Am I missing something important? nothing in the output comes up, nothing in the new output they just updated. Help?

--SET UP VARIABLES--

local MarketPlace = game:GetService("MarketplaceService")
local Datastore = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")
DamageID = 19312506

--------------------

script.Parent.MouseButton1Down:connect(function()
MarketPlace.ProcessReceipt = function(receiptinfo)
    for i, player in ipairs(game.Players:GetChildren()) do
        if player.userId == receiptinfo.PlayerId then

            if receiptinfo.ProductId == DamageID then
                player.Character.Humanoid.Health = player.Character.Humanoid.Health - 20
                script.Parent.Text = player.Name .. " has bought death ! "
            end
        end
    end
    local productplayerkey = "player_" .. receiptinfo.PlayerId .. "_purchase_" .. receiptinfo.PurchaseId
    DataStore:IncrementAsync(productplayerkey, 1)

    return Enum.ProductPurchaseDecision.PurchaseGranted
end
end)

Answer this question