Run it
Copy the script and paste it into your executor.
Players = :()
RunService = :()
UserInputService = :()
GuiService = :()
player = Players.LocalPlayer
camera = .CurrentCamera
STICK_SENSITIVITY =
ROLL_MULTIPLIER =
EXPO =
THROTTLE_MAX_POWER =
DRAG =
GRAVITY_FORCE =
CAMERA_TILT =
DEADZONE =
BOUNCE_ELASTICITY =
SLIDE_BOOST =
SLIDE_FRICTION =
active =
unarmed =
velocity = .()
currentPos = camera.CFrame.Position
droneRotation = .()
screenGui = .(, player:())
screenGui.Name =
screenGui.ResetOnSpawn =
toggleBtn = .(, screenGui)
toggleBtn.Size = .(, , , )
toggleBtn.Position = .(, -, , )
toggleBtn.Text =
toggleBtn.BackgroundColor3 = .(, , )
toggleBtn.TextColor3 = .(, , )
toggleBtn.Font = .Font.SourceSansBold
toggleBtn.TextSize =
.(, toggleBtn)
sliderFrame = .(, screenGui)
sliderFrame.Size = .(, , , )
sliderFrame.Position = .(, -, , )
sliderFrame.BackgroundColor3 = .(, , )
.(, sliderFrame)
sliderBar = .(, sliderFrame)
sliderBar.Size = .(THROTTLE_MAX_POWER/, , , )
sliderBar.BackgroundColor3 = .(, , )
.(, sliderBar)
sliderLabel = .(, sliderFrame)
sliderLabel.Size = .(, , , )
sliderLabel.BackgroundTransparency =
sliderLabel.Text = .. .(THROTTLE_MAX_POWER)
sliderLabel.TextColor3 = .(, , )
sliderLabel.Font = .Font.SourceSansBold
sliderLabel.TextSize =
sliderLabel.ZIndex =
tiltFrame = .(, screenGui)
tiltFrame.Size = .(, , , )
tiltFrame.Position = .(, -, , )
tiltFrame.BackgroundColor3 = .(, , )
.(, tiltFrame)
tiltBar = .(, tiltFrame)
tiltBar.Size = .(CAMERA_TILT/, , , )
tiltBar.BackgroundColor3 = .(, , )
.(, tiltBar)
tiltLabel = .(, tiltFrame)
tiltLabel.Size = .(, , , )
tiltLabel.BackgroundTransparency =
tiltLabel.Text = .. .(CAMERA_TILT) ..
tiltLabel.TextColor3 = .(, , )
tiltLabel.Font = .Font.SourceSansBold
tiltLabel.TextSize =
tiltLabel.ZIndex =
unarmedLabel = .(, screenGui)
unarmedLabel.Size = .(, , , )
unarmedLabel.Position = .(, -, , )
unarmedLabel.Text =
unarmedLabel.BackgroundColor3 = .(, , )
unarmedLabel.TextColor3 = .(, , )
unarmedLabel.Font = .Font.SourceSansBold
unarmedLabel.TextSize =
.(, unarmedLabel)
isDraggingSpeed =
isDraggingTilt =
()
mouseLocation = UserInputService:()
inset = GuiService:()
adjustedMouseX = mouseLocation.X - inset.X
isDraggingSpeed
relativeX = adjustedMouseX - sliderFrame.AbsolutePosition.X
percentage = .(relativeX / sliderFrame.AbsoluteSize.X, , )
sliderBar.Size = .(percentage, , , )
THROTTLE_MAX_POWER = percentage *
sliderLabel.Text = .. .(THROTTLE_MAX_POWER)
isDraggingTilt
relativeX = adjustedMouseX - tiltFrame.AbsolutePosition.X
percentage = .(relativeX / tiltFrame.AbsoluteSize.X, , )
tiltBar.Size = .(percentage, , , )
CAMERA_TILT = percentage *
tiltLabel.Text = .. .(CAMERA_TILT) ..
sliderFrame.InputBegan:((i)
i.UserInputType == .UserInputType.MouseButton1 i.UserInputType == .UserInputType.Touch
isDraggingSpeed = ()
)
tiltFrame.InputBegan:((i)
i.UserInputType == .UserInputType.MouseButton1 i.UserInputType == .UserInputType.Touch
isDraggingTilt = ()
)
UserInputService.InputEnded:((i)
i.UserInputType == .UserInputType.MouseButton1 i.UserInputType == .UserInputType.Touch
isDraggingSpeed =
isDraggingTilt =
)
()
active = active
char = player.Character
hrp = char char:()
active
hrp
hrp.Anchored =
currentPos = hrp.Position + .(, , )
currentPos = camera.CFrame.Position
velocity = .()
droneRotation = camera.CFrame * .(.(-CAMERA_TILT), , )
droneRotation = droneRotation - droneRotation.Position
camera.CameraType = .CameraType.Scriptable
UserInputService.MouseBehavior = .MouseBehavior.LockCenter
toggleBtn.Text =
toggleBtn.BackgroundColor3 = .(, , )
hrp hrp.Anchored =
camera.CameraType = .CameraType.Custom
toggleBtn.Text =
toggleBtn.BackgroundColor3 = .(, , )
UserInputService.MouseBehavior = .MouseBehavior.Default
()
unarmed = unarmed
unarmed
unarmedLabel.Text =
unarmedLabel.BackgroundColor3 = .(, , )
unarmedLabel.Text =
unarmedLabel.BackgroundColor3 = .(, , )
raycastParams = RaycastParams.()
raycastParams.FilterType = .RaycastFilterType.Exclude
(char) char raycastParams.FilterDescendantsInstances = {char}
(player.Character player.CharacterAdded:())
player.CharacterAdded:(updateFilter)
(value)
sign = value > -
sign * (.(value) ^ EXPO)
RunService.RenderStepped:((dt)
isDraggingSpeed isDraggingTilt ()
active
pitch, roll, yaw = , ,
throttleInput =
gpts = UserInputService:(.UserInputType.Gamepad1)
_, input (gpts)
pos = input.Position
input.KeyCode == .KeyCode.Thumbstick1
.(pos.X) > DEADZONE yaw = (-pos.X)
.(pos.Y) > DEADZONE throttleInput = pos.Y
input.KeyCode == .KeyCode.Thumbstick2
.(pos.Y) > DEADZONE pitch = (-pos.Y)
.(pos.X) > DEADZONE roll = (pos.X)
thrust = .()
unarmed
thrust = droneRotation.UpVector * (throttleInput * THROTTLE_MAX_POWER)
velocity = (velocity + (thrust * dt) + (.(, -GRAVITY_FORCE, ) * dt)) * .(DRAG, dt * )
move = velocity * dt
move.Magnitude >
hit = :(currentPos, move + (move.Unit * ), raycastParams)
hit
reflect = velocity - * velocity:(hit.Normal) * hit.Normal
velocity = reflect * BOUNCE_ELASTICITY
currentPos = hit.Position + hit.Normal *
groundRay = :(currentPos, .(, -, ), raycastParams)
groundRay unarmed
normal = groundRay.Normal
normal.Y <
slideDir = (.(, -, ) - (normal * .(, -, ):(normal))).Unit
velocity = (velocity + (slideDir * (GRAVITY_FORCE + SLIDE_BOOST) * dt)) * SLIDE_FRICTION
rotDelta = .(.(pitch * STICK_SENSITIVITY * dt), .(yaw * STICK_SENSITIVITY * dt), .(-roll * (STICK_SENSITIVITY * ROLL_MULTIPLIER) * dt))
droneRotation = droneRotation * rotDelta
currentPos = currentPos + velocity * dt
camera.CFrame = .(currentPos) * droneRotation * .(.(CAMERA_TILT), , )
)
UserInputService.InputBegan:((input, processed)
processed
input.KeyCode == .KeyCode.ButtonY input.KeyCode == .KeyCode.Y ()
input.KeyCode == .KeyCode.ButtonB input.KeyCode == .KeyCode.B ()
)
toggleBtn.MouseButton1Click:(toggle)
Simple fpv drone script that works in all games(made with gemini)

Universal