Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.24 KB | None | 0 0
  1. -- [ This is not my scripts, I just put them together, credit to THREESPY712 for the noclip script and a guest for the fly, lol ]
  2. -- [ IF NOCLIP DOES NOT WORK EXECUTE IT BY ITSELF ]
  3. -- Fly Script
  4. repeat wait()
  5. until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Torso") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
  6. local mouse = game.Players.LocalPlayer:GetMouse()
  7. repeat wait() until mouse
  8. local plr = game.Players.LocalPlayer
  9. local torso = plr.Character.Torso
  10. local flying = true
  11. local deb = true
  12. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  13. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  14. local maxspeed = 50
  15. local speed = 0
  16.  
  17. function Fly()
  18. local bg = Instance.new("BodyGyro", torso)
  19. bg.P = 9e4
  20. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  21. bg.cframe = torso.CFrame
  22. local bv = Instance.new("BodyVelocity", torso)
  23. bv.velocity = Vector3.new(0,0.1,0)
  24. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  25. repeat wait()
  26. plr.Character.Humanoid.PlatformStand = true
  27. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  28. speed = speed+.5+(speed/maxspeed)
  29. if speed > maxspeed then
  30. speed = maxspeed
  31. end
  32. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  33. speed = speed-1
  34. if speed < 0 then
  35. speed = 0
  36. end
  37. end
  38. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  39. 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
  40. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  41. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  42. 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
  43. else
  44. bv.velocity = Vector3.new(0,0.1,0)
  45. end
  46. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  47. until not flying
  48. ctrl = {f = 0, b = 0, l = 0, r = 0}
  49. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  50. speed = 0
  51. bg:Destroy()
  52. bv:Destroy()
  53. plr.Character.Humanoid.PlatformStand = false
  54. end
  55. mouse.KeyDown:connect(function(key)
  56. if key:lower() == "e" then
  57. if flying then flying = false
  58. else
  59. flying = true
  60. Fly()
  61. end
  62. elseif key:lower() == "w" then
  63. ctrl.f = 1
  64. elseif key:lower() == "s" then
  65. ctrl.b = -1
  66. elseif key:lower() == "a" then
  67. ctrl.l = -1
  68. elseif key:lower() == "d" then
  69. ctrl.r = 1
  70. end
  71. end)
  72. mouse.KeyUp:connect(function(key)
  73. if key:lower() == "w" then
  74. ctrl.f = 0
  75. elseif key:lower() == "s" then
  76. ctrl.b = 0
  77. elseif key:lower() == "a" then
  78. ctrl.l = 0
  79. elseif key:lower() == "d" then
  80. ctrl.r = 0
  81. end
  82. end)
  83. Fly()
  84.  
  85. -- Noclip Script
  86.  
  87. local noclip = true -- Gets if you want the noclip
  88. char = game.Players.LocalPlayer.Character -- Gets your player
  89. while true do -- Make sure someone is in game
  90. if noclip == true then
  91. for _,v in pairs(char:children()) do
  92. pcall(function()
  93. if v.className == "Part" then
  94. v.CanCollide = false
  95. end
  96. end)
  97. end
  98. end
  99. game:service("RunService").Stepped:wait()
  100. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement