Hi im a new scripter
I made this script so when a player click the button show the purchase ui and make the modal true, but i don’t know how to disable the modal when the player cancel/purchase the dev product.
Script
script.Parent.MouseButton1Click:Connect(function(player, assetID, isPurchased)
local Mp = game:GetService("MarketplaceService")
Mp:PromptProductPurchase(game.Players.LocalPlayer, 1326536385)
script.Parent.Modal = true
game:GetService("MarketplaceService").PromptPurchaseFinished:Connect(function()
script.Parent.Modal = false
end)
end)
Anyone know how to do that?