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
Button.MouseButton1Click:Connect(function()
if PlayerHasTicket == false then
Information.Text = "Please purchase a ticket!"
wait(1)
game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer, GamePassID)
Information.Text = OrignialText
elseif PlayerHasTicket == true then
Information.Text = "Comfirmation Completed"
wait(1)
Information.Text = OrignialText
TweenService:Create(ClassFrame, TweenInfo.new(0.9, Enum.EasingStyle.Back, Enum.EasingDirection.In), {Position = UDim2.new(0.125, 0, 1.131, 0)}):Play()
task.wait(0.9)
TweenService:Create(FlightInfo, TweenInfo.new(0.9, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Position = UDim2.new(0.125, 0, 0.131, 0)}):Play()
end
end)