Advertisement
shickdoesgames

Untitled

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