Advertisement
Ubicast

Swim Fly Script | ROBLOX

Nov 21st, 2020
9,282
2
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 2 0
  1. local Flying = false
  2. local Key = "f"
  3. local FlySpeed = 100
  4. local Player = game.Players.LocalPlayer
  5. local Mouse = Player:GetMouse()
  6.  
  7. game:GetService("RunService").Stepped:Connect(function()
  8.     if Flying == true then
  9.         Player.Character.Humanoid:ChangeState(4)
  10.         Player.Character.Humanoid.WalkSpeed = FlySpeed
  11.     end
  12. end)
  13.  
  14. Mouse.KeyDown:Connect(function(Input)
  15.     if Input == string.lower(Key) then
  16.         Flying = not Flying
  17.         Player.Character.Humanoid:ChangeState(4)
  18.         Player.Character.Humanoid.WalkSpeed = game.StarterPlayer.CharacterWalkSpeed
  19.     end
  20. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement