Advertisement
thdestroyer1243

Roblox Fly Noclip Ver.

Mar 12th, 2020
5,416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.57 KB | None | 0 0
  1. local players = game:GetService("Players")
  2. local localplayer = players.LocalPlayer
  3. local torso = localplayer.Character.HumanoidRootPart
  4. local hum = localplayer.Character:FindFirstChildOfClass("Humanoid")
  5. local mouse = localplayer:GetMouse()
  6. local enabled = true
  7. local running = true
  8. local dir = {w = 0, s = 0, a = 0, d = 0}
  9. local spd = 2
  10.    
  11. local moos = mouse.KeyDown:connect(function(key)
  12.     if key:lower() == "w" then
  13.         dir.w = 1
  14.     elseif key:lower() == "s" then
  15.         dir.s = 1
  16.     elseif key:lower() == "a" then
  17.         dir.a = 1
  18.     elseif key:lower() == "d" then
  19.         dir.d = 1
  20.     elseif key:lower() == "t" then
  21.         spd = spd + 1
  22.     elseif key:lower() == "y" then
  23.         spd = spd - 1
  24.     elseif key:lower() == "z" then
  25.         running = false
  26.     end
  27. end)
  28.  
  29. local moos1 = mouse.KeyUp:connect(function(key)
  30.     if key:lower() == "w" then
  31.         dir.w = 0
  32.     elseif key:lower() == "s" then
  33.         dir.s = 0
  34.     elseif key:lower() == "a" then
  35.         dir.a = 0
  36.     elseif key:lower() == "d" then
  37.         dir.d = 0
  38.     end
  39. end)
  40.                    
  41. torso.Anchored = true
  42. hum.PlatformStand = true
  43. local macka = hum.Changed:connect(function()
  44.     hum.PlatformStand = true
  45. end)
  46.  
  47. repeat
  48.     if enabled == false then
  49.         running = false
  50.         break
  51.     end
  52.     wait(1/60)
  53.     torso.CFrame = CFrame.new(torso.Position, workspace.CurrentCamera.CoordinateFrame.p) * CFrame.Angles(0,math.rad(180),0) * CFrame.new((dir.d-dir.a)*spd,0,(dir.s-dir.w)*spd)
  54. until not running or hum.Parent == nil or torso.Parent == nil or not enabled
  55.  
  56. moos:disconnect()
  57. moos1:disconnect()
  58. macka:disconnect()
  59. torso.Anchored = false
  60. hum.PlatformStand = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement