Advertisement
pa1nx9

BedWars FLY – OPEN SOURCE

Nov 12th, 2021
513
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. local Players = game.Players
  2. local LocalPlayer = Players.LocalPlayer
  3. local UIs = game:GetService("UserInputService")
  4. local Fly = false
  5.  
  6. UIs.InputBegan:Connect(function(Key, No)
  7. if Key.KeyCode == Enum.KeyCode.F and not No then
  8. Fly = not Fly
  9. if Fly then
  10. LocalPlayer.Character.Humanoid:LoadAnimation(Animation):Play()
  11. else
  12. LocalPlayer.Character.HumanoidRootPart.Anchored = false
  13. end
  14. end
  15. end)
  16.  
  17. spawn(function()
  18. while wait(0.05) do
  19. pcall(function()
  20. if Fly then
  21. if LocalPlayer.Character.Humanoid.MoveDirection.Magnitude > 0 then
  22. LocalPlayer.Character:TranslateBy(LocalPlayer.Character.Humanoid.MoveDirection)
  23. end
  24. end
  25. end)
  26. end
  27. end)
  28.  
  29. spawn(function()
  30. while wait(0.1) do
  31. pcall(function()
  32. if Fly then
  33. LocalPlayer.Character.HumanoidRootPart.Anchored = not LocalPlayer.Character.HumanoidRootPart.Anchored
  34. end
  35. end)
  36. end
  37. end)
  38.  
  39. while task.wait() do
  40. pcall(function()
  41. if Fly then
  42. LocalPlayer.Character.Humanoid:ChangeState(11)
  43. end
  44. end)
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement