this is inside a touched event that is inside a for loop. v = all the tycoons buttons. after the gamepass purchase is prompt how do I check if the player bought it? if you need the full script let me know, its like 90 lines though
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,v.Gamepass.Value) then
print("bought")
else
game:GetService('MarketplaceService'):PromptGamePassPurchase()
end

2 comments
this script is in a touched event so the player variable has already been defined. Im trying to figure out how to constantly check if the gamepass has been purchased. would I do that outside the touched event? and how
https://www.youtube.com/watch?v=3hMmhmC18RA&list=PLhieaQmOk7nIoGnFoACf33M3o0BOqB38a&index=17 this video might help