Advertisement
ZKiller

Place Teleporter GUI

Oct 16th, 2017
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 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,70)
  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 button = Instance.new("TextButton")
  21. button.Parent = f
  22. button.Position = UDim2.new(0,75,0,40)
  23. button.Size = UDim2.new(0,50,0,20)
  24. button.BackgroundColor3 = Color3.new(0,0,0)
  25. button.BackgroundTransparency = .5
  26. button.Text = "Teleport!"
  27. button.TextColor3 = Color3.new(255,255,255)
  28. function ActivateTeleport()
  29. teleporting = true
  30. end
  31. button.MouseButton1Down:connect(ActivateTeleport)
  32. function teleportPlace(hit)
  33. local p = game.Players:FindFirstChild(hit.Parent.Name)
  34. if p ~= nil and teleporting == true then
  35. game:GetService("TeleportService"):Teleport(box.Text,p)
  36. end
  37. end
  38. game.Workspace.Base.Touched:connect(teleportPlace)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement