RgRacks

Roblox Teleport Script (works)

Apr 12th, 2020
113
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local TestingGUI = Instance.new("ScreenGui")
  2. local MainGUI = Instance.new("Frame")
  3. local PlayerTP_Input = Instance.new("TextBox")
  4. local PlayerTP_Teleport = Instance.new("TextButton")
  5. --Properties:
  6. TestingGUI.Name = "Testing GUI"
  7. TestingGUI.Parent = game.CoreGui
  8.  
  9. MainGUI.Name = "MainGUI"
  10. MainGUI.Parent = TestingGUI
  11. MainGUI.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  12. MainGUI.BorderColor3 = Color3.new(0, 0, 0)
  13. MainGUI.BorderSizePixel = 3
  14. MainGUI.Position = UDim2.new(0.295202941, 0, 0.344621539, 0)
  15. MainGUI.Size = UDim2.new(0, 332, 0, 155)
  16. MainGUI.Active = true
  17. MainGUI.Draggable = true
  18.  
  19. PlayerTP_Input.Name = "PlayerTP_Input"
  20. PlayerTP_Input.Parent = MainGUI
  21. PlayerTP_Input.BackgroundColor3 = Color3.new(0, 0, 0)
  22. PlayerTP_Input.BackgroundTransparency = 0.5
  23. PlayerTP_Input.BorderColor3 = Color3.new(0, 0, 0)
  24. PlayerTP_Input.Size = UDim2.new(0, 332, 0, 50)
  25. PlayerTP_Input.Font = Enum.Font.SourceSans
  26. PlayerTP_Input.Text = ""
  27. PlayerTP_Input.TextColor3 = Color3.new(1, 1, 1)
  28. PlayerTP_Input.TextSize = 14
  29.  
  30. PlayerTP_Teleport.Name = "PlayerTP_Teleport"
  31. PlayerTP_Teleport.Parent = MainGUI
  32. PlayerTP_Teleport.BackgroundColor3 = Color3.new(0, 0, 0)
  33. PlayerTP_Teleport.BackgroundTransparency = 0.5
  34. PlayerTP_Teleport.BorderColor3 = Color3.new(0, 0, 0)
  35. PlayerTP_Teleport.Position = UDim2.new(0, 0, 0.677419245, 0)
  36. PlayerTP_Teleport.Size = UDim2.new(0, 332, 0, 50)
  37. PlayerTP_Teleport.Font = Enum.Font.SourceSans
  38. PlayerTP_Teleport.Text = "Teleport To Player"
  39. PlayerTP_Teleport.TextColor3 = Color3.new(1, 1, 1)
  40. PlayerTP_Teleport.TextSize = 14
  41. PlayerTP_Teleport.MouseButton1Click:connect(function()
  42.     local tp_namedplayer = PlayerTP_Input.Text
  43.     local tp_player = game:GetService("Players")[tp_namedplayer]
  44.     local PLR = game:GetService("Players").LocalPlayer
  45.     local p = PlayerTP_Input.Text
  46.    
  47.     if tp_player then
  48.         for i = 1,1 do
  49.         wait(.08)
  50.         PLR.Character.HumanoidRootPart.CFrame = tp_player.Character.HumanoidRootPart.CFrame + Vector3.new(0, 0, -1)
  51.         end
  52.     end
  53. end)
RAW Paste Data Copied