Advertisement
Nekzzy

Untitled

Mar 4th, 2020
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- DarkShadow6's TARDIS Vortex Manipulator (Personal Teleport Adaptaton)
  2.  
  3. -- Initial checks.
  4.  
  5. TeleportPlayer = game:GetService("Players"):FindFirstChild("assadabin")
  6.  
  7. if script.Parent.ClassName ~= "Tool" then
  8. if TeleportPlayer == nil then print("Error: Player not found!") return end
  9. Tool = Instance.new("Tool", TeleportPlayer.Backpack)
  10. Tool.Name = "Vortex Manipulator"
  11. Tool.GripPos = Vector3.new(0, -0.3, -0.4)
  12. Tool.GripRight = Vector3.new(-1, 0, 0)
  13. Tool.TextureId = "http://www.roblox.com/Asset/?id=23806116"
  14. local Handle = Instance.new("Part", Tool)
  15. Handle.Name = "Handle"
  16. Handle.TopSurface = 0
  17. Handle.BottomSurface = 0
  18. Handle.FormFactor = "Custom"
  19. Handle.Size = Vector3.new(1.25, 1.25, 1.25)
  20. Handle.BrickColor = BrickColor.new("Really black")
  21. local Mesh = Instance.new("SpecialMesh", Handle)
  22. Mesh.MeshType = "FileMesh"
  23. Mesh.MeshId = "http://www.roblox.com/Asset/?id=14655367"
  24. Mesh.TextureId = "http://www.roblox.com/Asset/?id=23808694"
  25. Mesh.Scale = Vector3.new(1.25, 1.25, 1.25)
  26. local OpenSound = Instance.new("Sound", Handle)
  27. OpenSound.Name = "OpenSound"
  28. OpenSound.SoundId = "http://www.roblox.com/Asset/?id=14863866"
  29. OpenSound.Volume = 1
  30. OpenSound.Looped = false
  31. local TickSound = OpenSound:Clone()
  32. TickSound.Parent = Handle
  33. TickSound.Name = "TickSound"
  34. TickSound.Volume = 0.5
  35. TickSound.Pitch = 0.75
  36. TickSound.Looped = true
  37. script.Name = "Main"
  38. script:Clone().Parent = Tool
  39. script:Remove()
  40. else
  41.  
  42. -- Variable initialization.
  43.  
  44. TeleportReady = true
  45. TeleportWaypoints = {
  46. "Center", Vector3.new(0, 0, 20),
  47. "Edge of Base (1000x1000)", Vector3.new(494, 0, 494)
  48. }
  49. TeleportCharacters = {}
  50. TeleportOthers = false
  51.  
  52.  
  53. function Teleport(Position)
  54. if TeleportReady == false then
  55. return
  56. end
  57. TeleportReady = false
  58. table.insert(TeleportCharacters, TeleportPlayer.Character)
  59. if TeleportOthers == true then
  60. for _, PlayerList in pairs(game:GetService("Players"):GetPlayers()) do
  61. if PlayerList.Character ~= nil and PlayerList ~= TeleportPlayer then
  62. if PlayerList.Character:FindFirstChild("Torso") ~= nil then
  63. if (PlayerList.Character.Torso.Position - TeleportPlayer.Character.Torso.Position).magnitude < 5 then
  64. table.insert(TeleportCharacters, PlayerList.Character)
  65. end
  66. end
  67. end
  68. end
  69. end
  70. local Sound1 = Instance.new("Sound", TeleportPlayer.Character.Torso)
  71. Sound1.SoundId = "http://www.roblox.com/Asset/?id=18435238"
  72. Sound1.Pitch = 4
  73. Sound1.Volume = 1
  74. Sound1.Looped = true
  75. Sound1:Play()
  76. local Sound2Part = Instance.new("Part", Workspace)
  77. Sound2Part.Name = ""
  78. Sound2Part.Transparency = 1
  79. Sound2Part.TopSurface = 0
  80. Sound2Part.BottomSurface = 0
  81. Sound2Part.FormFactor = "Custom"
  82. Sound2Part.Size = Vector3.new(6, 0.2, 6)
  83. Sound2Part.Anchored = true
  84. Sound2Part.CanCollide = false
  85. Sound2Part:BreakJoints()
  86. Sound2Part.Position = Position
  87. local Sound2 = Sound1:Clone()
  88. Sound2:Stop()
  89. Sound2.Parent = Sound3Part
  90. Sound2:Play()
  91. for i = 0, 1, 0.075 do
  92. for x = 1, #TeleportCharacters do
  93. for _, Part in pairs(TeleportCharacters[x]:GetChildren()) do
  94. pcall(function() Part.Transparency = i end)
  95. end
  96. wait()
  97. end
  98. end
  99. for i = 1, #TeleportCharacters do
  100. for _, Part in pairs(TeleportCharacters[i]:GetChildren()) do
  101. pcall(function()
  102. Part.Velocity = Vector3.new()
  103. Part.RotVelocity = Vector3.new()
  104. end)
  105. end
  106. end
  107. Sound2Part.CFrame = CFrame.new(TeleportPlayer.Character.Torso.Position)
  108. for i = 1, #TeleportCharacters do
  109. pcall(function() TeleportCharacters[i].Humanoid.PlatformStand = true end)
  110. local Finish = CFrame.new(Position + Vector3.new(math.random(-3, 3), math.random(-3, 3), math.random(-3, 3)))
  111. for x = 1, 100 do
  112. TeleportCharacters[i].Torso.CFrame = Finish
  113. end
  114. coroutine.wrap(function()
  115. wait(math.random(50, 300) / 100)
  116. pcall(function() TeleportCharacters[i].Humanoid.PlatformStand = false end)
  117. end)()
  118. end
  119. for i = 1, 0, -0.05 do
  120. for x = 1, #TeleportCharacters do
  121. for x, Part in pairs(TeleportCharacters[x]:GetChildren()) do
  122. pcall(function() Part.Transparency = i end)
  123. end
  124. wait()
  125. end
  126. end
  127. for i = 1, #TeleportCharacters do
  128. for _, Part in pairs(TeleportCharacters[i]:GetChildren()) do
  129. pcall(function() Part.Transparency = 0 end)
  130. end
  131. end
  132. Sound1.Looped = false
  133. Sound2.Looped = false
  134. wait(1)
  135. Sound1:Remove()
  136. Sound2:Remove()
  137. Sound2Part:Remove()
  138. wait(2)
  139. TeleportCharacters = {}
  140. TeleportReady = true
  141. end
  142.  
  143. function onEquipped(Mouse)
  144. TeleportPlayer = game:GetService("Players"):GetPlayerFromCharacter(script.Parent.Parent)
  145. script.Parent.Handle.OpenSound:Stop()
  146. script.Parent.Handle.OpenSound:Play()
  147. coroutine.wrap(function()
  148. wait(0.1)
  149. script.Parent.Handle.TickSound:Stop()
  150. script.Parent.Handle.TickSound:Play()
  151. end)()
  152. local PlayerGui = TeleportPlayer:FindFirstChild("PlayerGui")
  153. if PlayerGui == nil then return end
  154. local TeleportGui = Instance.new("ScreenGui", PlayerGui)
  155. TeleportGui.Name = "PersonalTeleportGui"
  156. local Frame = Instance.new("Frame")
  157. Frame.Name = "Content"
  158. Frame.Size = UDim2.new(0, 300, 0, 315)
  159. Frame.Position = UDim2.new(0, 0, 0.5, -315 / 2)
  160. Frame.BorderSizePixel = 1
  161. Frame.BorderColor3 = Color3.new(0, 0, 0)
  162. Frame.BackgroundColor3 = Color3.new(0.15, 0.15, 0.15)
  163. Frame.Parent = TeleportGui
  164. local TextLabel = Instance.new("TextLabel")
  165. TextLabel.Name = "X Label"
  166. TextLabel.Size = UDim2.new(1, -15, 0, 15)
  167. TextLabel.Position = UDim2.new(0, 15, 0, 15)
  168. TextLabel.BorderSizePixel = 0
  169. TextLabel.BackgroundTransparency = 1
  170. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  171. TextLabel.Text = "X coordinate:"
  172. TextLabel.TextXAlignment = "Left"
  173. TextLabel.FontSize = "Size12"
  174. TextLabel.TextWrap = true
  175. TextLabel.Parent = TeleportGui.Content
  176. local TextLabel = TextLabel:Clone()
  177. TextLabel.Name = "Y Label"
  178. TextLabel.Position = UDim2.new(0, 15, 0, 45)
  179. TextLabel.Text = "Y coordinate:"
  180. TextLabel.Parent = TeleportGui.Content
  181. local TextLabel = TextLabel:Clone()
  182. TextLabel.Name = "Z Label"
  183. TextLabel.Position = UDim2.new(0, 15, 0, 75)
  184. TextLabel.Text = "Z coordinate:"
  185. TextLabel.Parent = TeleportGui.Content
  186. local TextBox = Instance.new("TextBox")
  187. TextBox.Name = "X"
  188. TextBox.ClearTextOnFocus = false
  189. TextBox.Size = UDim2.new(1, -130, 0, 15)
  190. TextBox.Position = UDim2.new(0, 115, 0, 15)
  191. TextBox.BorderColor3 = Color3.new(0, 0, 0)
  192. TextBox.BackgroundColor3 = Color3.new(1, 1, 1)
  193. TextBox.TextColor3 = Color3.new(0, 0, 0)
  194. TextBox.Text = "0"
  195. TextBox.TextXAlignment = "Left"
  196. TextBox.FontSize = "Size12"
  197. TextBox.Parent = TeleportGui.Content
  198. local TextBox = TextBox:Clone()
  199. TextBox.Name = "Y"
  200. TextBox.Position = UDim2.new(0, 115, 0, 45)
  201. TextBox.Parent = TeleportGui.Content
  202. local TextBox = TextBox:Clone()
  203. TextBox.Name = "Z"
  204. TextBox.Position = UDim2.new(0, 115, 0, 75)
  205. TextBox.Parent = TeleportGui.Content
  206. local Divider = Instance.new("Frame")
  207. Divider.Name = "Divider"
  208. Divider.Size = UDim2.new(1, -30, 0, 1)
  209. Divider.Position = UDim2.new(0, 15, 0, 100)
  210. Divider.BorderSizePixel = 0
  211. Divider.BackgroundColor3 = Color3.new(1, 1, 1)
  212. Divider.Parent = TeleportGui.Content
  213. local TextLabel = TextLabel:Clone()
  214. TextLabel.Name = "CX"
  215. TextLabel.Position = UDim2.new(0, 15, 0, 110)
  216. TextLabel.Text = "Current X coordinate: "
  217. TextLabel.Parent = TeleportGui.Content
  218. local TextLabel = TextLabel:Clone()
  219. TextLabel.Name = "CY"
  220. TextLabel.Position = UDim2.new(0, 15, 0, 140)
  221. TextLabel.Text = "Current Y coordinate: "
  222. TextLabel.Parent = TeleportGui.Content
  223. local TextLabel = TextLabel:Clone()
  224. TextLabel.Name = "CZ"
  225. TextLabel.Position = UDim2.new(0, 15, 0, 170)
  226. TextLabel.Text = "Current Z coordinate: "
  227. TextLabel.Parent = TeleportGui.Content
  228. local Divider = Divider:Clone()
  229. Divider.Position = UDim2.new(0, 15, 0, 195)
  230. Divider.BorderSizePixel = 0
  231. Divider.BackgroundColor3 = Color3.new(1, 1, 1)
  232. Divider.Parent = TeleportGui.Content
  233. local TextButton = Instance.new("TextButton")
  234. TextButton.Name = "Teleport"
  235. TextButton.Size = UDim2.new(1, -30, 0, 15)
  236. TextButton.Position = UDim2.new(0, 15, 0, 205)
  237. TextButton.BorderColor3 = Color3.new(0, 0, 0)
  238. TextButton.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3)
  239. TextButton.TextColor3 = Color3.new(1, 1, 1)
  240. TextButton.Text = "Begin Teleportation"
  241. TextButton.FontSize = "Size12"
  242. TextButton.Parent = TeleportGui.Content
  243. TextButton.MouseButton1Up:connect(function()
  244. Teleport(Vector3.new(tonumber(TeleportGui.Content.X.Text), tonumber(TeleportGui.Content.Y.Text), tonumber(TeleportGui.Content.Z.Text)))
  245. end)
  246. coroutine.wrap(function()
  247. wait()
  248. while TextButton.Parent ~= nil do
  249. if TeleportReady == false then
  250. TextButton.AutoButtonColor = false
  251. TextButton.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
  252. else
  253. TextButton.AutoButtonColor = true
  254. TextButton.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3)
  255. end
  256. wait(0.1)
  257. end
  258. end)()
  259. local TextButton = TextButton:Clone()
  260. TextButton.Name = "Set Inputs to Current Coordinates"
  261. TextButton.Position = UDim2.new(0, 15, 0, 220)
  262. TextButton.Text = "Set Inputs to Current Coordinates"
  263. TextButton.Parent = TeleportGui.Content
  264. TextButton.MouseButton1Up:connect(function()
  265. TeleportGui.Content.X.Text = string.sub(TeleportPlayer.Character.Torso.Position.x, 0, 12)
  266. TeleportGui.Content.Y.Text = string.sub(TeleportPlayer.Character.Torso.Position.y, 0, 12)
  267. TeleportGui.Content.Z.Text = string.sub(TeleportPlayer.Character.Torso.Position.z, 0, 12)
  268. end)
  269. local TextButton = TextButton:Clone()
  270. TextButton.Name = "Waypoints"
  271. TextButton.Position = UDim2.new(0, 15, 0, 235)
  272. TextButton.Text = "Open Waypoints Dialogue..."
  273. TextButton.Parent = TeleportGui.Content
  274. TextButton.MouseButton1Up:connect(function()
  275. pcall(function() TeleportGui.Content["Players List"]:Remove() end)
  276. pcall(function() TeleportGui.Content["Waypoints List"]:Remove() end)
  277. local Frame = Frame:Clone()
  278. Frame.Parent = TeleportGui.Content
  279. Frame.Name = "Waypoints List"
  280. Frame.Position = UDim2.new(1, 0, 0, 0)
  281. Frame.Size = UDim2.new(1, 0, 0, 75)
  282. for _, Part in pairs(Frame:GetChildren()) do
  283. Part:Remove()
  284. end
  285. for i = 1, #TeleportWaypoints, 2 do
  286. local TextButton = TextButton:Clone()
  287. TextButton.Parent = Frame
  288. TextButton.Name = TeleportWaypoints[i].. " Waypoint"
  289. TextButton.Text = TeleportWaypoints[i]
  290. TextButton.Size = UDim2.new(1, -45, 0, 15)
  291. TextButton.Position = UDim2.new(0, 15, 0, Frame.Size.Y.Offset - 60)
  292. TextButton.MouseButton1Up:connect(function()
  293. TeleportGui.Content.X.Text = TeleportWaypoints[i + 1].x
  294. TeleportGui.Content.Y.Text = TeleportWaypoints[i + 1].y
  295. TeleportGui.Content.Z.Text = TeleportWaypoints[i + 1].z
  296. end)
  297. local TextButton = TextButton:Clone()
  298. TextButton.Parent = Frame
  299. TextButton.Name = TeleportWaypoints[i].. " Remove"
  300. TextButton.Text = "X"
  301. TextButton.Size = UDim2.new(0, 15, 0, 15)
  302. TextButton.Position = UDim2.new(1, -30, 0, Frame.Size.Y.Offset - 60)
  303. Frame.Size = Frame.Size + UDim2.new(0, 0, 0, 15)
  304. TextButton.MouseButton1Up:connect(function()
  305. for x = 1, 2 do
  306. table.remove(TeleportWaypoints, i)
  307. end
  308. Frame:Remove()
  309. end)
  310. end
  311. local TextButton = TextButton:Clone()
  312. TextButton.Parent = Frame
  313. TextButton.Name = "Create Waypoint"
  314. TextButton.Text = "Create Waypoint"
  315. TextButton.Size = UDim2.new(1, -30, 0, 15)
  316. TextButton.Position = UDim2.new(0, 15, 0, Frame.Size.Y.Offset - 45)
  317. TextButton.MouseButton1Up:connect(function()
  318. local WaypointButton = Frame["Create Waypoint"]
  319. WaypointButton.Parent = nil
  320. local TextBox = TextBox:Clone()
  321. TextBox.Parent = Frame
  322. TextBox.Name = "Waypoint Name"
  323. TextBox.Size = UDim2.new(1, -60, 0, 15)
  324. TextBox.Position = WaypointButton.Position
  325. TextBox.Text = "Waypoint Name"
  326. local TextButton = TextButton:Clone()
  327. TextButton.Parent = Frame
  328. TextButton.Name = "Cancel"
  329. TextButton.Size = UDim2.new(0, 15, 0, 15)
  330. TextButton.Text = "X"
  331. TextButton.Position = UDim2.new(1, -45, 0, WaypointButton.Position.Y.Offset)
  332. TextButton.MouseButton1Up:connect(function()
  333. Frame["Waypoint Name"]:Remove()
  334. Frame["Cancel"]:Remove()
  335. Frame["Save"]:Remove()
  336. WaypointButton.Parent = Frame
  337. end)
  338. local TextButton = TextButton:Clone()
  339. TextButton.Parent = Frame
  340. TextButton.Name = "Save"
  341. TextButton.Size = UDim2.new(0, 15, 0, 15)
  342. TextButton.Text = ">"
  343. TextButton.Position = UDim2.new(1, -30, 0, WaypointButton.Position.Y.Offset)
  344. TextButton.MouseButton1Up:connect(function()
  345. table.insert(TeleportWaypoints, TextBox.Text)
  346. table.insert(TeleportWaypoints, Vector3.new(tonumber(string.sub(TeleportPlayer.Character.Torso.Position.x, 0, 12)), tonumber(string.sub(TeleportPlayer.Character.Torso.Position.y, 0, 12)), tonumber(string.sub(TeleportPlayer.Character.Torso.Position.z, 0, 12))))
  347. Frame:Remove()
  348. end)
  349. end)
  350. local TextButton = TextButton:Clone()
  351. TextButton.Parent = Frame
  352. TextButton.Name = "Close"
  353. TextButton.Text = "Close"
  354. TextButton.Position = UDim2.new(0, 15, 0, Frame.Size.Y.Offset - 30)
  355. TextButton.MouseButton1Up:connect(function() Frame:Remove() end)
  356. end)
  357. local TextButton = TextButton:Clone()
  358. TextButton.Name = "Players"
  359. TextButton.Position = UDim2.new(0, 15, 0, 250)
  360. TextButton.Text = "Open Players Dialogue..."
  361. TextButton.Parent = TeleportGui.Content
  362. TextButton.MouseButton1Up:connect(function()
  363. pcall(function() TeleportGui.Content["Players List"]:Remove() end)
  364. pcall(function() TeleportGui.Content["Waypoints List"]:Remove() end)
  365. local Frame = Frame:Clone()
  366. Frame.Parent = TeleportGui.Content
  367. Frame.Name = "Players List"
  368. Frame.Position = UDim2.new(1, 0, 0, 0)
  369. Frame.Size = UDim2.new(1, 0, 0, 60)
  370. for _, Part in pairs(Frame:GetChildren()) do
  371. Part:Remove()
  372. end
  373. for _, PlayerList in pairs(game:GetService("Players"):GetPlayers()) do
  374. local TextButton = TextButton:Clone()
  375. TextButton.Parent = Frame
  376. TextButton.Name = PlayerList.Name
  377. TextButton.Text = PlayerList.Name
  378. TextButton.Position = UDim2.new(0, 15, 0, Frame.Size.Y.Offset - 45)
  379. Frame.Size = Frame.Size + UDim2.new(0, 0, 0, 15)
  380. if (function()
  381. if PlayerList == TeleportPlayer then return false end
  382. if PlayerList.Character == nil then return false end
  383. if PlayerList.Character:FindFirstChild("Torso") == nil then return false end
  384. return true
  385. end)() == false then
  386. TextButton.AutoButtonColor = false
  387. TextButton.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
  388. else
  389. TextButton.MouseButton1Up:connect(function()
  390. pcall(function()
  391. TeleportGui.Content.X.Text = PlayerList.Character.Torso.Position.x
  392. TeleportGui.Content.Y.Text = PlayerList.Character.Torso.Position.y
  393. TeleportGui.Content.Z.Text = PlayerList.Character.Torso.Position.z
  394. end)
  395. end)
  396. end
  397. end
  398. local TextButton = TextButton:Clone()
  399. TextButton.Parent = Frame
  400. TextButton.Name = "Close"
  401. TextButton.Text = "Close"
  402. TextButton.Position = UDim2.new(0, 15, 0, Frame.Size.Y.Offset - 30)
  403. TextButton.MouseButton1Up:connect(function() Frame:Remove() end)
  404. end)
  405. local TextButton = TextButton:Clone()
  406. TextButton.Name = "Clear"
  407. TextButton.Position = UDim2.new(0, 15, 0, 265)
  408. TextButton.Text = "Clear Inputs"
  409. TextButton.Parent = TeleportGui.Content
  410. TextButton.MouseButton1Up:connect(function()
  411. TeleportGui.Content.X.Text = 0
  412. TeleportGui.Content.Y.Text = 0
  413. TeleportGui.Content.Z.Text = 0
  414. end)
  415. local TextButton = TextButton:Clone()
  416. TextButton.Name = "Teleport Others"
  417. TextButton.Position = UDim2.new(0, 15, 0, 280)
  418. TextButton.Text = (TeleportOthers == false and "Don't " or "").. "Teleport Other People"
  419. TextButton.Parent = TeleportGui.Content
  420. TextButton.MouseButton1Up:connect(function()
  421. if TeleportOthers == false then
  422. TeleportOthers = true
  423. TextButton.Text = "Teleport Other People"
  424. elseif TeleportOthers == true then
  425. TeleportOthers = false
  426. TextButton.Text = "Don't Teleport Other People"
  427. end
  428. end)
  429. coroutine.wrap(function()
  430. local TextCX = TeleportGui.Content.CX.Text
  431. local TextCY = TeleportGui.Content.CY.Text
  432. local TextCZ = TeleportGui.Content.CZ.Text
  433. while TeleportGui.Parent ~= nil do
  434. TeleportGui.Content.CX.Text = TextCX .. string.sub(TeleportPlayer.Character.Torso.Position.x, 0, 12)
  435. TeleportGui.Content.CY.Text = TextCY .. string.sub(TeleportPlayer.Character.Torso.Position.y, 0, 12)
  436. TeleportGui.Content.CZ.Text = TextCZ .. string.sub(TeleportPlayer.Character.Torso.Position.z, 0, 12)
  437. wait()
  438. end
  439. end)()
  440. end
  441.  
  442.  
  443. function onUnequipped()
  444. script.Parent.Handle.OpenSound:Stop()
  445. script.Parent.Handle.OpenSound:Play()
  446. script.Parent.Handle.TickSound:Stop()
  447. if TeleportPlayer:FindFirstChild("PlayerGui") ~= nil then
  448. if TeleportPlayer.PlayerGui:FindFirstChild("PersonalTeleportGui") ~= nil then
  449. TeleportPlayer.PlayerGui.PersonalTeleportGui:Remove()
  450. end
  451. end
  452. end
  453.  
  454.  
  455. script.Parent.Equipped:connect(function(Mouse) onEquipped(Mouse) end)
  456. script.Parent.Unequipped:connect(function(Mouse) onUnequipped(Mouse) end)
  457.  
  458. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement