princeofheaven

Ff

Jun 5th, 2015
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. local Player = script.Parent.Parent.Parent
  2.  
  3. while Player.Character == nil do wait() end
  4.  
  5. local ID
  6. local Place
  7. local Clicked = false
  8. local Teleing = false
  9.  
  10. local Gui = script.Parent
  11.  
  12. local Go = Gui.GoButton
  13. local IDBox = Gui.IDSelection.Box
  14. local PlaceBox = Gui.PlaceSelection.Box
  15.  
  16. Go.MouseButton1Up:connect(function()
  17. -- Go to Place
  18. if Clicked == true then return end
  19. ID = IDBox.Text
  20. Place = PlaceBox.Text
  21. pcall(function()
  22. game:GetService("TeleportService"):Teleport(ID,Place)
  23. print("Teleporting Player")
  24. Teleing = true
  25. end)
  26. if (Teleing == false) then
  27. Clicked = true
  28. Go.FontSize = "Size24"
  29. Go.Text = "Error!"
  30. wait(0.5)
  31. Clicked = false
  32. Go.FontSize = "Size36"
  33. Go.Text = "Go!"
  34. else
  35. Clicked = true
  36. Go.FontSize = "Size24"
  37. Go.Text = "Teleing.."
  38. wait(0.5)
  39. Clicked = false
  40. Go.FontSize = "Size36"
  41. Go.Text = "Go!"
  42. Teleing = false
  43. end
  44. end)
Advertisement
Add Comment
Please, Sign In to add comment