Advertisement
YourMain12

Best Undected Fly Script

May 4th, 2023
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.91 KB | None | 0 0
  1. local player = game:GetService("Players").LocalPlayer
  2. local mouse = player:GetMouse()
  3.  
  4. function Fly()
  5.     local dummy = Instance.new("Dummy", game.Workspace)
  6.     dummy.Name = "FlyingDummy"
  7.  
  8.     dummy.CFrame = player.Character.HumanoidRootPart.CFrame
  9.  
  10.     local attach = Instance.new("Attachment")
  11.     attach.Parent = player.Character.HumanoidRootPart
  12.     attach.Name = "FlyingAttachment"
  13.     attach.Position = Vector3.new(0, 0.5, 0)
  14.     attach.Orientation = Vector3.new(0, 0, 0)
  15.  
  16.     player.Character.HumanoidRootPart.CFrame = dummy.CFrame
  17.  
  18.     player.Character.Humanoid:ChangeState(11)
  19.  
  20.     repeat
  21.         wait()
  22.         dummy.CFrame = CFrame.new(dummy.Position, mouse.Hit.p)
  23.     until not player.Character or not player.Character:FindFirstChild("HumanoidRootPart")
  24.  
  25.     attach:Destroy()
  26.     dummy:Destroy()
  27. end
  28.  
  29. mouse.KeyDown:connect(function(key)
  30.     if key == "f" then
  31.         Fly()
  32.     end
  33. end)
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement