Advertisement
akakakakaka

Click TP + NoClip

Mar 13th, 2018
540
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.78 KB | None | 0 0
  1. print("Hold CTRL and click to tp.")
  2. print("Press 'F' to turn off/on")
  3. print("Press 'E' to fly.")
  4.  
  5.  
  6. local player = game.Players.LocalPlayer
  7. local torso = player.Character.Torso
  8. local mouse = player:GetMouse()
  9. local tpEnabled = false
  10.  
  11. mouse.Button1Down:connect(function()
  12. local mT = mouse.Target
  13. if mT.ClassName == "Part" and tpEnabled == true then
  14. torso.CFrame = CFrame.new(mouse.Hit.p)
  15. end
  16. end)
  17.  
  18. mouse.KeyDown:connect(function(key)
  19. if key == "f" then
  20. tpEnabled = not tpEnabled
  21. print("ClickTP")
  22. end
  23. end)
  24.  
  25. local ScreenGui = Instance.new("ScreenGui")
  26. local TextButton4 = Instance.new("TextButton")
  27. ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
  28.  
  29. TextButton4.Parent = ScreenGui
  30. TextButton4.BackgroundColor3 = Color3.new(1, 1, 1)
  31. TextButton4.Size = UDim2.new(0, 200, 0, 50)
  32. TextButton4.Font = Enum.Font.SourceSans
  33. TextButton4.FontSize = Enum.FontSize.Size14
  34. TextButton4.Text = "Noclip"
  35. TextButton4.TextScaled = true
  36. TextButton4.Position = UDim2.new(.0,5,.5,20)
  37.  
  38. TextButton4.MouseButton1Down:connect(function()
  39. game.Players.LocalPlayer.Character.Humanoid.MaxHealth = math.huge
  40. game.Players.LocalPlayer.Character.Humanoid.Health = math.huge
  41. while true do
  42. game:GetService("RunService").Stepped:wait()
  43. game.Players.LocalPlayer.Character.Head.CanCollide = false
  44. game.Players.LocalPlayer.Character.Torso.CanCollide = false
  45. end
  46. end)
  47.  
  48. repeat wait()
  49. until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Torso") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
  50. local mouse = game.Players.LocalPlayer:GetMouse()
  51. repeat wait() until mouse
  52. local plr = game.Players.LocalPlayer
  53. local torso = plr.Character.Torso
  54. local flying = true
  55. local deb = true
  56. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  57. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  58. local maxspeed = 50
  59. local speed = 0
  60.  
  61. function Fly()
  62. local bg = Instance.new("BodyGyro", torso)
  63. bg.P = 9e4
  64. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  65. bg.cframe = torso.CFrame
  66. local bv = Instance.new("BodyVelocity", torso)
  67. bv.velocity = Vector3.new(0,0.1,0)
  68. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  69. repeat wait()
  70. plr.Character.Humanoid.PlatformStand = true
  71. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  72. speed = speed+.5+(speed/maxspeed)
  73. if speed > maxspeed then
  74. speed = maxspeed
  75. end
  76. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  77. speed = speed-1
  78. if speed < 0 then
  79. speed = 0
  80. end
  81. end
  82. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  83. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  84. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  85. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  86. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  87. else
  88. bv.velocity = Vector3.new(0,0.1,0)
  89. end
  90. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  91. until not flying
  92. ctrl = {f = 0, b = 0, l = 0, r = 0}
  93. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  94. speed = 0
  95. bg:Destroy()
  96. bv:Destroy()
  97. plr.Character.Humanoid.PlatformStand = false
  98. end
  99. mouse.KeyDown:connect(function(key)
  100. if key:lower() == "e" then
  101. if flying then flying = false
  102. else
  103. flying = true
  104. Fly()
  105. end
  106. elseif key:lower() == "w" then
  107. ctrl.f = 1
  108. elseif key:lower() == "s" then
  109. ctrl.b = -1
  110. elseif key:lower() == "a" then
  111. ctrl.l = -1
  112. elseif key:lower() == "d" then
  113. ctrl.r = 1
  114. end
  115. end)
  116. mouse.KeyUp:connect(function(key)
  117. if key:lower() == "w" then
  118. ctrl.f = 0
  119. elseif key:lower() == "s" then
  120. ctrl.b = 0
  121. elseif key:lower() == "a" then
  122. ctrl.l = 0
  123. elseif key:lower() == "d" then
  124. ctrl.r = 0
  125. end
  126. end)
  127. Fly()
  128.  
  129. p = game.Players.LocalPlayer
  130. char = p.Character
  131. local txt = Instance.new("BillboardGui", char)
  132. txt.Adornee = char .Head
  133. txt.Name = "_status"
  134. txt.Size = UDim2.new(2, 0, 1.2, 0)
  135. txt.StudsOffset = Vector3.new(0,1.3,0)
  136. local text = Instance.new("TextLabel", txt)
  137. text.Size = UDim2.new(1,0,0.5,0)
  138. text.TextScaled = true
  139. text.TextTransparency = 0
  140. text.BackgroundTransparency = 1
  141. text.TextTransparency = 0
  142. text.TextStrokeTransparency = 0
  143. text.Font = "Fantasy"
  144. text.TextSize = 55
  145. text.TextStrokeColor3 = Color3.new(0,0,0)
  146. text.TextColor3 = Color3.new(255, 0, 0)
  147. text.Text = "Admin"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement