Hello, Why gamepass checker doesnt work(the script is from dev hub)
local MarketplaceService = game:GetService("MarketplaceService")
local gamePassID = 11925428
local gamePassName = "TripleHatch"
local TripleBtn = game.StarterGui.EggHatch.ChooseHatch.TripleBtn
local function onPromptGamePassPurchaseFinished(player, purchasedPassID, purchaseSuccess)
if purchaseSuccess == true and purchasedPassID == gamePassID then
print(player.Name .. "Owned the gamepass" .. gamePassName " -" .. gamePassID)
TripleBtn.Owned.Disabled = false
TripleBtn.NotOwned.Disabled = true
end
end
-- Connect "PromptGamePassPurchaseFinished" events to the "onPromptGamePassPurchaseFinished()" function
MarketplaceService.PromptGamePassPurchaseFinished:Connect(onPromptGamePassPurchaseFinished)
