I have this script that will prompt up a purchase, but at the same time, I have a gui that I want to show. If the user presses accept or decline to the purchase, the gui will disappear.
Here is my script:
local wat = 607329813 script.Parent=game.ServerScriptService local market=game:GetService("MarketplaceService") for i,v in pairs(game.Players:GetChildren()) do if not market:PlayerOwnsAsset(v,wat) then market:PromptPurchase(v,wat) end end game.Players.PlayerAdded:connect(function(player) if not market:PlayerOwnsAsset(player,wat) then market:PromptPurchase(player,wat) end end)
Also the GUI's name is GUI in case that helps.