Run it
Copy the script and paste it into your executor.
FlyKey = .KeyCode.V
SpeedKey = .KeyCode.LeftControl
SpeedKeyMultiplier =
FlightSpeed =
FlightAcceleration =
TurnSpeed =
UserInputService = :()
StarterGui = :()
RunService = :()
Players = :()
User = Players.LocalPlayer
Camera = .CurrentCamera
UserCharacter =
UserRootPart =
Connection =
.Changed:(()
Camera = .CurrentCamera
)
setCharacter = (c)
UserCharacter = c
UserRootPart = c:()
User.CharacterAdded:(setCharacter)
User.Character
(User.Character)
CurrentVelocity = .(,,)
Flight = (delta)
BaseVelocity = .(,,)
UserInputService:()
UserInputService:(.KeyCode.W)
BaseVelocity = BaseVelocity + (Camera.CFrame.LookVector * FlightSpeed)
UserInputService:(.KeyCode.A)
BaseVelocity = BaseVelocity - (Camera.CFrame.RightVector * FlightSpeed)
UserInputService:(.KeyCode.S)
BaseVelocity = BaseVelocity - (Camera.CFrame.LookVector * FlightSpeed)
UserInputService:(.KeyCode.D)
BaseVelocity = BaseVelocity + (Camera.CFrame.RightVector * FlightSpeed)
UserInputService:(.KeyCode.Space)
BaseVelocity = BaseVelocity + (Camera.CFrame.UpVector * FlightSpeed)
UserInputService:(SpeedKey)
BaseVelocity = BaseVelocity * SpeedKeyMultiplier
UserRootPart
car = UserRootPart:()
car.Anchored
(car)
CurrentVelocity = CurrentVelocity:(
BaseVelocity,
.(delta * FlightAcceleration, , )
)
car.Velocity = CurrentVelocity + .(,,)
car ~= UserRootPart
car.RotVelocity = .(,,)
car.CFrame = car.CFrame:(.(
car.Position,
car.Position + CurrentVelocity + Camera.CFrame.LookVector
), .(delta * TurnSpeed, , ))
UserInputService.InputBegan:((userInput,gameProcessed)
gameProcessed
userInput.KeyCode == FlyKey
Connection
StarterGui:(,{
Title = ,
Text =
})
Connection:()
Connection =
StarterGui:(,{
Title = ,
Text =
})
CurrentVelocity = UserRootPart.Velocity
Connection = RunService.Heartbeat:(Flight)
)
StarterGui:(,{
Title = ,
Text =
})- V to fly - Carts recommended