Advertisement
ZKiller

Place Teleporter GUI 2

Oct 16th, 2017
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. local teleporting = false
  2. local gui = Instance.new("ScreenGui")
  3. gui.Parent = game.Players[script.Parent.Name].PlayerGui
  4. local f = Instance.new("Frame")
  5. f.Parent = gui
  6. f.Position = UDim2.new(0,0,0,500)
  7. f.BackgroundColor3 = Color3.fromRGB(118,207,112)
  8. f.BorderColor3 = Color3.fromRGB(108,197,102)
  9. f.BorderSizePixel = 3
  10. f.Size = UDim2.new(0,200,0,110)
  11. local box = Instance.new("TextBox")
  12. box.Parent = f
  13. box.Size = UDim2.new(0,200,0,30)
  14. box.BackgroundColor3 = Color3.new(0,0,0)
  15. box.BackgroundTransparency = .5
  16. box.Font = Enum.Font.Arcade
  17. box.Text = "Place ID"
  18. box.TextColor3 = Color3.new(255,255,255)
  19. box.TextScaled = true
  20. local box2 = Instance.new("TextBox")
  21. box2.Parent = f
  22. box2.Size = UDim2.new(0,200,0,30)
  23. box2.BackgroundColor3 = Color3.new(0,0,0)
  24. box2.BackgroundTransparency = .5
  25. box2.Font = Enum.Font.Arcade
  26. box2.Text = "Player [Full Nickname]"
  27. box2.Position = UDim2.new(0,0,0,30)
  28. box2.TextColor3 = Color3.new(255,255,255)
  29. box2.TextScaled = true
  30. local button = Instance.new("TextButton")
  31. button.Parent = f
  32. button.Position = UDim2.new(0,75,0,70)
  33. button.Size = UDim2.new(0,50,0,20)
  34. button.BackgroundColor3 = Color3.new(0,0,0)
  35. button.BackgroundTransparency = .5
  36. button.Text = "Teleport!"
  37. button.TextColor3 = Color3.new(255,255,255)
  38. function ActivateTeleport()
  39. teleporting = true
  40. end
  41. button.MouseButton1Down:connect(ActivateTeleport)
  42. function teleportPlace(hit)
  43. local p = game.Players:FindFirstChild(box2.Text)
  44. if p ~= nil and teleporting == true then
  45. game:GetService("TeleportService"):Teleport(box.Text,p)
  46. end
  47. end
  48. game.Workspace.Base.Touched:connect(teleportPlace)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement