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,
--EDIT[2]--
Remove the PlayerAdded event - This is making it so whenever any player joins then their position gets set to the specified location.
This should be a regular script, define plr.
local id = 227017712 local plr --Define! function Click() if game:GetService("GamePassService"):PlayerHasPass(player, id) then plr.Character.Torso.CFrame = CFrame.new(-463.884, -15.558, 140.897) else plr.PlayerGui.NoPass.NoPass.Visible = true wait(5) plr.PlayerGui.NoPass.NoPass.Visible = false end end script.Parent.MouseButton1Down:connect(Click)