Advertisement
DiscordPastebins

Fly script!

Jul 19th, 2024
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | Gaming | 0 0
  1. ---Weird fly script lol
  2.  
  3.  
  4. game.Players.PlayerAdded:Connect(function(plr)
  5. plr.CharacterAdded:Connect(function(char)
  6. wait()
  7. if not char:FindFirstChild(script.Parent) then
  8. local s = script.Parent
  9. s.Disabled = false
  10. s.Parent = char
  11. end
  12. end)
  13. end)
  14.  
  15. local UserInputService = game:GetService("UserInputService")
  16. local fly = false
  17. local plr = game.Players.LocalPlayer
  18.  
  19. UserInputService.InputBegan:Connect(function(input)
  20. if not fly then
  21. fly = true
  22. if input.KeyCode == Enum.KeyCode.F then
  23. while fly do
  24. plr.Character.Humanoid.Sit = true
  25. plr.Character.Head.Velocity = workspace.CurrentCamera.CFrame.LookVector*60 + Vector3.new(0,10,0)
  26. wait()
  27. end
  28. end
  29. end
  30. end)
  31.  
  32. UserInputService.InputEnded:Connect(function(input)
  33. if input.KeyCode == Enum.KeyCode.F then
  34. fly = false
  35. plr.Character.Humanoid.Sit = false
  36. end
  37. end)
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement