How to make owned gamepass is passed?

It’s kind of hard to say but here is the code.

local TweenService = game:GetService("TweenService")

local ScreenUI = script.Parent.Parent.Parent.Parent
local ClassFrame = ScreenUI.ClassFrame
local FlightInfo = ScreenUI.FlightInfoFrame

local Button = script.Parent
local Information = ClassFrame.Information
local OrignialText = Information.Text
local GamePassID = 8429068643
local Player = game.Players.LocalPlayer
local PlayerHasTicket = false

	if PlayerHasTicket == false then
		Information.Text = "Please purchase a ticket!"
		game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer, GamePassID)
		Information.Text = OrignialText
	elseif PlayerHasTicket == true then
		Information.Text = "Comfirmation Completed"
		Information.Text = OrignialText
		TweenService:Create(ClassFrame,, Enum.EasingStyle.Back, Enum.EasingDirection.In), {Position =, 0, 1.131, 0)}):Play()
		TweenService:Create(FlightInfo,, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Position =, 0, 0.131, 0)}):Play()

If player doesn’t have gamepass it wont go to next page and get purchase ui. But it doesnt work.

Any issues in output?

No. I can’t find any errors.

Maybe just use a UIPageLayout instead?

Also, try running the prompt from a server script instead of a local script, I believe that should work.

Okay. Let me do that.

Actually i am making like this.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.