function Click()
local id = 227017712
game.Players.PlayerAdded:connect(function(player)
if game:GetService("GamePassService"):PlayerHasPass(player, id) then
print'has pass'
script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(-463.884, -15.558, 140.897)
else
script.LocalPlayer.StarterGui.NoPass.NoPass.Visible = true
print'has no pass'
wait(5)
script.LocalPlayer.StarterGui.NoPass.NoPass.Visible = false
end
end)
end
script.Parent.MouseButton1Down:connect(Click)
no output,

4 comments
This script moves the player to the position without even clicking the GUI button, that is not what I want it to do, I want the player to chose whenever he wants to teleport to the position during the game.
Edited
PlayerHasPass can't be used from a LocalScript.
Edited[2]