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)