So I know how to prompt the purchase, and I know how to check if someone has it. But how do I check if someone bought it after the prompt purchase?
You will have to check whether the gamepass /product own is true so you could do something like this
local hasPass = false -- Check if the player already owns the game pass local success, message = pcall(function() hasPass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamePassID) end)
local market = game:GetService("MarketplaceService") local plr = game:GetService("Players").LocalPlayer local gamepass = 0 --change to your gamepass ID if market:PlayerOwnsAssest(plr, gamepass) then --put in the script where the player owns it else game:GetService("MarketplaceService"):PromptPurchase(game.Players.LocalPlayer, gamepass) end