Run it
Copy the script and paste it into your executor.
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
local flySpeed = 50
local keys = {
W = false,
A = false,
S = false,
D = ,
Space = ,
LeftShift =
}
UIS.InputBegan:((input, processed)
processed
keys[input.KeyCode.Name] ~=
keys[input.KeyCode.Name] =
)
UIS.InputEnded:((input)
keys[input.KeyCode.Name] ~=
keys[input.KeyCode.Name] =
)
(character)
root = character:()
humanoid = character:()
attachment = .()
attachment.Parent = root
velocity = .()
velocity.Attachment0 = attachment
velocity.MaxForce = .huge
velocity.RelativeTo = .ActuatorRelativeTo.World
velocity.VectorVelocity = .zero
velocity.Parent = root
RunService.Heartbeat:(()
character.Parent
direction = .zero
look = camera.CFrame.LookVector
right = camera.CFrame.RightVector
forward = .(look.X, , look.Z)
sideways = .(right.X, , right.Z)
forward.Magnitude >
forward = forward.Unit
sideways.Magnitude >
sideways = sideways.Unit
keys.W direction += forward
keys.S direction -= forward
keys.D direction += sideways
keys.A direction -= sideways
keys.Space direction += .yAxis
keys.LeftShift direction -= .yAxis
direction.Magnitude >
direction = direction.Unit
humanoid:(.HumanoidStateType.Freefall)
velocity.VectorVelocity = direction * flySpeed
)
player.CharacterAdded:(setupCharacter)
player.Character
(player.Character)
it can fly

Universal