API Reference
All KrunkScript APIs are accessed through GAME, the main Krunker library. Most methods are organized under namespaces and accessed via GAME.<NAMESPACE>.method(). A few utility methods are available directly on GAME without a namespace.
Namespaces
GAME client server
Core game functions and logging. (3 methods)
Math client server
Mathematical functions and constants. Accessed via Math.method() in KrunkScript. (34 members)
UTILS client server
Utility functions for strings, colors, and distance calculations. (17 methods)
PLAYERS client server
Player management and querying. (5 methods)
SCENE client
3D scene object creation and management. (24 methods)
UI client
User interface elements (DIVs, images, etc.). (11 methods)
CAMERA client
Camera control and movement. (8 methods)
INPUTS client
Input handling (keyboard, mouse, controller). (9 methods)
NETWORK client server
Networking functions for client-server communication. (2 methods)
TIME client server
Time management and timing functions. (5 methods)
ADMIN server
Administrative functions (kick, ban). (2 methods)
ADS client
Advertisement system. (1 methods)
AI client server
AI entity spawning and management. (3 methods)
ANIM client
Animation control. (2 methods)
CHAT server
Chat system functions. (2 methods)
CONFIG client server
Game configuration and host info. (1 methods)
COOKIES client
Cookie handling for persistent data. (4 methods)
DEFAULT client server
Override default game behaviors. (4 methods)
LIVE_OBJECTS server
Dynamic live objects in the game world. (2 methods)
MODS client
Mod management functions. (2 methods)
OBJECTS client server
Map object querying. (3 methods)
OVERLAY client
2D overlay rendering. (34 methods)
PAYMENTS server
In-game payment handling. (1 methods)
PLATFORM client server
Platform detection (client, browser, mobile). (3 methods)
RAYCAST client server
Raycasting for collision detection. (2 methods)
SETTINGS client server
Game settings access. (3 methods)
SOUND client
Audio playback and control. (3 methods)
STORAGE server
Local storage for persistent data. (4 methods)
TRIGGERS client server
Trigger area management. (3 methods)