local mps = game:GetService("MarketplaceService")
local button = script.Parent
local player = game.Players.LocalPlayer
local Value = script.Parent.Gamepass

button.MouseButton1Click:connect(function()
	mps:PromptGamePassPurchase(player, Value)
end)

mps.PromptGamePassPurchaseFinished:Connect(function(player, id, purchased)
	if id == Value and purchased then
		game.ReplicatedStorage.GiveWarp:FireServer()
	end
end)

It is a localscript in startergui

Error: Unable to cast Instance to int64 - Client - LocalScript:7