Why is this not prompting the player after 1 second??? No error.
local gamePassId = 111451515
local marketPlaceService = game:GetService("MarketplaceService")
local function promptPurchase()
local hasPass = false
local success, message = pcall(function()
hasPass = marketPlaceService:UserOwnsGamePassAsync(player.UserId,gamePassId)
end)
if hasPass == true then
print("Player already has the gamepass")
marketPlaceService:PromptGamePassPurchase(player, gamePassId)
else
marketPlaceService:PromptGamePassPurchase(player, gamePassId)
end
end
local x2Stone = player:WaitForChild("PlayerGui"):WaitForChild("GamepassFrame"):WaitForChild("ScrollingFrame"):WaitForChild("x2Stone")
wait(1)
promptPurchase()