WAOKyoNaga

Humanoid Teleport

Jul 5th, 2019 (edited)
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.33 KB | None | 0 0
  1. uis = game:GetService("UserInputService")
  2. sg = game:GetService("StarterGui")
  3. cg = game:GetService("CoreGui")
  4. wp = game:GetService("Workspace")
  5. cmr = wp.Camera
  6. rs = game:GetService("ReplicatedStorage")
  7. lgt = game:GetService("Lighting")
  8. plrs = game:GetService("Players")
  9. lplr = plrs.LocalPlayer
  10. mouse = lplr:GetMouse()
  11.  
  12. if cg:FindFirstChild("HumanoidTeleport") then
  13.     cg["HumanoidTeleport"]:Destroy()
  14. end
  15.  
  16. _G.autoOneOn = false
  17. _G.guiOn = false
  18.  
  19. -- Gui to Lua
  20. -- Version: 3.2
  21.  
  22. -- Instances:
  23.  
  24. local HumanoidTeleport = Instance.new("ScreenGui")
  25. local MainGUI = Instance.new("Frame")
  26. local Title = Instance.new("TextLabel")
  27. local Distance = Instance.new("TextBox")
  28. local NamePlayer = Instance.new("TextBox")
  29. local BringPlayer = Instance.new("TextButton")
  30. local BringAll = Instance.new("TextButton")
  31. local Reset = Instance.new("TextButton")
  32. local AutoOne = Instance.new("TextButton")
  33. local OpenBNT = Instance.new("TextButton")
  34.  
  35. --Properties:
  36.  
  37. HumanoidTeleport.Name = "HumanoidTeleport"
  38. HumanoidTeleport.Parent = cg
  39.  
  40. MainGUI.Name = "MainGUI"
  41. MainGUI.Parent = HumanoidTeleport
  42. MainGUI.BackgroundColor3 = Color3.fromRGB(242, 243, 243)
  43. MainGUI.BorderColor3 = Color3.fromRGB(0, 0, 0)
  44. MainGUI.Position = UDim2.new(0.120326385, 0, 0.254854709, 0)
  45. MainGUI.Size = UDim2.new(0, 290, 0, 230)
  46. MainGUI.Visible = false
  47. MainGUI.Active = true
  48. MainGUI.Draggable = true
  49.  
  50. Title.Name = "Title"
  51. Title.Parent = MainGUI
  52. Title.BackgroundColor3 = Color3.fromRGB(109, 110, 108)
  53. Title.Size = UDim2.new(0, 290, 0, 50)
  54. Title.Font = Enum.Font.SourceSans
  55. Title.Text = "TELEPORT"
  56. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  57. Title.TextSize = 30
  58.  
  59. Distance.Name = "Distance"
  60. Distance.Parent = Title
  61. Distance.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  62. Distance.Position = UDim2.new(0, 255, 0.239999995, 0)
  63. Distance.Size = UDim2.new(0, 25, 0, 25)
  64. Distance.Font = Enum.Font.SourceSans
  65. Distance.Text = "3"
  66. Distance.TextColor3 = Color3.fromRGB(0, 0, 0)
  67. Distance.TextSize = 14
  68. Distance.TextWrapped = true
  69.  
  70. NamePlayer.Name = "NamePlayer"
  71. NamePlayer.Parent = MainGUI
  72. NamePlayer.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  73. NamePlayer.Position = UDim2.new(0, 0, 0, 60)
  74. NamePlayer.Size = UDim2.new(0, 290, 0, 50)
  75. NamePlayer.Font = Enum.Font.SourceSans
  76. NamePlayer.PlaceholderColor3 = Color3.fromRGB(161, 165, 162)
  77. NamePlayer.PlaceholderText = "Name Here"
  78. NamePlayer.Text = ""
  79. NamePlayer.TextColor3 = Color3.fromRGB(0, 0, 0)
  80. NamePlayer.TextSize = 20
  81.  
  82. BringPlayer.Name = "BringPlayer"
  83. BringPlayer.Parent = MainGUI
  84. BringPlayer.BackgroundColor3 = Color3.fromRGB(161, 165, 162)
  85. BringPlayer.Position = UDim2.new(0, 0, 0, 120)
  86. BringPlayer.Size = UDim2.new(0, 290, 0, 50)
  87. BringPlayer.Font = Enum.Font.SourceSans
  88. BringPlayer.Text = "Bring to Me"
  89. BringPlayer.TextColor3 = Color3.fromRGB(242, 243, 243)
  90. BringPlayer.TextSize = 30
  91.  
  92. BringAll.Name = "BringAll"
  93. BringAll.Parent = MainGUI
  94. BringAll.BackgroundColor3 = Color3.fromRGB(161, 165, 162)
  95. BringAll.Position = UDim2.new(0, 0, 0, 180)
  96. BringAll.Size = UDim2.new(0, 290, 0, 50)
  97. BringAll.Font = Enum.Font.SourceSans
  98. BringAll.Text = "Bring All to Me"
  99. BringAll.TextColor3 = Color3.fromRGB(242, 243, 243)
  100. BringAll.TextSize = 30
  101.  
  102. Reset.Name = "Reset"
  103. Reset.Parent = MainGUI
  104. Reset.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  105. Reset.Position = UDim2.new(0.827586234, 0, 0.782608688, 0)
  106. Reset.Size = UDim2.new(0, 50, 0, 25)
  107. Reset.Font = Enum.Font.SourceSans
  108. Reset.Text = "Reset"
  109. Reset.TextColor3 = Color3.fromRGB(0, 0, 0)
  110. Reset.TextSize = 14
  111.  
  112. AutoOne.Name = "AutoOne"
  113. AutoOne.Parent = MainGUI
  114. AutoOne.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  115. AutoOne.Position = UDim2.new(0.824137926, 0, 0.521739125, 0)
  116. AutoOne.Size = UDim2.new(0, 50, 0, 25)
  117. AutoOne.Font = Enum.Font.SourceSans
  118. AutoOne.Text = "Auto Off"
  119. AutoOne.TextColor3 = Color3.fromRGB(0, 0, 0)
  120. AutoOne.TextSize = 14
  121.  
  122. OpenBNT.Name = "OpenBNT"
  123. OpenBNT.Parent = HumanoidTeleport
  124. OpenBNT.BackgroundColor3 = Color3.fromRGB(161, 165, 162)
  125. OpenBNT.Position = UDim2.new(0, 0, 0.819410324, 0)
  126. OpenBNT.Size = UDim2.new(0, 25, 0, 25)
  127. OpenBNT.Font = Enum.Font.SourceSans
  128. OpenBNT.Text = ">"
  129. OpenBNT.TextColor3 = Color3.fromRGB(0, 0, 0)
  130. OpenBNT.TextSize = 30
  131.  
  132. -- Scripts:
  133. function plrlist(thing)
  134.     for _, v in pairs(plrs:GetPlayers()) do
  135.         if string.find(string.lower(v.Name), string.lower(thing)) then
  136.             return v
  137.         end
  138.     end
  139. end
  140.  
  141. OpenBNT.MouseButton1Down:connect(
  142.     function()
  143.         if _G.guiOn == false then
  144.             OpenBNT.Text = "<"
  145.             MainGUI.Visible = true
  146.             _G.guiOn = true
  147.         else
  148.             OpenBNT.Text = ">"
  149.             MainGUI.Visible = false
  150.             _G.guiOn = false
  151.         end
  152.     end
  153. )
  154.  
  155. BringPlayer.MouseButton1Down:connect(
  156.     function()
  157.         if tonumber(tostring(Distance.Text)) == nil then
  158.             Distance.BorderColor3 = Color3.fromRGB(196, 40, 28)
  159.         else
  160.             Distance.BorderColor3 = Color3.fromRGB(27, 42, 53)
  161.             local dis = tonumber(tostring(Distance.Text))
  162.             local pos = lplr.Character.HumanoidRootPart.CFrame
  163.             local charplayer = wp:FindFirstChild(plrlist(NamePlayer.Text).Name)
  164.             if charplayer then
  165.                 wait(0.5)
  166.                 if plrlist(NamePlayer.Text).Name ~= lplr.Name then
  167.                     charplayer.HumanoidRootPart.Anchored = false
  168.                     charplayer.HumanoidRootPart.CanCollide = false
  169.                     charplayer.HumanoidRootPart.CFrame = pos * CFrame.new(0, 2, -dis)
  170.                     charplayer.HumanoidRootPart.Anchored = true
  171.                 end
  172.             end
  173.         end
  174.     end
  175. )
  176.  
  177. AutoOne.MouseButton1Down:connect(
  178.     function()
  179.         if _G.autoOneOn == false then
  180.             _G.autoOneOn = true
  181.             AutoOne.Text = "Auto On"
  182.             while _G.autoOneOn == true do
  183.                 if tonumber(tostring(Distance.Text)) == nil then
  184.                     Distance.BorderColor3 = Color3.fromRGB(196, 40, 28)
  185.                 else
  186.                     Distance.BorderColor3 = Color3.fromRGB(27, 42, 53)
  187.                     local dis = tonumber(tostring(Distance.Text))
  188.                     local pos = lplr.Character.HumanoidRootPart.CFrame
  189.                     local charplayer = wp:FindFirstChild(plrlist(NamePlayer.Text).Name)
  190.                     if charplayer then
  191.                         wait(0.1)
  192.                         if plrlist(NamePlayer.Text).Name ~= lplr.Name then
  193.                             charplayer.HumanoidRootPart.Anchored = false
  194.                             charplayer.HumanoidRootPart.CanCollide = false
  195.                             charplayer.HumanoidRootPart.CFrame = pos * CFrame.new(0, 2, -dis)
  196.                             charplayer.HumanoidRootPart.Anchored = true
  197.                         end
  198.                     end
  199.                 end
  200.                 wait(0.1)
  201.             end
  202.         else
  203.             _G.autoOneOn = false
  204.             AutoOne.Text = "Auto Off"
  205.         end
  206.     end
  207. )
  208.  
  209. BringAll.MouseButton1Down:connect(
  210.     function()
  211.         if tonumber(tostring(Distance.Text)) == nil then
  212.             Distance.BorderColor3 = Color3.fromRGB(196, 40, 28)
  213.         else
  214.             Distance.BorderColor3 = Color3.fromRGB(27, 42, 53)
  215.             local dis = tonumber(tostring(Distance.Text))
  216.             local pos = lplr.Character.HumanoidRootPart.CFrame
  217.             for _, v in pairs(plrs:GetPlayers()) do
  218.                 local charplayer = wp:FindFirstChild(v.Name)
  219.                 if charplayer then
  220.                     wait()
  221.                     if v.Name ~= lplr.Name then
  222.                         charplayer.HumanoidRootPart.Anchored = false
  223.                         charplayer.HumanoidRootPart.CanCollide = false
  224.                         charplayer.HumanoidRootPart.CFrame = pos * CFrame.new(0, 2, -dis)
  225.                         charplayer.HumanoidRootPart.Anchored = true
  226.                     end
  227.                 end
  228.             end
  229.         end
  230.     end
  231. )
  232.  
  233. Reset.MouseButton1Down:connect(
  234.     function()
  235.         for _, v in pairs(plrs:GetPlayers()) do
  236.             if v.Name ~= lplr.Name then
  237.                 local charplayer = wp:FindFirstChild(v.Name)
  238.                 if charplayer then
  239.                     charplayer.HumanoidRootPart.Anchored = false
  240.                     charplayer.HumanoidRootPart.CanCollide = false
  241.                 end
  242.             end
  243.         end
  244.     end
  245. )
Add Comment
Please, Sign In to add comment