Advertisement
S0kay3bota

lua flying script roblox

Mar 28th, 2024
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.37 KB | Gaming | 0 0
  1. -- Lua script for flying in Roblox games
  2.  
  3. -- Function to enable flying
  4. local function enableFlying()
  5.     game:GetService("Players").LocalPlayer.Character.Humanoid:ChangeState(8)
  6. end
  7.  
  8. -- Bind a key to enable flying
  9. game:GetService("UserInputService").InputBegan:Connect(function(input)
  10.     if input.KeyCode == Enum.KeyCode.Space then
  11.         enableFlying()
  12.     end
  13. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement