Advertisement
El1xir

Teleport people

Feb 23rd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. -- force place script made by v3rmillion
  2. admins = {"El1xir","wezzyfbabe"} -- People who don't get teleported
  3. id = 169870593 -- the place id of it
  4. tpcount = 0
  5. h= Instance.new("Hint",game.Workspace)
  6. h.Text = "Teleport count:"..tpcount-- the teleport count or how much people have been teleported
  7. local TrueIfAllowed = function(player)
  8. for _, admins in pairs(admins) do
  9. if string.lower(admins) == string.lower(player) then
  10. return true
  11. end
  12. end
  13. end
  14. for i, v in pairs(game.Players:GetPlayers()) do
  15. if not TrueIfAllowed(v.Name) then
  16. game:service("TeleportService"):Teleport(id,v.Character)
  17. end
  18. end
  19. function PlayerEntered(player)
  20. wait(0.00000000000001)
  21. if not TrueIfAllowed(player.Name) then
  22. game:service("TeleportService"):Teleport(id,player.Character)
  23. tpcount = tpcount + 1
  24. h.Text = "Teleport count:"..tpcount
  25. end
  26. end
  27. game.Players.PlayerAdded:connect(PlayerEntered)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement