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)
aim.is_key_held(key)Checks if a key or mouse button is currently held down.
Parameters:
key[int] - Useaim.keysconstants or virtual key codesReturns:
bool
if aim.is_key_held(aim.keys.RIGHT_MOUSE) then
print("Right mouse held")
endPlayer Discovery
aim.get_players(exclude_local, exclude_team)
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)
aim.get_player_info(player_addr)Gets detailed information about a player.
Parameters:
player_addr[uint64]Returns:
tablewith fields:exists[bool] - Player existsis_local[bool] - Is local playeris_team[bool] - Is on same teamname[string] - Player namehealth[float] - Current healthmax_health[float] - Maximum healthhas_character[bool] - Has spawned character
Target Acquisition
aim.get_closest_target(fov_radius, team_check, health_check)
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:
tablewith fields:address[uint64] - Player address (0 if none found)distance[float] - Pixel distance from screen centerscreen_x[float] - Screen X positionscreen_y[float] - Screen Y positionname[string] - Player namehealth[float] - Current healthmax_health[float] - Maximum health
aim.get_screen_position(player_addr, body_part)
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:
tablewith fields:visible[bool] - On screenx[float] - Screen Xy[float] - Screen Yz[float] - Depth
Aiming Methods
aim.aim_at_player(player_addr, smoothing, body_part)
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)
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
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
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
Navigation Keys
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
F1 - F12
Function keys 1-12
Letter Keys
A - Z
Letter keys A-Z
Number Keys
0 - 9
Number keys 0-9
NUMPAD0 - NUMPAD9
Numpad 0-9
Numpad Operators
MULTIPLY
Numpad *
ADD
Numpad +
SUBTRACT
Numpad -
DECIMAL
Numpad .
DIVIDE
Numpad /
Special Keys
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