05-03-26

Instant 180 Degree Mouse Turn Script

This Lua script for Rebind hardware input allows you to execute an instant 180-degree turn with a button press. The script uses HID.Move to control the mouse and includes a slider to adjust the turn d

rebindlua scriptmouse turn180 turnhardware inputHID.Movescript

Question

Quick 180 turn on mouse button

Rebind AI

luau
-- rebind: name=Quick 180 Turn

local cfg = UI.Schema({
    trigger = UI.Keybind("Mouse4", { label = "180 Turn Button" }),
    distance = UI.Slider(500, { min = 100, max = 1000, label = "Distance", suffix = "px" }),
})

Bind(cfg.trigger, function()
    HID.Move(cfg.distance, 0)
    return false
end)

This script executes an instant 180° turn by moving the mouse horizontally when you press the trigger button (Mouse4 by default). The distance slider controls how far the mouse moves — higher values = sharper turn.

How it works:

  • Bind catches the button press and blocks it (return false)
  • HID.Move(distance, 0) sends horizontal mouse movement
  • The game interprets this as a yaw rotation to complete the 180°

Tips:

  • Adjust distance based on your in-game sensitivity and desired turn speed
  • For a slower, more controllable turn, use Async() with Sleep() to spread the movement over time:
luau
  Bind(cfg.trigger, Async(function()
      HID.Move(cfg.distance / 4, 0)
      Sleep(10)
      HID.Move(cfg.distance / 4, 0)
      Sleep(10)
      HID.Move(cfg.distance / 4, 0)
      Sleep(10)
      HID.Move(cfg.distance / 4, 0)
  end))