Aimbot Library Lua Environment

Aim Library Documentation

The aim library provides functions for targeting players, camera locking, and input detection for aimbot functionality.


Input

aim.is_key_held(key)

Checks if a key or mouse button is currently held down.

  • Parameters: key [int] - Use aim.keys constants or virtual key codes

  • Returns: bool

if aim.is_key_held(aim.keys.RIGHT_MOUSE) then
    print("Right mouse held")
end

Player Discovery

aim.get_players(exclude_local, exclude_team)

Gets a list of all player addresses.

  • Parameters:

    • exclude_local [optional bool] - Skip local player (default: true)

    • exclude_team [optional bool] - Skip teammates (default: false)

  • Returns: table (array of uint64 addresses)

aim.get_player_info(player_addr)

Gets detailed information about a player.

  • Parameters: player_addr [uint64]

  • Returns: table with fields:

    • exists [bool] - Player exists

    • is_local [bool] - Is local player

    • is_team [bool] - Is on same team

    • name [string] - Player name

    • health [float] - Current health

    • max_health [float] - Maximum health

    • has_character [bool] - Has spawned character


Target Acquisition

aim.get_closest_target(fov_radius, team_check, health_check)

Finds the closest valid target to screen center.

  • Parameters:

    • fov_radius [optional float] - Maximum pixel distance from center (default: 9999)

    • team_check [optional bool] - Skip teammates (default: false)

    • health_check [optional bool] - Skip dead players (default: true)

  • Returns: table with fields:

    • address [uint64] - Player address (0 if none found)

    • distance [float] - Pixel distance from screen center

    • screen_x [float] - Screen X position

    • screen_y [float] - Screen Y position

    • name [string] - Player name

    • health [float] - Current health

    • max_health [float] - Maximum health

aim.get_screen_position(player_addr, body_part)

Gets the screen position of a player's body part.

  • Parameters:

    • player_addr [uint64]

    • body_part [optional string] - "head" or "torso" (default: "head")

  • Returns: table with fields:

    • visible [bool] - On screen

    • x [float] - Screen X

    • y [float] - Screen Y

    • z [float] - Depth


Aiming Methods

aim.aim_at_player(player_addr, smoothing, body_part)

Moves the mouse towards a player using mouse input (for games with mouse-based aiming).

  • Parameters:

    • player_addr [uint64]

    • smoothing [optional float] - Higher = slower/smoother (default: 1.0, min: 1.0)

    • body_part [optional string] - "head" or "torso" (default: "head")

  • Returns: void

aim.lock_camera(player_addr, body_part)

Directly locks the camera to look at a player (for games with camera-based aiming like Roblox shooters).

  • Parameters:

    • player_addr [uint64]

    • body_part [optional string] - "head" or "torso" (default: "head")

  • Returns: void


Key Constants

Access via aim.keys:

Mouse Buttons

Constant
Description

LEFT_MOUSE

Left mouse button

RIGHT_MOUSE

Right mouse button

MIDDLE_MOUSE

Middle mouse button

MOUSE4

Mouse button 4 (side)

MOUSE5

Mouse button 5 (side)

Modifier Keys

Constant
Description

SHIFT

Shift key

CTRL

Control key

ALT

Alt key

SPACE

Spacebar

TAB

Tab key

CAPS

Caps Lock

ENTER

Enter key

ESCAPE

Escape key

BACKSPACE

Backspace key

Constant
Description

INSERT

Insert

DELETE

Delete

HOME

Home

END

End

PAGEUP

Page Up

PAGEDOWN

Page Down

UP

Arrow Up

DOWN

Arrow Down

LEFT

Arrow Left

RIGHT

Arrow Right

Function Keys

Constant
Description

F1 - F12

Function keys 1-12

Letter Keys

Constant
Description

A - Z

Letter keys A-Z

Number Keys

Constant
Description

0 - 9

Number keys 0-9

NUMPAD0 - NUMPAD9

Numpad 0-9

Numpad Operators

Constant
Description

MULTIPLY

Numpad *

ADD

Numpad +

SUBTRACT

Numpad -

DECIMAL

Numpad .

DIVIDE

Numpad /

Special Keys

Constant
Description

TILDE

~ key

MINUS

- key

EQUALS

= key

LBRACKET

[ key

RBRACKET

] key

BACKSLASH

\ key

SEMICOLON

; key

QUOTE

' key

COMMA

, key

PERIOD

. key

SLASH

/ key


Complete Examples

Basic Camera Lock Aimbot

FOV-Limited Mouse Aimbot with Smoothing

Target Info Display

Toggle Aimbot with Visual Feedback

Last updated