Hello, I am trying to script when a player hits a part the developer promp opens (wich works) However I would like to check if a player has bought it, and if so they will get a tool. But I have no idea on doing it. Can somebody help me?

local gearstorage = game:GetService("ReplicatedStorage").Gears
local MS = game:GetService("MarketplaceService")
local productID = 408797380
local gear = gearstorage:WaitForChild("GrappleHook")





script.Parent.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
        local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
         if plr then
                MS:PromptProductPurchase(plr, productID)
            end

    end
end)

1 comment

0

Developer products are for multi-time purchases, for example in game money. For tools, I strongly recommend using gamepasses. I am not sure but I don't think it is possible to check, unless you have a script that logs the purchases in game.