so this is the code im using
local player
script.Parent.MouseButton1Click:Connect(function()
local MarketplaceService = game:GetService("MarketplaceService")
local productID = 994379939
player = script.Parent.Parent.Parent.Parent.Parent
print(player)
MarketplaceService:PromptProductPurchase(player,productID)
end)
when a player clicks on it and make a purchases i dont know how to see when a player makes the purchases the code i want it to run when a player buys it is this:
player.leaderstats.lives.Value = player.leaderstats.lives.Value + 10

2 comments
Is this a product or gamepass?
a product