# Table of Contents - [quick start | Astral](#quick-start-astral) - [simple watermark | Astral](#simple-watermark-astral) - [rendering | Astral](#rendering-astral) - [examples | Astral](#examples-astral) - [cmd_t | Astral](#cmd-t-astral) - [view_t | Astral](#view-t-astral) - [common knowledge | Astral](#common-knowledge-astral) - [esp | Astral](#esp-astral) - [events | Astral](#events-astral) - [namespaces | Astral](#namespaces-astral) - [📋 events | Astral](#-events-astral) - [cvars | Astral](#cvars-astral) - [_G | Astral](#-g-astral) - [camera | Astral](#camera-astral) - [bar_t | Astral](#bar-t-astral) - [response_t | Astral](#response-t-astral) - [classes | Astral](#classes-astral) - [qangle | Astral](#qangle-astral) - [globals | Astral](#globals-astral) - [bit64 | Astral](#bit64-astral) - [entities | Astral](#entities-astral) - [schema_t | Astral](#schema-t-astral) - [vector | Astral](#vector-astral) - [e_input_type | Astral](#e-input-type-astral) - [vector2d | Astral](#vector2d-astral) - [e_collision_group | Astral](#e-collision-group-astral) - [e_flow | Astral](#e-flow-astral) - [color | Astral](#color-astral) - [trace_filter | Astral](#trace-filter-astral) - [esp | Astral](#esp-astral) - [e_alignment | Astral](#e-alignment-astral) - [entity_t | Astral](#entity-t-astral) - [enumerations | Astral](#enumerations-astral) - [e_contents | Astral](#e-contents-astral) - [e_hitgroup | Astral](#e-hitgroup-astral) - [events | Astral](#events-astral) - [particle_t | Astral](#particle-t-astral) - [legit | Astral](#legit-astral) - [e_hitbox | Astral](#e-hitbox-astral) - [os | Astral](#os-astral) - [e_player_filter | Astral](#e-player-filter-astral) - [trace_t | Astral](#trace-t-astral) - [engine_texture_t | Astral](#engine-texture-t-astral) - [e_shot_flags | Astral](#e-shot-flags-astral) - [http | Astral](#http-astral) - [theme | Astral](#theme-astral) - [e_mask | Astral](#e-mask-astral) - [bullet_t | Astral](#bullet-t-astral) - [e_rounding | Astral](#e-rounding-astral) - [text_t | Astral](#text-t-astral) - [element_t | Astral](#element-t-astral) - [panorama | Astral](#panorama-astral) - [particles | Astral](#particles-astral) - [weapon_t | Astral](#weapon-t-astral) - [input | Astral](#input-astral) - [rage | Astral](#rage-astral) - [net_chan | Astral](#net-chan-astral) - [player_t | Astral](#player-t-astral) - [hotkey_t | Astral](#hotkey-t-astral) - [text_box_t | Astral](#text-box-t-astral) - [trace | Astral](#trace-astral) - [bind_t | Astral](#bind-t-astral) - [slider_t | Astral](#slider-t-astral) - [button_t | Astral](#button-t-astral) - [color_picker_t | Astral](#color-picker-t-astral) - [dropdown_t | Astral](#dropdown-t-astral) - [checkbox_t | Astral](#checkbox-t-astral) - [list_box_t | Astral](#list-box-t-astral) - [multi_dropdown_t | Astral](#multi-dropdown-t-astral) - [element_t | Astral](#element-t-astral) - [container_t | Astral](#container-t-astral) - [utils | Astral](#utils-astral) - [render | Astral](#render-astral) - [ui | Astral](#ui-astral) - [math | Astral](#math-astral) --- # quick start | Astral [hashtag](https://astral-lua.gitbook.io/astral#beginners-guide) 🔰beginners guide -------------------------------------------------------------------------------------- if you are new to lua scripting, we would advise taking a look at * [lua in 5 minutesarrow-up-right](https://learnxinyminutes.com/lua/) [arrow-up-right](https://learnxinyminutes.com/lua/) * [video covering most of the _standard_ lua featuresarrow-up-right](https://www.youtube.com/watch?v=CuWfgiwI73Q) [arrow-up-right](https://www.youtube.com/watch?v=CuWfgiwI73Q) [hashtag](https://astral-lua.gitbook.io/astral#documentation-errors) Documentation errors ---------------------------------------------------------------------------------------------- this documentation was made by [abcarrow-up-right](https://astral.rip/members/abc.12/) . please report any errors in the documentation through a private message on the forums or contact professionally (345336113696866306) on discord. [Nextcommon knowledgechevron-right](https://astral-lua.gitbook.io/astral/useful-information/common-knowledge) --- # simple watermark | Astral ![](https://astral-lua.gitbook.io/astral/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FHOa7qUCK8dyaT8v7kV0Z%2Fblobs%2FG0jazod53W3ryOIpHFeq%2Fimage.png&width=768&dpr=3&quality=100&sign=b16d53e5&sv=2) Copy local screen = render.get_screen_size() local screen_center = screen / 2 local margin_y = 10 local text_color = color(255, 255, 255, 200) local font = render.get_menu_font() callbacks.add("render", function() local username = utils.get_username() local latency = math.floor((net_chan.get_avg_latency() * 1000) + .5) local text = string.format('user %s | ping %ims', username, latency) local alignment = bit.bor(e_alignment.CENTER_X, e_alignment.UP) render.text(font, text, vector2d(screen_center.x, screen.y - margin_y), text_color, alignment) end) you can modify the variables `margin_y`, `text_color` and `font`. [Previousrenderingchevron-left](https://astral-lua.gitbook.io/astral/useful-information/examples/rendering) [Nexteventschevron-right](https://astral-lua.gitbook.io/astral/useful-information/examples/events) --- # rendering | Astral [simple watermarkchevron-right](https://astral-lua.gitbook.io/astral/useful-information/examples/rendering/simple-watermark) [Previousexampleschevron-left](https://astral-lua.gitbook.io/astral/useful-information/examples) [Nextsimple watermarkchevron-right](https://astral-lua.gitbook.io/astral/useful-information/examples/rendering/simple-watermark) --- # examples | Astral [renderingchevron-right](https://astral-lua.gitbook.io/astral/useful-information/examples/rendering) [eventschevron-right](https://astral-lua.gitbook.io/astral/useful-information/examples/events) [espchevron-right](https://astral-lua.gitbook.io/astral/useful-information/examples/esp) [Previouscommon knowledgechevron-left](https://astral-lua.gitbook.io/astral/useful-information/common-knowledge) [Nextrenderingchevron-right](https://astral-lua.gitbook.io/astral/useful-information/examples/rendering) sun-brightdesktopmoon sun-brightdesktopmoon --- # cmd_t | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/events/cmd_t#variables) variables: ---------------------------------------------------------------------------------------------------- name type description forward\_move number forward / backward speed. left\_move number left / right speed. view\_angles [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) player view angles. shot\_angles [qangle](https://astral-lua.gitbook.io/astral/documentation/classes/qangle) player shoot angles. move\_yaw number player move yaw. in\_attack boolean ... in\_jump boolean ... in\_back boolean ... in\_use boolean ... in\_moveleft boolean ... in\_moveright boolean ... in\_attack2 boolean ... in\_reload boolean ... in\_sprint boolean ... in\_forward boolean ... in\_duck boolean ... [Previous📋 eventschevron-left](https://astral-lua.gitbook.io/astral/documentation/events) [Nextview\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/events/view_t) Last updated 16 days ago sun-brightdesktopmoon sun-brightdesktopmoon --- # view_t | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/events/view_t#variables) variables: ----------------------------------------------------------------------------------------------------- name type description origin [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) view origin. angles [qangle](https://astral-lua.gitbook.io/astral/documentation/classes/qangle) view angles. fov number field of view. [Previouscmd\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/events/cmd_t) [Nextnamespaceschevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces) Last updated 16 days ago sun-brightdesktopmoon sun-brightdesktopmoon --- # common knowledge | Astral [hashtag](https://astral-lua.gitbook.io/astral/useful-information/common-knowledge#script-location) 🌐 script location --------------------------------------------------------------------------------------------------------------------------- scripts are located inside the `Counter-Strike Global Offensive\astral\lua` directory. [hashtag](https://astral-lua.gitbook.io/astral/useful-information/common-knowledge#script-environments) 🍃 script environments ----------------------------------------------------------------------------------------------------------------------------------- each script runs in its own environment. this means that global variables/functions can't be used between scripts. [hashtag](https://astral-lua.gitbook.io/astral/useful-information/common-knowledge#documentation) 📋 documentation ----------------------------------------------------------------------------------------------------------------------- * function arguments that are encapsulated in a `[]` are optional. * the `:` `type` at the end of functions/variables specify the return value's type. * functions that start with a `:` represents a object method. [Previousquick startchevron-left](https://astral-lua.gitbook.io/astral) [Nextexampleschevron-right](https://astral-lua.gitbook.io/astral/useful-information/examples) * [🌐 script location](https://astral-lua.gitbook.io/astral/useful-information/common-knowledge#script-location) * [🍃 script environments](https://astral-lua.gitbook.io/astral/useful-information/common-knowledge#script-environments) * [📋 documentation](https://astral-lua.gitbook.io/astral/useful-information/common-knowledge#documentation) sun-brightdesktopmoon sun-brightdesktopmoon --- # esp | Astral Copy local text_element = esp.add_text("My text", "Lua!") local bar_element = esp.add_bar("My bar", "70%") local script_elements = ui.find_container("Scripting, Script elements") local enable = script_elements:add_checkbox("Enable lua esp") local function update_esp_states(enabled) text_element:set_enabled(enabled) bar_element:set_enabled(enabled) end -- enable/disable esp when toggling the enable checkbox enable:add_callback(function(control) local enabled = control:get() update_esp_states(enabled) end) -- enable/disable esp depending on the checkbox state on initialization update_esp_states(control:get()) callbacks.add("esp", function(esp) if text_element:is_enabled() then local my_text = esp["My text"] my_text:set("Lua!") end if bar_element:is_enabled() then local my_bar = esp["My bar"] my_bar:set(0.7, "70%") end end) [Previouseventschevron-left](https://astral-lua.gitbook.io/astral/useful-information/examples/events) [Next📋 eventschevron-right](https://astral-lua.gitbook.io/astral/documentation/events) sun-brightdesktopmoon sun-brightdesktopmoon --- # events | Astral Copy events.add("player_hurt", function(event) if event.attacker == entities.get_local_player() then print(string.format("hit %s in the %s for %i (%i health remaining)", event.userid:get_name(), utils.get_hitgroup_name(event.hitgroup), event.dmg_health, event.health)) end end) [Previoussimple watermarkchevron-left](https://astral-lua.gitbook.io/astral/useful-information/examples/rendering/simple-watermark) [Nextespchevron-right](https://astral-lua.gitbook.io/astral/useful-information/examples/esp) sun-brightdesktopmoon sun-brightdesktopmoon --- # namespaces | Astral [\_Gchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/_g) [🎥camerachevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/camera) [📖cvarschevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/cvars) [🐖entitieschevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities) [👁️espchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp) [🔔eventschevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/events) [🌎globalschevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals) [📨httpchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/http) [🖱️inputchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/input) [👩‍🦼legitchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/legit) [🔢mathchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/math) [🏓net\_chanchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan) [🌐oschevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/os) [🌧️particleschevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles) [🎯ragechevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage) [🖌️renderchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/render) [🎨themechevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/theme) [📏tracechevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace) [🖥️uichevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui) [🛠️utilschevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils) [📷panoramachevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/panorama) [Previousview\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/events/view_t) [Next\_Gchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/_g) sun-brightdesktopmoon sun-brightdesktopmoon --- # 📋 events | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/events#listening-to-an-event) listening to an event --------------------------------------------------------------------------------------------------------------------- Copy local function on_move(cmd) print("We are now in a move command!") --remove it so it only runs once callbacks.remove(on_move) end callbacks.add("move", on_move) [hashtag](https://astral-lua.gitbook.io/astral/documentation/events#list-of-cheat-events) list of cheat events: -------------------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/events#move) move fired every time the game prepares a move command. use this to modify something before the aimbot or movement features. name type description cmd [cmd\_t](https://astral-lua.gitbook.io/astral/documentation/events/cmd_t) the current user command. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/events#level_init) level\_init fired after fully connecting to the server (first non-delta packet recieved). (`SIGNONSTATE:FULL`) ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/events#level_shutdown) level\_shutdown fired after fully disconnecting from the server. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/events#shutdown) shutdown fired upon unloading the current script. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/events#render) render fired every frame. most functions inside the [render](https://astral-lua.gitbook.io/astral/documentation/namespaces/render) namespace can only be used here. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/events#pre_data_update) pre\_data\_update fired before the game processes entity updates from the server. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/events#post_data_update) post\_data\_update fired after the game processes entity updates from the server. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/events#view) view fired every time the game sets up view. name type description view [view\_t](https://astral-lua.gitbook.io/astral/documentation/events/view_t) current view setup. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/events#esp) esp fired on each player's esp setup. name type description esp ... ... [Previousespchevron-left](https://astral-lua.gitbook.io/astral/useful-information/examples/esp) [Nextcmd\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/events/cmd_t) Last updated 16 days ago * [listening to an event](https://astral-lua.gitbook.io/astral/documentation/events#listening-to-an-event) * [list of cheat events:](https://astral-lua.gitbook.io/astral/documentation/events#list-of-cheat-events) * [move](https://astral-lua.gitbook.io/astral/documentation/events#move) * [level\_init](https://astral-lua.gitbook.io/astral/documentation/events#level_init) * [level\_shutdown](https://astral-lua.gitbook.io/astral/documentation/events#level_shutdown) * [shutdown](https://astral-lua.gitbook.io/astral/documentation/events#shutdown) * [render](https://astral-lua.gitbook.io/astral/documentation/events#render) * [pre\_data\_update](https://astral-lua.gitbook.io/astral/documentation/events#pre_data_update) * [post\_data\_update](https://astral-lua.gitbook.io/astral/documentation/events#post_data_update) * [view](https://astral-lua.gitbook.io/astral/documentation/events#view) * [esp](https://astral-lua.gitbook.io/astral/documentation/events#esp) sun-brightdesktopmoon sun-brightdesktopmoon --- # cvars | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/cvars#getting-cvar-values) getting cvar values --------------------------------------------------------------------------------------------------------------------------- `cvars.cvar_name` `:` `any` `cvars["cvar_name"]` `:` `any` [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/cvars#setting-cvar-values) setting cvar values --------------------------------------------------------------------------------------------------------------------------- `cvars.cvar_name` `=` `any` `cvars["cvar_name"]` `=` `any` [Previouscamerachevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/camera) [Nextentitieschevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities) * [getting cvar values](https://astral-lua.gitbook.io/astral/documentation/namespaces/cvars#getting-cvar-values) * [setting cvar values](https://astral-lua.gitbook.io/astral/documentation/namespaces/cvars#setting-cvar-values) sun-brightdesktopmoon sun-brightdesktopmoon --- # _G | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/_g#functions) functions: ----------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/_g#print) print `print(text: string[, ...])` name type description text string text to print. ... any optional arguments to concatenate with `text`. prints the text to the console. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/_g#error) error `error(text: string[, ...])` name type description text string text to print. ... any optional arguments to concatenate with `text`. prints the error to the console and plays a sound. [Previousnamespaceschevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces) [Nextcamerachevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/camera) * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/_g#functions) * [print](https://astral-lua.gitbook.io/astral/documentation/namespaces/_g#print) * [error](https://astral-lua.gitbook.io/astral/documentation/namespaces/_g#error) sun-brightdesktopmoon sun-brightdesktopmoon --- # camera | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/camera#functions) functions: --------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/camera#get_pos) get\_pos `camera.get_pos()` `:` [`vector`](https://astral-lua.gitbook.io/astral/documentation/classes/vector) returns the camera position. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/camera#get_angles) get\_angles `camera.get_angles()` `:` [`qangle`](https://astral-lua.gitbook.io/astral/documentation/classes/qangle) returns the camera angles ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/camera#set_angles) set\_angles `camera.set_angles(angles: qangle)` name type description angless qangle sets the camera angles. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/camera#get_fov) get\_fov `camera.get_fov()` `:` `number` returns the camera's field of view. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/camera#is_in_first_person) is\_in\_first\_person `camera.is_in_first_person()` `:` `boolean` returns `true` if the game camera is in first person, otherwise returns `false`. [Previous\_Gchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/_g) [Nextcvarschevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/cvars) * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/camera#functions) * [get\_pos](https://astral-lua.gitbook.io/astral/documentation/namespaces/camera#get_pos) * [get\_angles](https://astral-lua.gitbook.io/astral/documentation/namespaces/camera#get_angles) * [set\_angles](https://astral-lua.gitbook.io/astral/documentation/namespaces/camera#set_angles) * [get\_fov](https://astral-lua.gitbook.io/astral/documentation/namespaces/camera#get_fov) * [is\_in\_first\_person](https://astral-lua.gitbook.io/astral/documentation/namespaces/camera#is_in_first_person) sun-brightdesktopmoon sun-brightdesktopmoon --- # bar_t | Astral circle-info this class is derived from [element\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/element_t) , this means that you can use anything from there aswell. [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/bar_t#methods) methods: -------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/bar_t#set) set `:set(scale: number[, text: string, allow_animation: boolean])` name type description scale number 0-1 fraction. text string optional. allow\_animation boolean optional. [Previoustext\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/text_t) [Nextelement\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/element_t) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/bar_t#methods) * [set](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/bar_t#set) sun-brightdesktopmoon sun-brightdesktopmoon --- # response_t | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/http/response_t#variables) variables: ------------------------------------------------------------------------------------------------------------------ name type description code number code given by the response. text string raw response text. elapsed number round trip time. size number size of the response. [Previoushttpchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/http) [Nextinputchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/input) sun-brightdesktopmoon sun-brightdesktopmoon --- # classes | Astral [🧮bit64chevron-right](https://astral-lua.gitbook.io/astral/documentation/classes/bit64) [🌈colorchevron-right](https://astral-lua.gitbook.io/astral/documentation/classes/color) [📐qanglechevron-right](https://astral-lua.gitbook.io/astral/documentation/classes/qangle) [📏trace\_filterchevron-right](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter) [📍vectorchevron-right](https://astral-lua.gitbook.io/astral/documentation/classes/vector) [📍vector2dchevron-right](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) [Previouspanoramachevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/panorama) [Nextbit64chevron-right](https://astral-lua.gitbook.io/astral/documentation/classes/bit64) sun-brightdesktopmoon sun-brightdesktopmoon --- # qangle | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/qangle#initializing-a-qangle) initializing a qangle ----------------------------------------------------------------------------------------------------------------------------- `qangle(x: number, y: number, z: number)` `:` `qangle` [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/qangle#variables) variables ----------------------------------------------------------------------------------------------------- name type description x number pitch component y number yaw component z number roll component [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/qangle#methods) methods: -------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/qangle#normalize) normalize `:normalize()` normalizes the angle. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/qangle#clamp) clamp `:clamp()` clamps the angle. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/qangle#to_direction) to\_direction `:to_direction()` `:` [`vector`](https://astral-lua.gitbook.io/astral/documentation/classes/vector) returns the forward vector of the angle ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/qangle#get_directions) get\_directions `:get_directions()` `:` [`vector, vector, vector`](https://astral-lua.gitbook.io/astral/documentation/classes/vector) returns the forward, right and up vectors of the angle. [Previouscolorchevron-left](https://astral-lua.gitbook.io/astral/documentation/classes/color) [Nexttrace\_filterchevron-right](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter) * [initializing a qangle](https://astral-lua.gitbook.io/astral/documentation/classes/qangle#initializing-a-qangle) * [variables](https://astral-lua.gitbook.io/astral/documentation/classes/qangle#variables) * [methods:](https://astral-lua.gitbook.io/astral/documentation/classes/qangle#methods) * [normalize](https://astral-lua.gitbook.io/astral/documentation/classes/qangle#normalize) * [clamp](https://astral-lua.gitbook.io/astral/documentation/classes/qangle#clamp) * [to\_direction](https://astral-lua.gitbook.io/astral/documentation/classes/qangle#to_direction) * [get\_directions](https://astral-lua.gitbook.io/astral/documentation/classes/qangle#get_directions) sun-brightdesktopmoon sun-brightdesktopmoon --- # globals | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#functions) functions: ---------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_real_time) get\_real\_time `globals.get_real_time()` `:` `number` returns the local time in seconds. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_frame_count) get\_frame\_count `globals.get_frame_count()` `:` `number` returns the absolute frame counter. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_abs_frame_time) get\_abs\_frame\_time `globals.get_abs_frame_time()` `:` `number` returns the non-paused frame time. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_frame_start_time_stamp_dev) get\_frame\_start\_time\_stamp\_dev `globals.get_frame_start_time_stamp_dev()` `:` `number` returns the non-paused frame time. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_frame_time) get\_frame\_time `globals.get_frame_time()` `:` `number` returns the time spent on the last client or server frame. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_cur_time) get\_cur\_time `globals.get_cur_time()` `:` `number` returns the server time in seconds. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_tick_count) get\_tick\_count `globals.get_tick_count()` `:` `number` returns the number of elapsed ticks on the server. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_tick_fraction) get\_tick\_fraction `globals.get_tick_fraction()` `:` `number` returns a 0-1 fraction. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_map_name) get\_map\_name `globals.get_map_name()` `:` `string` returns the map name. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_map_name_short) get\_map\_name\_short `globals.get_map_name_short()` `:` `string` returns the shortened map name [Previouseventschevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/events) [Nexthttpchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/http) * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#functions) * [get\_real\_time](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_real_time) * [get\_frame\_count](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_frame_count) * [get\_abs\_frame\_time](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_abs_frame_time) * [get\_frame\_start\_time\_stamp\_dev](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_frame_start_time_stamp_dev) * [get\_frame\_time](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_frame_time) * [get\_cur\_time](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_cur_time) * [get\_tick\_count](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_tick_count) * [get\_tick\_fraction](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_tick_fraction) * [get\_map\_name](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_map_name) * [get\_map\_name\_short](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals#get_map_name_short) sun-brightdesktopmoon sun-brightdesktopmoon --- # bit64 | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#initializing-a-bit64) initializing a bit64 -------------------------------------------------------------------------------------------------------------------------- `bit64()` `:` `bit64` `bit64(bits: number)` `:` `bit64` [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#methods) methods: ------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#bnot) bnot `:bnot()` `:` `bit64` ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#band) band `:band(bits: number)` `:` `bit64` name type description bits number ... ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#bor) bor `:bor(bits: number)` `:` `bit64` name type description bits number ... ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#bxor) bxor `:bxor(bits: number)` `:` `bit64` name type description bits number ... ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#lshift) lshift `:lshift(shift: number)` `:` `bit64` name type description shift number ... ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#rshift) rshift `:rshift(shift: number)` `:` `bit64` name type description shift number ... ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#arshift) arshift `:arshift(shift: number)` `:` `bit64` name type description shift number ... ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#rol) rol `:rol(shift: number)` `:` `bit64` name type description shift number ... ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#ror) ror `:ror(shift: number)` `:` `bit64` name type description shift number ... [Previousclasseschevron-left](https://astral-lua.gitbook.io/astral/documentation/classes) [Nextcolorchevron-right](https://astral-lua.gitbook.io/astral/documentation/classes/color) * [initializing a bit64](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#initializing-a-bit64) * [methods:](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#methods) * [bnot](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#bnot) * [band](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#band) * [bor](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#bor) * [bxor](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#bxor) * [lshift](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#lshift) * [rshift](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#rshift) * [arshift](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#arshift) * [rol](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#rol) * [ror](https://astral-lua.gitbook.io/astral/documentation/classes/bit64#ror) sun-brightdesktopmoon sun-brightdesktopmoon --- # entities | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities#functions) functions: ----------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities#get_local_player) get\_local\_player `entities.get_local_player()` `:` [`player_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t) returns the local player. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities#get_entity_from_index) get\_entity\_from\_index `entities.get_entity_from_index(index: number)` `:` [`entity_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t) name type description index number index of the entity. returns a pointer to the specified entity. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities#get_player_from_userid) get\_player\_from\_userid `entities.get_player_from_userid(userid: number)` `:` [`player_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t) ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities#get_entities) get\_entities `entities.get_entities([classname: string])` `:` [`table`](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t) name type description classname string optional. will only get entities of the corresponding classname. returns a table of every entity present. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities#get_players) get\_players `entities.get_players([filter: e_player_filter, check_observer: boolean])` `:` [`table`](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t) name type description filter [e\_player\_filter](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_player_filter) optional. player filtering options (defaults to `ALL`). check\_observer boolean optional. if set to `true` uses the player you are spectating. otherwise, uses the local player. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities#for_each) for\_each `entities.for_each(callback: function)` name type description callback function callback with a entity parameter passed. iterates through every entity present and invokes the `callback` argument. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities#for_each_player) for\_each\_player `entities.for_each_player(callback: function[, filter: e_player_filter, check_observer: boolean])` name type description callback function callback with a player parameter passed. returning `true` within this callback will stop the player iteration. filter [e\_player\_filter](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_player_filter) optional. player filtering options (defaults to `ALL`). check\_observer boolean optional. if set to `true` uses the player you are spectating. otherwise, uses the local player. iterates through every player present and invokes the `callback` argument. [Previouscvarschevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/cvars) [Nextschema\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/schema_t) * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities#functions) * [get\_local\_player](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities#get_local_player) * [get\_entity\_from\_index](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities#get_entity_from_index) * [get\_player\_from\_userid](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities#get_player_from_userid) * [get\_entities](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities#get_entities) * [get\_players](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities#get_players) * [for\_each](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities#for_each) * [for\_each\_player](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities#for_each_player) sun-brightdesktopmoon sun-brightdesktopmoon --- # schema_t | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/schema_t#accessing-schema-properties) accessing schema properties ------------------------------------------------------------------------------------------------------------------------------------------------------- `schema.prop_name` `:` `any` `schema.prop_name[index]` `:` `any` `schema["prop_name"]` `:` `any` [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/schema_t#methods) methods: ---------------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/schema_t#get_class_name) get\_class\_name `:get_class_name()` `:` `string` returns the schema class name ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/schema_t#is) is `:is(classname: string)` `:` `boolean` name type description classname string name of the class that will be checked. checks if the schema's class is the same as `classname`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/schema_t#inherits) inherits `:inherits(classname: string[, recursive: boolean])` `:` `boolean` name type description classname string name of the class that will be checked. recursive boolean optional. set to `true` to check all inherited base classes. checks if the schema's class inherits `classname`. [Previousentitieschevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities) [Nextentity\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t) * [accessing schema properties](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/schema_t#accessing-schema-properties) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/schema_t#methods) * [get\_class\_name](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/schema_t#get_class_name) * [is](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/schema_t#is) * [inherits](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/schema_t#inherits) sun-brightdesktopmoon sun-brightdesktopmoon --- # vector | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#initializing-a-vector) initializing a vector ----------------------------------------------------------------------------------------------------------------------------- `vector(x: number, y: number, z: number)` `:` `vector` [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#variables) variables ----------------------------------------------------------------------------------------------------- name type description x number X coordinate. y number Y coordinate. z number Z coordinate. [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#methods) methods: -------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#normalize) normalize `:normalize()` normalizes the vector. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#normalized) normalized `:normalized()` `:` `vector` returns a vector with the same direction as the specified vector, but with a length of one. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#length) length `:length()` `:` `number` returns the euclidean length of the vector. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#length_sqr) length\_sqr `:length_sqr()` `:` `number` returns the squared length of the vector. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#length2d) length2d `:length2d()` `:` `number` returns the length of the vector in two dimensions, discarding the `Z` axis. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#length2d_sqr) length2d\_sqr `:length2d_sqr()` `:` `number` returns the squared length of the vector in two dimensions, discarding the `Z` axis. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#dist) dist `:dist(other: vector)` `:` `number` name type description other vector the vector to get the distance to. returns the euclidean distance between the two vectors. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#dist_sqr) dist\_sqr `:dist_sqr(other: vector)` `:` `number` name type description other vector the vector to get the distance to. returns the squared distance between the two vectors. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#dist2d) dist2d `:dist2d(other: vector)` `:` `number` name type description other vector the vector to get the distance to. returns the 2d distance between the two vectors. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#dist2d_sqr) dist2d\_sqr `:dist2d_sqr(other: vector)` `:` `number` name type description other vector the vector to get the distance to. returns the squared 2d distance between the two vectors. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#dot) dot `:dot(other: vector)` `:` `number` name type description other vector the vector to calculate the dot product with. returns the dot product between the two vectors. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#cross) cross `:cross(other: vector)` `:` `vector` name type description other vector the vector to calculate the cross product with. returns the cross product between the two vectors. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#lerp) lerp `:lerp(other: vector, weight: number)` `:` `vector` name type description other vector the vector to interpolate to. weight number a value between 0 and 1 that indicates the weight of `other`. returns a linearly interpolated vector between the two vectors based on the given `weight`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#to_screen) to\_screen `:to_screen()` `:` [`vector2d`](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) converts the world coordinates to screen coordinates, returns `nil` if the world coordinate is not in view. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#to_angles) to\_angles `:to_angles()` `:` [`qangle`](https://astral-lua.gitbook.io/astral/documentation/classes/qangle) returns the angle representing the normal of the vector. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector#get_directions) get\_directions `:get_directions()` `:` `vector, vector` returns the right and up vector of a forward vector [Previoustrace\_filterchevron-left](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter) [Nextvector2dchevron-right](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) * [initializing a vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector#initializing-a-vector) * [variables](https://astral-lua.gitbook.io/astral/documentation/classes/vector#variables) * [methods:](https://astral-lua.gitbook.io/astral/documentation/classes/vector#methods) * [normalize](https://astral-lua.gitbook.io/astral/documentation/classes/vector#normalize) * [normalized](https://astral-lua.gitbook.io/astral/documentation/classes/vector#normalized) * [length](https://astral-lua.gitbook.io/astral/documentation/classes/vector#length) * [length\_sqr](https://astral-lua.gitbook.io/astral/documentation/classes/vector#length_sqr) * [length2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector#length2d) * [length2d\_sqr](https://astral-lua.gitbook.io/astral/documentation/classes/vector#length2d_sqr) * [dist](https://astral-lua.gitbook.io/astral/documentation/classes/vector#dist) * [dist\_sqr](https://astral-lua.gitbook.io/astral/documentation/classes/vector#dist_sqr) * [dist2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector#dist2d) * [dist2d\_sqr](https://astral-lua.gitbook.io/astral/documentation/classes/vector#dist2d_sqr) * [dot](https://astral-lua.gitbook.io/astral/documentation/classes/vector#dot) * [cross](https://astral-lua.gitbook.io/astral/documentation/classes/vector#cross) * [lerp](https://astral-lua.gitbook.io/astral/documentation/classes/vector#lerp) * [to\_screen](https://astral-lua.gitbook.io/astral/documentation/classes/vector#to_screen) * [to\_angles](https://astral-lua.gitbook.io/astral/documentation/classes/vector#to_angles) * [get\_directions](https://astral-lua.gitbook.io/astral/documentation/classes/vector#get_directions) sun-brightdesktopmoon sun-brightdesktopmoon --- # e_input_type | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_input_type#values) values ---------------------------------------------------------------------------------------------------------- Copy e_input_type.ALL e_input_type.NUMBERS e_input_type.PASSWORD [Previouse\_hitgroupchevron-left](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_hitgroup) [Nexte\_maskchevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_mask) sun-brightdesktopmoon sun-brightdesktopmoon --- # vector2d | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#initializing-a-vector2d) initializing a vector2d ----------------------------------------------------------------------------------------------------------------------------------- `vector2d(x: number, y: number)` `:` `vector2d` [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#variables) variables ------------------------------------------------------------------------------------------------------- name type description x number X coordinate. y number Y coordinate. [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#methods) methods: ---------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#normalize) normalize `:normalize()` normalizes the vector. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#normalized) normalized `:normalized()` `:` `vector2d` returns a vector with the same direction as the specified vector, but with a length of one. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#length) length `:length()` `:` `number` returns the euclidean length of the vector. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#length_sqr) length\_sqr `:length_sqr()` `:` `number` returns the squared length of the vector. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#dist) dist `:dist(other: vector2d)` `:` `number` name type description other vector2d the vector to get the distance to. returns the euclidean distance between the two vectors. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#dist_sqr) dist\_sqr `:dist_sqr(other: vector2d)` `:` `number` name type description other vector2d the vector to get the distance to. returns the squared distance between the two vectors. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#dot) dot `:dot(other: vector2d)` `:` `number` name type description other vector2d the vector to calculate the dot product with. returns the dot product between the two vectors. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#lerp) lerp `:lerp(other: vector2d, weight: number)` `:` `vector2d` name type description other vector2d the vector to interpolate to. weight number a value between 0 and 1 that indicates the weight of `other`. returns a linearly interpolated vector between the two vectors based on the given `weight`. [Previousvectorchevron-left](https://astral-lua.gitbook.io/astral/documentation/classes/vector) [Nextenumerationschevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations) * [initializing a vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#initializing-a-vector2d) * [variables](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#variables) * [methods:](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#methods) * [normalize](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#normalize) * [normalized](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#normalized) * [length](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#length) * [length\_sqr](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#length_sqr) * [dist](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#dist) * [dist\_sqr](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#dist_sqr) * [dot](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#dot) * [lerp](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d#lerp) sun-brightdesktopmoon sun-brightdesktopmoon --- # e_collision_group | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_collision_group#values) values: ---------------------------------------------------------------------------------------------------------------- Copy e_collision_group.DEFAULT e_collision_group.DEBRIS e_collision_group.INTERACTIVE_DEBRIS e_collision_group.INTERACTIVE e_collision_group.PLAYER e_collision_group.BREAKABLE_GLASS e_collision_group.VEHICLE e_collision_group.PLAYER_MOVEMENT e_collision_group.NPC e_collision_group.IN_VEHICLE e_collision_group.WEAPON e_collision_group.VEHICLE_CLIP e_collision_group.PROJECTILE e_collision_group.DOOR_BLOCKER e_collision_group.PASSABLE_DOOR e_collision_group.DISSOLVING e_collision_group.PUSHAWAY e_collision_group.NPC_ACTOR e_collision_group.NPC_SCRIPTED e_collision_group.PZ_CLIP e_collision_group.PROPS e_collision_group.LAST_SHARED [Previouse\_alignmentchevron-left](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_alignment) [Nexte\_contentschevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_contents) sun-brightdesktopmoon sun-brightdesktopmoon --- # e_flow | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_flow#values) values: ----------------------------------------------------------------------------------------------------- Copy e_flow.OUTGOING e_flow.INCOMING [Previouse\_contentschevron-left](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_contents) [Nexte\_hitboxchevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_hitbox) sun-brightdesktopmoon sun-brightdesktopmoon --- # color | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/color#initializing-a-color) initializing a color -------------------------------------------------------------------------------------------------------------------------- `color(r: number, g: number, b: number, a: number)` `:` `color` `color(hex: number)` `:` `color` `color(hex: string)` `:` `color` [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/color#variables) variables ---------------------------------------------------------------------------------------------------- name type description r number red channel. g number green channel. b number blue channel. a number alpha channel. [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/color#methods) methods: ------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/color#scaled_alpha) scaled\_alpha `:scaled_alpha(scale: number)` `:` `color` name type description scale number 0-1 fraction. returns the current color with a scaled alpha. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/color#override_alpha) override\_alpha `:override_alpha(alpha: number)` `:` `color` name type description alpha number new alpha channel. returns the current color with a new alpha. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/color#lerp) lerp `:lerp(other: color, weight: number)` `:` `color` name type description other color the vector to interpolate to. weight number a value between 0 and 1 that indicates the weight of `other`. returns a linearly interpolated color between the two colors based on the given `weight`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/color#to_hsb) to\_hsb `:to_hsb()` `:` `number, number, number` returns the hue, saturation and brightness of the current color ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/color#from_hsb) from\_hsb `:from_hsb(hue: number, saturation: number, brightness: number[, alpha: number])` name type description hue number hue of the color. saturation number saturation of the color. brightness number brightness of the color. alpha number optional. alpha of the color. overrides the current color with a new one based on the passed arguments ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/color#as_int) as\_int `:as_int()` `:` `number` returns the color as a 32-bit integer. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/color#to_hex) to\_hex `:to_hex()` `:` `string` returns the color as a HEX string. [Previousbit64chevron-left](https://astral-lua.gitbook.io/astral/documentation/classes/bit64) [Nextqanglechevron-right](https://astral-lua.gitbook.io/astral/documentation/classes/qangle) * [initializing a color](https://astral-lua.gitbook.io/astral/documentation/classes/color#initializing-a-color) * [variables](https://astral-lua.gitbook.io/astral/documentation/classes/color#variables) * [methods:](https://astral-lua.gitbook.io/astral/documentation/classes/color#methods) * [scaled\_alpha](https://astral-lua.gitbook.io/astral/documentation/classes/color#scaled_alpha) * [override\_alpha](https://astral-lua.gitbook.io/astral/documentation/classes/color#override_alpha) * [lerp](https://astral-lua.gitbook.io/astral/documentation/classes/color#lerp) * [to\_hsb](https://astral-lua.gitbook.io/astral/documentation/classes/color#to_hsb) * [from\_hsb](https://astral-lua.gitbook.io/astral/documentation/classes/color#from_hsb) * [as\_int](https://astral-lua.gitbook.io/astral/documentation/classes/color#as_int) * [to\_hex](https://astral-lua.gitbook.io/astral/documentation/classes/color#to_hex) sun-brightdesktopmoon sun-brightdesktopmoon --- # trace_filter | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter#initializing-a-trace-filter) initializing a trace filter ----------------------------------------------------------------------------------------------------------------------------------------------- `trace_filter()` `:` `trace_filter` `trace_filter(skip_entity: entity_t[, interacts_with: bit64, collision_group: e_collision_group, iterate_entities: boolean])` `:` `trace_filter` `trace_filter(skip_entity: entity_t, skip_entity2: entity_t[, interacts_with: bit64, collision_group: e_collision_group, iterate_entities: boolean])` `:` `trace_filter` [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter#variables) variables ----------------------------------------------------------------------------------------------------------- name type description interacts\_with [bit64](https://astral-lua.gitbook.io/astral/documentation/classes/bit64) ... interacts\_exclude [bit64](https://astral-lua.gitbook.io/astral/documentation/classes/bit64) ... interacts\_as [bit64](https://astral-lua.gitbook.io/astral/documentation/classes/bit64) ... entity\_ids\_to\_ignore number\[2\] ... owner\_ids\_to\_ignore number\[2\] ... hierarchy\_ids number\[2\] ... object\_set\_mask [e\_mask](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_mask) ... collision\_group [e\_collision\_group](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_collision_group) ... flags number ... iterate\_entities boolean ... [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter#methods) methods: -------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter#set_skip_entity) set\_skip\_entity `:set_skip_entity(entity: entity_t)` name type description entity [entity\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t) ... ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter#set_skip_entity2) set\_skip\_entity2 `:set_skip_entity2(entity: entity_t)` name type description entity [entity\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t) ... [Previousqanglechevron-left](https://astral-lua.gitbook.io/astral/documentation/classes/qangle) [Nextvectorchevron-right](https://astral-lua.gitbook.io/astral/documentation/classes/vector) * [initializing a trace filter](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter#initializing-a-trace-filter) * [variables](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter#variables) * [methods:](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter#methods) * [set\_skip\_entity](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter#set_skip_entity) * [set\_skip\_entity2](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter#set_skip_entity2) sun-brightdesktopmoon sun-brightdesktopmoon --- # esp | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp#functions) functions: ------------------------------------------------------------------------------------------------------ ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp#add_text) add\_text `esp.add_text(name: string, preview_value: string)` `:` [`text_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/text_t) name type description name string ... preview\_value string ... ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp#add_bar) add\_bar `esp.add_bar(name: string, preview_value: string)` `:` [`bar_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/bar_t) name type description name string ... preview\_value string ... [Previousweapon\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/weapon_t) [Nexttext\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/text_t) * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp#functions) * [add\_text](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp#add_text) * [add\_bar](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp#add_bar) sun-brightdesktopmoon sun-brightdesktopmoon --- # e_alignment | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_alignment#values) values: ---------------------------------------------------------------------------------------------------------- Copy e_alignment.CENTER_X e_alignment.CENTER_Y e_alignment.RIGHT e_alignment.UP [Previousenumerationschevron-left](https://astral-lua.gitbook.io/astral/documentation/enumerations) [Nexte\_collision\_groupchevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_collision_group) sun-brightdesktopmoon sun-brightdesktopmoon --- # entity_t | Astral circle-info this class is derived from [schema\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/schema_t) , this means that you can use anything from there aswell. [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t#methods) methods: ---------------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t#get_origin) get\_origin `:get_origin()` `:` [`vector`](https://astral-lua.gitbook.io/astral/documentation/classes/vector) returns a 3d vector representing the entities networked origin. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t#get_abs_origin) get\_abs\_origin `:get_abs_origin()` `:` [`vector`](https://astral-lua.gitbook.io/astral/documentation/classes/vector) returns a 3d vector representing the entities absolute origin. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t#get_health) get\_health `:get_health()` `:` `number` returns the entities health ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t#get_team) get\_team `:get_team()` `:` `number` returns the entity team represented as a number. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t#get_index) get\_index `:get_index()` `:` `number` returns the entity server index ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t#is_alive) is\_alive `:is_alive()` `:` `boolean` returns `true` if the player is alive, otherwise returns `false`. [Previousschema\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/schema_t) [Nextplayer\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t#methods) * [get\_origin](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t#get_origin) * [get\_abs\_origin](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t#get_abs_origin) * [get\_health](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t#get_health) * [get\_team](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t#get_team) * [get\_index](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t#get_index) * [is\_alive](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t#is_alive) sun-brightdesktopmoon sun-brightdesktopmoon --- # enumerations | Astral [e\_alignmentchevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_alignment) [e\_collision\_groupchevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_collision_group) [e\_contentschevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_contents) [e\_flowchevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_flow) [e\_hitboxchevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_hitbox) [e\_hitgroupchevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_hitgroup) [e\_input\_typechevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_input_type) [e\_maskchevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_mask) [e\_player\_filterchevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_player_filter) [e\_shot\_flagschevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_shot_flags) [e\_roundingchevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_rounding) [Previousvector2dchevron-left](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) [Nexte\_alignmentchevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_alignment) sun-brightdesktopmoon sun-brightdesktopmoon --- # e_contents | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_contents#values) values: --------------------------------------------------------------------------------------------------------- Copy e_contents.EMPTY e_contents.SOLID e_contents.HITBOX e_contents.TRIGGER e_contents.SKY e_contents.PLAYER_CLIP e_contents.NPC_CLIP e_contents.BLOCK_LOS e_contents.BLOCK_LIGHT e_contents.LADDER e_contents.PICKUP e_contents.BLOCK_SOUND e_contents.NODRAW e_contents.WINDOW e_contents.PASS_BULLETS e_contents.WORLD_GEOMETRY e_contents.WATER e_contents.SLIME e_contents.TOUCH_ALL e_contents.PLAYER e_contents.NPC e_contents.DEBRIS e_contents.PHYSICS_PROP e_contents.NAV_IGNORE e_contents.NAV_LOCAL_IGNORE e_contents.POST_PROCESSING_VOLUME e_contents.UNUSED_LAYER3 e_contents.CARRIED_OBJECT e_contents.PUSHAWAY e_contents.SERVER_ENTITY_ON_CLIENT e_contents.CARRIED_WEAPON e_contents.STATIC_LEVEL e_contents.CSGO_TEAM1 e_contents.CSGO_TEAM2 e_contents.CSGO_GRENADE_CLIP e_contents.CSGO_DRONE_CLIP e_contents.CSGO_MOVEABLE e_contents.CSGO_OPAQUE e_contents.CSGO_MONSTER e_contents.CSGO_UNUSED_LAYER e_contents.CSGO_THROWN_GRENADE [Previouse\_collision\_groupchevron-left](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_collision_group) [Nexte\_flowchevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_flow) sun-brightdesktopmoon sun-brightdesktopmoon --- # e_hitgroup | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_hitgroup#values) values: --------------------------------------------------------------------------------------------------------- Copy e_hitgroup.GENERIC e_hitgroup.HEAD e_hitgroup.CHEST e_hitgroup.STOMACH e_hitgroup.LEFTARM e_hitgroup.RIGHTARM e_hitgroup.LEFTLEG e_hitgroup.RIGHTLEG e_hitgroup.NECK e_hitgroup.UNUSED e_hitgroup.GEAR e_hitgroup.SPECIAL [Previouse\_hitboxchevron-left](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_hitbox) [Nexte\_input\_typechevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_input_type) sun-brightdesktopmoon sun-brightdesktopmoon --- # events | Astral circle-info This is used to listen to [game eventsarrow-up-right](https://cs2.poggu.me/dumped-data/game-events/) . If you want to listen to cheat events [go here](https://astral-lua.gitbook.io/astral/documentation/events#listening-to-an-event) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/events#functions) functions ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/events#add) add `events.add(name: string, callback: function<...>)` name string event name. callback function lua function to invoke. sets a callback for the specified event. the function will be invoked every time the specified event occurs. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/events#remove) remove `events.remove(callback: function)` name type description callback function lua function to remove. removes an already set event listener. [Previouselement\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/element_t) [Nextglobalschevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals) * [functions](https://astral-lua.gitbook.io/astral/documentation/namespaces/events#functions) * [add](https://astral-lua.gitbook.io/astral/documentation/namespaces/events#add) * [remove](https://astral-lua.gitbook.io/astral/documentation/namespaces/events#remove) sun-brightdesktopmoon sun-brightdesktopmoon --- # particle_t | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles/particle_t#methods) methods: ------------------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles/particle_t#set_control_point) set\_control\_point `:set_control_point(index: number, value: vector)` name type description index number control point index. value vector control point value. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles/particle_t#set_transform_fwd) set\_transform\_fwd `:set_transform_fwd(index: number, origin: vector, forward: vector)` name type description index number control point index. origin vector transform origin. forward vector forward vector. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles/particle_t#is_valid) is\_valid `:is_valid()` `:` `boolean` [Previousparticleschevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles) [Nextragechevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage) Last updated 16 days ago * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles/particle_t#methods) * [set\_control\_point](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles/particle_t#set_control_point) * [set\_transform\_fwd](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles/particle_t#set_transform_fwd) * [is\_valid](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles/particle_t#is_valid) sun-brightdesktopmoon sun-brightdesktopmoon --- # legit | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/legit#functions) functions: -------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/legit#reference) reference `legit.reference(path: string)` `:` [`element_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) name type description path string relative path excluding weapon type. returns the element relative to the weapon you are currently holding. [Previousinputchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/input) [Nextmathchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/math) * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/legit#functions) * [reference](https://astral-lua.gitbook.io/astral/documentation/namespaces/legit#reference) sun-brightdesktopmoon sun-brightdesktopmoon --- # e_hitbox | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_hitbox#values) values: ------------------------------------------------------------------------------------------------------- Copy e_hitbox.HEAD e_hitbox.NECK e_hitbox.PELVIS e_hitbox.STOMACH e_hitbox.THORAX e_hitbox.CHEST e_hitbox.UPPER_CHEST e_hitbox.LEFT_THIGH e_hitbox.LEFT_CALF e_hitbox.RIGHT_CALF e_hitbox.LEFT_FOOT e_hitbox.RIGHT_FOOT e_hitbox.LEFT_HAND e_hitbox.RIGHT_HAND e_hitbox.LEFT_UPPER_ARM e_hitbox.LEFT_FOREARM e_hitbox.RIGHT_UPPER_ARM e_hitbox.RIGHT_FOREARM [Previouse\_flowchevron-left](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_flow) [Nexte\_hitgroupchevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_hitgroup) sun-brightdesktopmoon sun-brightdesktopmoon --- # os | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/os#functions) functions: ----------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/os#date) date `os.date([format: string, time: number])` `:` `string` name type description format string optional. a format following the standard [strftimearrow-up-right](https://www.lua.org/pil/22.1.html) pattern. time number optional. a time value (seconds since unix epoch). if omitted, the current system time is used. returns the current date and time formatted according to the given format string, or a table representing the date components. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/os#time) time `os.time([table: table])` `:` `number` returns the time in seconds since the unix epoch (00:00:00 UTC, January 1, 1970). #### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/os#os.time-table-format-example) 🔗 os.time table format example Copy { year = 2026, -- full year. month = 1, -- month of the year (1-12). day = 1, -- day of the month (1-31). hour = 0, -- hour (0-23). defaults to 12:00 AM (0). min = 0, -- minutes (0-59). defaults to 0. sec = 0, -- seconds (0-59). defaults to 0. isdst = true, -- indicates daylight saving time. } ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/os#clock) clock `os.clock()` `:` `number` returns the amount of CPU time (in seconds) used by the program since it started. circle-exclamation os.clock() is not wall-clock time, it measures CPU processing time. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/os#difftime) difftime `os.difftime(t2: number, t1: number)` `:` `number` name type description t2 number the later timestamp in seconds. t1 number the earlier timestamp in seconds. returns the difference in seconds between the two time values. [Previousnet\_chanchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan) [Nextparticleschevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles) * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/os#functions) * [date](https://astral-lua.gitbook.io/astral/documentation/namespaces/os#date) * [time](https://astral-lua.gitbook.io/astral/documentation/namespaces/os#time) * [clock](https://astral-lua.gitbook.io/astral/documentation/namespaces/os#clock) * [difftime](https://astral-lua.gitbook.io/astral/documentation/namespaces/os#difftime) sun-brightdesktopmoon sun-brightdesktopmoon --- # e_player_filter | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_player_filter#values) values: -------------------------------------------------------------------------------------------------------------- Copy e_player_filter.ALL e_player_filter.TEAM e_player_filter.ENEMY [Previouse\_maskchevron-left](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_mask) [Nexte\_shot\_flagschevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_shot_flags) sun-brightdesktopmoon sun-brightdesktopmoon --- # trace_t | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace/trace_t#variables) variables: ---------------------------------------------------------------------------------------------------------------- name type description start\_pos vector start position of the trace. end\_pos vector end position of the trace. normal vector surface normal at impact. fraction number 0-1 fraction telling you how far the trace went based on the initial end position. start\_solid boolean returns `true` if the initial point was in a solid. entity entity\_t entity that was hit by the trace. hitbox schema\_t hitbox that was hit by the trace. [Previoustracechevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace) [Nextbullet\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace/bullet_t) Last updated 16 days ago sun-brightdesktopmoon sun-brightdesktopmoon --- # engine_texture_t | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render/engine_texture_t#methods) methods: ---------------------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render/engine_texture_t#get) get `:get()` `:` `userdata` returns the texture image that can be used in render.image ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render/engine_texture_t#get_size) get\_size `:get_size()` `:` [`vector2d`](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) returns the textures size [Previousrenderchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/render) [Nextthemechevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/theme) Last updated 22 hours ago * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/render/engine_texture_t#methods) * [get](https://astral-lua.gitbook.io/astral/documentation/namespaces/render/engine_texture_t#get) * [get\_size](https://astral-lua.gitbook.io/astral/documentation/namespaces/render/engine_texture_t#get_size) sun-brightdesktopmoon sun-brightdesktopmoon --- # e_shot_flags | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_shot_flags#values) values: ----------------------------------------------------------------------------------------------------------- Copy e_shot_flags.CHECK_ATTACK e_shot_flags.CHECK_SWAP e_shot_flags.CHECK_SECONDARY e_shot_flags.CHECK_REVOLVER [Previouse\_player\_filterchevron-left](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_player_filter) [Nexte\_roundingchevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_rounding) sun-brightdesktopmoon sun-brightdesktopmoon --- # http | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/http#functions) functions: ------------------------------------------------------------------------------------------------------- circle-exclamation all timeout parameters default to 1 minute. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/http#get) get `http.get(url: string[, headers: table, callback: function, timeout: number])` `:` [`response_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/http/response_t) name type description url string target URL. headers table optional. metadata to send along with your HTTP request (e.g. format, authorization) callback function optional. a function that will be called when a response is received. the [response](https://astral-lua.gitbook.io/astral/documentation/namespaces/http/response_t) will be passed as an argument. timeout number optional. decides how long a request can last, in milliseconds. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/http#get_async) get\_async `http.get_async(url: string[, headers: table, callback: function, timeout: number])` name type description url string target URL. headers table optional. metadata to send along with your HTTP request. (e.g. format, authorization) callback function optional. a function that will be called when a response is received. the [response](https://astral-lua.gitbook.io/astral/documentation/namespaces/http/response_t) will be passed as an argument. timeout number optional. decides how long a request can last, in milliseconds. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/http#post) post `http.post(url: string[, data: string|table, headers: table, callback: function, timeout: number])` `:` [`response_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/http/response_t) name type description url string target URL. data string | table optional. additional data to send. headers table optional. metadata to send along with your HTTP request. (e.g. format, authorization) callback function optional. a function that will be called when a response is received. the [response](https://astral-lua.gitbook.io/astral/documentation/namespaces/http/response_t) will be passed as an argument. timeout number optional. decides how long a request can last, in milliseconds. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/http#post_async) post\_async `http.post_async(url: string[, data: string|table, headers: table, callback: function, timeout: number])` name type description url string target URL. data string | table optional. additional data to send. headers table optional. metadata to send along with your HTTP request. (e.g. format, authorization) callback function optional. a function that will be called when a response is received. the [response](https://astral-lua.gitbook.io/astral/documentation/namespaces/http/response_t) will be passed as an argument. timeout number optional. decides how long a request can last, in milliseconds. [Previousglobalschevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/globals) [Nextresponse\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/http/response_t) * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/http#functions) * [get](https://astral-lua.gitbook.io/astral/documentation/namespaces/http#get) * [get\_async](https://astral-lua.gitbook.io/astral/documentation/namespaces/http#get_async) * [post](https://astral-lua.gitbook.io/astral/documentation/namespaces/http#post) * [post\_async](https://astral-lua.gitbook.io/astral/documentation/namespaces/http#post_async) sun-brightdesktopmoon sun-brightdesktopmoon --- # theme | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/theme#methods) methods: ---------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/theme#get_accent) get\_accent `:get_accent()` `:` [`color`](https://astral-lua.gitbook.io/astral/documentation/classes/color) ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/theme#get_gradient) get\_gradient `:get_gradient()` `:` [`color`](https://astral-lua.gitbook.io/astral/documentation/classes/color) [Previousengine\_texture\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/render/engine_texture_t) [Nexttracechevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/theme#methods) * [get\_accent](https://astral-lua.gitbook.io/astral/documentation/namespaces/theme#get_accent) * [get\_gradient](https://astral-lua.gitbook.io/astral/documentation/namespaces/theme#get_gradient) sun-brightdesktopmoon sun-brightdesktopmoon --- # e_mask | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_mask#values) values: ----------------------------------------------------------------------------------------------------- Copy e_mask.ALL e_mask.SOLID e_mask.PLAYERSOLID e_mask.NPCSOLID e_mask.NPCFLUID e_mask.WATER e_mask.SHOT e_mask.SHOT_BRUSHONLY e_mask.SHOT_HULL e_mask.SHOT_PORTAL e_mask.SOLID_BRUSHONLY e_mask.PLAYERSOLID_BRUSHONLY e_mask.NPCSOLID_BRUSHONLY [Previouse\_input\_typechevron-left](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_input_type) [Nexte\_player\_filterchevron-right](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_player_filter) sun-brightdesktopmoon sun-brightdesktopmoon --- # bullet_t | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace/bullet_t#variables) variables: ----------------------------------------------------------------------------------------------------------------- name type description damage number damage dealt by the bullet. start\_pos vector start position of the bullet. end\_pos vector end position of the bullet. normal vector surface normal at impact. fraction number 0-1 fraction telling you how far the bullet went based on the initial end position. start\_solid boolean returns `true` if the initial point was in a solid. entity entity\_t entity that was hit by the bullet. hitbox schema\_t hitbox that was hit by the bullet. [Previoustrace\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace/trace_t) [Nextuichevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui) sun-brightdesktopmoon sun-brightdesktopmoon --- # e_rounding | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_rounding#values) values: --------------------------------------------------------------------------------------------------------- Copy e_rounding.TOP e_rounding.TOP_LEFT e_rounding.TOP_RIGHT e_rounding.BOT e_rounding.BOT_LEFT e_rounding.BOT_RIGHT e_rounding.LEFT e_rounding.RIGHT e_rounding.ALL [Previouse\_shot\_flagschevron-left](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_shot_flags) sun-brightdesktopmoon sun-brightdesktopmoon --- # text_t | Astral circle-info this class is derived from [element\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/element_t) , this means that you can use anything from there aswell. [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/text_t#methods) methods: --------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/text_t#set) set `:set(value: string)` name type description value string text to display. [Previousespchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp) [Nextbar\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/bar_t) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/text_t#methods) * [set](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/text_t#set) sun-brightdesktopmoon sun-brightdesktopmoon --- # element_t | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/element_t#methods) methods: ------------------------------------------------------------------------------------------------------------ ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/element_t#is_enabled) is\_enabled `:is_enabled()` `:` `boolean` ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/element_t#set_enabled) set\_enabled `:set_enabled(enabled: boolean)` name type description enabled boolean ... [Previousbar\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/bar_t) [Nexteventschevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/events) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/element_t#methods) * [is\_enabled](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/element_t#is_enabled) * [set\_enabled](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp/element_t#set_enabled) sun-brightdesktopmoon sun-brightdesktopmoon --- # panorama | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/panorama#functions) functions: ----------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/panorama#loadstring) loadstring `panorama.loadstring(js: string[, panel: string])` name type description js string javascript code to load panel string optional. panel to target. [Previousutilschevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils) [Nextclasseschevron-right](https://astral-lua.gitbook.io/astral/documentation/classes) * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/panorama#functions) * [loadstring](https://astral-lua.gitbook.io/astral/documentation/namespaces/panorama#loadstring) sun-brightdesktopmoon sun-brightdesktopmoon --- # particles | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles#functions) functions: ------------------------------------------------------------------------------------------------------------ ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles#create_particle) create\_particle `particles.create_particle(name: string)` `:` [`particle_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles/particle_t) name type description name string name / path of the particle. creates and returns a [particle](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles/particle_t) , or `nil` on failure. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles#delete_particle) delete\_particle `particles.delete_particle(particle: particle_t[, instantly_delete: boolean])` name type description particle [particle\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles/particle_t) particle object. instantly\_delete boolean set to `true` to instantly delete the particle skipping any animation or lifespan. [Previousoschevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/os) [Nextparticle\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles/particle_t) * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles#functions) * [create\_particle](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles#create_particle) * [delete\_particle](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles#delete_particle) sun-brightdesktopmoon sun-brightdesktopmoon --- # weapon_t | Astral circle-info this class is derived from [entity\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t) , this means that you can use anything from there aswell. [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/weapon_t#methods) methods: ---------------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/weapon_t#get_data) get\_data `:get_data()` `:` [`schema_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/schema_t) returns the `CWeaponCSBaseVData` instance. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/weapon_t#get_spread) get\_spread `:get_spread()` `:` `number` returns the spread fraction. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/weapon_t#get_inaccuracy) get\_inaccuracy `:get_inaccuracy()` `:` `number` returns the inaccuracy fraction ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/weapon_t#get_name) get\_name `:get_name()` `:` `string` returns the weapons name [Previousplayer\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t) [Nextespchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/esp) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/weapon_t#methods) * [get\_data](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/weapon_t#get_data) * [get\_spread](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/weapon_t#get_spread) * [get\_inaccuracy](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/weapon_t#get_inaccuracy) * [get\_name](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/weapon_t#get_name) sun-brightdesktopmoon sun-brightdesktopmoon --- # input | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#functions) functions: -------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#is_console_open) is\_console\_open `input.is_console_open()` `:` `boolean` ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#is_chat_open) is\_chat\_open `input.is_chat_open()` `:` `boolean` ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#is_input_allowed) is\_input\_allowed `input.is_input_allowed()` `:` `boolean` ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#is_key_down) is\_key\_down `input.is_key_down(vk: number)` `:` `boolean` name type description vk number virtual key code which will be checked returns `true` if the passed key is held down, otherwise returns `false`. [![Logo](https://astral-lua.gitbook.io/astral/~gitbook/image?url=https%3A%2F%2Flearn.microsoft.com%2Ffavicon.ico&width=20&dpr=3&quality=100&sign=be1c70aa&sv=2)Virtual-Key Codes (Winuser.h) - Win32 appsMicrosoftLearnchevron-right](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#is_mouse_in_rect) is\_mouse\_in\_rect `input.is_mouse_in_rect(pos: vector2d, size: vector2d)` `:` `boolean` name type description pos [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) position of the rectangle. size [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) size of the rectangle. returns `true` if the mouse position intersects with the passed rectangle, otherwise returns `false`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#get_mouse_pos) get\_mouse\_pos `input.get_mouse_pos()` `:` [`vector2d`](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) returns the current mouse position. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#get_clipboard) get\_clipboard `input.get_clipboard()` `:` `string` returns the current clipboard data. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#set_clipboard) set\_clipboard `input.set_clipboard(data: string)` name type description data string ... sets the current clipboard data. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#get_scroll) get\_scroll `input.get_scroll()` `:` `number` returns `1` if you are scrolling up, `-1` if you are scrolling down. [Previousresponse\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/http/response_t) [Nextlegitchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/legit) * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#functions) * [is\_console\_open](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#is_console_open) * [is\_chat\_open](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#is_chat_open) * [is\_input\_allowed](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#is_input_allowed) * [is\_key\_down](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#is_key_down) * [is\_mouse\_in\_rect](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#is_mouse_in_rect) * [get\_mouse\_pos](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#get_mouse_pos) * [get\_clipboard](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#get_clipboard) * [set\_clipboard](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#set_clipboard) * [get\_scroll](https://astral-lua.gitbook.io/astral/documentation/namespaces/input#get_scroll) sun-brightdesktopmoon sun-brightdesktopmoon --- # rage | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage#functions) functions: ------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage#reference) reference `rage.reference(path: string)` `:` [`element_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) name type description path string relative path excluding weapon type. returns the element relative to the weapon you are currently holding. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage#get_threat) get\_threat `rage.get_threat()` `:` [`player_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t) returns the current threat. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage#whitelist_player) whitelist\_player `rage.whitelist_player(player: player_t)` name type description player [player\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t) player to whitelist. whitelists a player for one tick. circle-exclamation rage.whitelist\_player can only be used inside the [move](https://astral-lua.gitbook.io/astral/documentation/events#move) callback. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage#get_manual_direction) get\_manual\_direction `rage.get_manual_direction()` `:` `number` returns the current manual direction (e.g. -90, 90, 180). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage#is_auto_retreating) is\_auto\_retreating `rage.is_auto_retreating()` `:` `boolean` ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage#get_auto_retreat_pos) get\_auto\_retreat\_pos `rage.get_auto_retreat_pos()` `:` [`vector`](https://astral-lua.gitbook.io/astral/documentation/classes/vector) returns the current auto retreat position, or `nil` if there is none. [Previousparticle\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/particles/particle_t) [Nextrenderchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/render) * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage#functions) * [reference](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage#reference) * [get\_threat](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage#get_threat) * [whitelist\_player](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage#whitelist_player) * [get\_manual\_direction](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage#get_manual_direction) * [is\_auto\_retreating](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage#is_auto_retreating) * [get\_auto\_retreat\_pos](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage#get_auto_retreat_pos) sun-brightdesktopmoon sun-brightdesktopmoon --- # net_chan | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#functions) functions: ----------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_address) get\_address `net_chan.get_address()` `:` `string` returns the address of the server. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_time) get\_time `net_chan.get_time()` `:` `number` returns the current net time. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_time_connected) get\_time\_connected `net_chan.get_time_connected()` `:` `number` returns the connection time in seconds. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_data_rate) get\_data\_rate `net_chan.get_data_rate()` `:` `number` returns the send data rate in bytes per second. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#is_local_host) is\_local\_host `net_chan.is_local_host()` `:` `boolean` ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#is_loopback) is\_loopback `net_chan.is_loopback()` `:` `boolean` ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#is_timing_out) is\_timing\_out `net_chan.is_timing_out()` `:` `boolean` ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#is_playback) is\_playback `net_chan.is_playback()` `:` `boolean` ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_avg_latency) get\_avg\_latency `net_chan.get_avg_latency()` `:` `number` returns the average packet latency in seconds. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_engine_latency) get\_engine\_latency `net_chan.get_engine_latency()` `:` `number` * * * ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_avg_loss) get\_avg\_loss `net_chan.get_avg_loss(flow: number)` `:` `number` name type description flow [e\_flow](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_flow) ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_avg_choke) get\_avg\_choke `net_chan.get_avg_choke(flow: number)` `:` `number` name type description flow [e\_flow](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_flow) ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_avg_data) get\_avg\_data `net_chan.get_avg_data(flow: number)` `:` `number` name type description flow [e\_flow](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_flow) ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_avg_packet_bytes) get\_avg\_packet\_bytes `net_chan.get_avg_packet_bytes(flow: number)` `:` `number` name type description flow [e\_flow](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_flow) ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_avg_packets) get\_avg\_packets `net_chan.get_avg_packets(flow: number)` `:` `number` name type description flow [e\_flow](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_flow) ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_total_data) get\_total\_data `net_chan.get_total_data(flow: number)` `:` `number` name type description flow [e\_flow](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_flow) ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_total_packets) get\_total\_packets `net_chan.get_total_packets(flow: number)` `:` `number` name type description flow [e\_flow](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_flow) ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_sequence_nr) get\_sequence\_nr `net_chan.get_sequence_nr(flow: number)` `:` `number` name type description flow [e\_flow](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_flow) ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_time_since_last_recieved) get\_time\_since\_last\_recieved `net_chan.get_time_since_last_recieved()` `:` `number` returns the time since the last recieved packet was acknowledged in seconds. [Previousmathchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/math) [Nextoschevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/os) * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#functions) * [get\_address](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_address) * [get\_time](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_time) * [get\_time\_connected](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_time_connected) * [get\_data\_rate](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_data_rate) * [is\_local\_host](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#is_local_host) * [is\_loopback](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#is_loopback) * [is\_timing\_out](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#is_timing_out) * [is\_playback](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#is_playback) * [get\_avg\_latency](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_avg_latency) * [get\_engine\_latency](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_engine_latency) * [get\_avg\_loss](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_avg_loss) * [get\_avg\_choke](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_avg_choke) * [get\_avg\_data](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_avg_data) * [get\_avg\_packet\_bytes](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_avg_packet_bytes) * [get\_avg\_packets](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_avg_packets) * [get\_total\_data](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_total_data) * [get\_total\_packets](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_total_packets) * [get\_sequence\_nr](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_sequence_nr) * [get\_time\_since\_last\_recieved](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan#get_time_since_last_recieved) sun-brightdesktopmoon sun-brightdesktopmoon --- # player_t | Astral circle-info this class is derived from [entity\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t) , this means that you can use anything from there aswell. [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#methods) methods: ---------------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#is_bot) is\_bot `:is_bot()` `:` `boolean` returns `true` if the player is a bot, otherwise returns `false`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#is_local_player) is\_local\_player `:is_local_player([check_observer: boolean])` `:` `boolean` name type description check\_observer boolean optional. will return the observed player instead if it exists. returns `true` if the player is the local player, otherwise returns `false`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#is_enemy) is\_enemy `:is_enemy([check_observer: boolean])` `:` `boolean` name type description check\_observer boolean optional. if the local player is spectating someone, will use the spectated player as a reference instead. returns `true` if the player is an enemy, otherwise returns `false`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_name) get\_name `:get_name()` `:` `string` returns the players name. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_avatar) get\_avatar `:get_avatar([size: number])` `:` [`userdata, vector2d`](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) name type description size number optional. returns the players avatar and size. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_weapon) get\_weapon `:get_weapon()` `:` [`weapon_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/weapon_t) returns the players weapon. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_controller) get\_controller `:get_controller()` `:` [`entity_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t) returns the player controller. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_hitbox) get\_hitbox `:get_hitbox(hitbox: e_hitbox|number)` `:` [`schema_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/schema_t) name type description hitbox [e\_hitbox](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_hitbox) hitbox ID. returns the players hitbox. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_screen_bounds) get\_screen\_bounds `:get_screen_bounds()` `:` [`vector2d, vector2d`](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) returns the screen position and size of the player bounds. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_esp_alpha_scale) get\_esp\_alpha\_scale `:get_esp_alpha_scale()` `:` `number` returns the alpha scale of the player's ESP. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#can_shoot) can\_shoot `:can_shoot(flags: e_shot_flags)` `:` `boolean` name type description flags [e\_shot\_flags](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_shot_flags) extra checks. defaults to `CHECK_ATTACK`. returns `true` if the player can shoot, otherwise returns `false`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_muzzle_pos) get\_muzzle\_pos `:get_muzzle_pos()` `:` [`vector`](https://astral-lua.gitbook.io/astral/documentation/classes/vector) returns the weapons muzzle position. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_hitbox_pos) get\_hitbox\_pos `:get_hitbox_pos(hitbox: e_hitbox|number)` `:` [`vector`](https://astral-lua.gitbook.io/astral/documentation/classes/vector) name type description hitbox [e\_hitbox](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_hitbox) hitbox ID. returns the position of the given hitbox. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_eye_pos) get\_eye\_pos `:get_eye_pos()` `:` [`vector`](https://astral-lua.gitbook.io/astral/documentation/classes/vector) returns the players eye position. [Previousentity\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/entity_t) [Nextweapon\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/weapon_t) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#methods) * [is\_bot](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#is_bot) * [is\_local\_player](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#is_local_player) * [is\_enemy](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#is_enemy) * [get\_name](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_name) * [get\_avatar](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_avatar) * [get\_weapon](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_weapon) * [get\_controller](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_controller) * [get\_hitbox](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_hitbox) * [get\_screen\_bounds](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_screen_bounds) * [get\_esp\_alpha\_scale](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_esp_alpha_scale) * [can\_shoot](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#can_shoot) * [get\_muzzle\_pos](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_muzzle_pos) * [get\_hitbox\_pos](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_hitbox_pos) * [get\_eye\_pos](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t#get_eye_pos) sun-brightdesktopmoon sun-brightdesktopmoon --- # hotkey_t | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/hotkey_t#methods) methods: ---------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/hotkey_t#get) get `:get()` `:` `number` returns the hotkey's assigned [virtual key codearrow-up-right](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) , returns `-1` if not assigned. [Previoustext\_box\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/text_box_t) [Nextbind\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/bind_t) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/hotkey_t#methods) * [get](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/hotkey_t#get) sun-brightdesktopmoon sun-brightdesktopmoon --- # text_box_t | Astral circle-info this class is derived from [element\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) , this means that you can use anything from there aswell. [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/text_box_t#methods) methods: ------------------------------------------------------------------------------------------------------------ ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/text_box_t#get) get `:get()` `:` `string` returns the textbox content. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/text_box_t#set) set `:set(value: string)` `:` `string` value type description value string new content to override. sets the textbox content. [Previousmulti\_dropdown\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/multi_dropdown_t) [Nexthotkey\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/hotkey_t) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/text_box_t#methods) * [get](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/text_box_t#get) * [set](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/text_box_t#set) sun-brightdesktopmoon sun-brightdesktopmoon --- # trace | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace#functions) functions: -------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace#line) line `trace.line(start: vector, end: vector, filter: trace_filter)` `:` [`trace_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace/trace_t) name type description start [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) start of the trace. end [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) end of the trace. filter [trace\_filter](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter) trace filtering options. runs and returns the [trace](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace/trace_t) containing all the information. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace#hull) hull `trace.hull(start: vector, end: vector, mins: vector, maxs: vector, filter: trace_filter)` `:` [`trace_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace/trace_t) name type description start [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) start of the trace. end [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) end of the trace. mins [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) hull mins. maxs [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) hull maxs. filter [trace\_filter](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter) trace filtering options. runs and returns the [trace](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace/trace_t) containing all the information. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace#sphere) sphere `trace.sphere(start: vector, end: vector, center: vector, radius: number, filter: trace_filter)` `:` [`trace_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace/trace_t) name type description start [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) start of the trace. end [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) end of the trace. center [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) center of the sphere radius number radius of the sphere. filter [trace\_filter](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter) trace filtering options. runs and returns the [trace](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace/trace_t) containing all the information. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace#capsule) capsule `trace.capsule(start: vector, end: vector, mins: vector, maxs: vector, radius: number, filter: trace_filter)` `:` [`trace_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace/trace_t) name type description start [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) start of the trace. end [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) end of the trace. mins [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) capsule mins. maxs [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) capsule maxs. radius number radius of the capsule. filter [trace\_filter](https://astral-lua.gitbook.io/astral/documentation/classes/trace_filter) trace filtering options. runs and returns the [trace](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace/trace_t) containing all the information. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace#bullet) bullet `trace.bullet(start: vector, end: vector, attacker: player_t[, target: player, penetration: boolean])` `:` [`bullet_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace/bullet_t) name type description start [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) start of the bullet. end [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) end of the bullet. attacker [player\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t) player who's weapon will be used. target [player\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t) optional. if left as `nil`, returns the current weapon damage at the end position. penetration boolean optional. enables or disables penetration. runs and returns a [shot simulation](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace/bullet_t) containing all the information. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace#scale_damage) scale\_damage `trace.scale_damage(damage: number, weapon: weapon_t, target: player_t, hitgroup: number)` `:` `number` name type description damage number current raw damage. weapon [weapon\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/weapon_t) weapon that dealt said damage. target [player\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/player_t) target that took said damage. hitgroup number hitgroup id. scales a damage value based on players armor, damage multipliers and weapon data. only required when target is `nil` for [trace.bullet](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace#bullet) . [Previousthemechevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/theme) [Nexttrace\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace/trace_t) * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace#functions) * [line](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace#line) * [hull](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace#hull) * [sphere](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace#sphere) * [capsule](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace#capsule) * [bullet](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace#bullet) * [scale\_damage](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace#scale_damage) sun-brightdesktopmoon sun-brightdesktopmoon --- # bind_t | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/bind_t#methods) methods: -------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/bind_t#get_control) get\_control `:get_control()` `:` [`element_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) returns the element which the bind is assigned to. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/bind_t#get_value) get\_value `:get_value()` `:` `any` returns the binds value. [Previoushotkey\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/hotkey_t) [Nextcontainer\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/bind_t#methods) * [get\_control](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/bind_t#get_control) * [get\_value](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/bind_t#get_value) sun-brightdesktopmoon sun-brightdesktopmoon --- # slider_t | Astral circle-info this class is derived from [element\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) , this means that you can use anything from there aswell. [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/slider_t#methods) methods: ---------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/slider_t#get) get `:get()` `:` `number` returns the value of the slider. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/slider_t#set) set `:set(value: number)` name type description value number new value. sets the value of the slider. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/slider_t#set_min) set\_min `:set_min(value: number)` name type description value number new value. sets the minimum value of the slider. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/slider_t#set_max) set\_max `:set_max(value: number)` name type description value number new value. sets the maximum value of the slider [Previouscolor\_picker\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/color_picker_t) [Nextdropdown\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/dropdown_t) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/slider_t#methods) * [get](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/slider_t#get) * [set](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/slider_t#set) * [set\_min](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/slider_t#set_min) * [set\_max](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/slider_t#set_max) sun-brightdesktopmoon sun-brightdesktopmoon --- # button_t | Astral circle-info this class is derived from [element\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) , this means that you can use anything from there aswell. [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/button_t#methods) methods: ---------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/button_t#callback) callback `:callback()` invokes the set callback. [Previouselement\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) [Nextutilschevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/button_t#methods) * [callback](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/button_t#callback) sun-brightdesktopmoon sun-brightdesktopmoon --- # color_picker_t | Astral circle-info this class is derived from [element\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) , this means that you can use anything from there aswell. [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/color_picker_t#methods) methods: ---------------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/color_picker_t#get) get `:get()` `:` [`color`](https://astral-lua.gitbook.io/astral/documentation/classes/color) returns the color of the colorpicker. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/color_picker_t#set) set `:set(color: color)` name type description color color new color. sets the color of the color picker. [Previouscheckbox\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/checkbox_t) [Nextslider\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/slider_t) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/color_picker_t#methods) * [get](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/color_picker_t#get) * [set](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/color_picker_t#set) sun-brightdesktopmoon sun-brightdesktopmoon --- # dropdown_t | Astral circle-info this class is derived from [element\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) , this means that you can use anything from there aswell. [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/dropdown_t#methods) methods: ------------------------------------------------------------------------------------------------------------ ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/dropdown_t#get) get variant one variant two `:get()` `:` `string` returns the name of the active dropdown entry. `:get(value: number)` `:` `boolean` name type description value number index of the entry returns `true` if the active dropdown entries index corresponds with the value passed, otherwise returns `false`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/dropdown_t#get_index) get\_index `:get_index()` `:` `number` returns the active dropdown entries index. circle-info please note that if you're checking if something is active, the [second variant](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/dropdown_t#variant-two) of the [:get](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/dropdown_t#get) method is a cleaner approach. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/dropdown_t#set) set name variant index variant `:set(name: string)` name type description name string sets the active dropdown entry to the corresponding name. `:set(index: number)` name type description index number sets the active dropdown entry to the corresponding index. [Previousslider\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/slider_t) [Nextmulti\_dropdown\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/multi_dropdown_t) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/dropdown_t#methods) * [get](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/dropdown_t#get) * [get\_index](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/dropdown_t#get_index) * [set](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/dropdown_t#set) sun-brightdesktopmoon sun-brightdesktopmoon --- # checkbox_t | Astral circle-info this class is derived from [element\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) , this means that you can use anything from there aswell. [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/checkbox_t#methods) methods: ------------------------------------------------------------------------------------------------------------ ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/checkbox_t#add_popup) add\_popup `:add_popup()` `:` [`container_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t) creates and returns a [popup](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/checkbox_t#add_color_picker) add\_color\_picker `:add_color_picker([tooltip: string])` `:` [`color_picker_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/color_picker_t) name type description tooltip string optional. creates and returns a [color picker](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/color_picker_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/checkbox_t#get) get `:get()` `:` `boolean` returns the state of the checkbox. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/checkbox_t#set) set `:set(state: boolean)` name type description state boolean `true` or `false`. sets the state of the checkbox. [Previousuichevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui) [Nextcolor\_picker\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/color_picker_t) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/checkbox_t#methods) * [add\_popup](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/checkbox_t#add_popup) * [add\_color\_picker](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/checkbox_t#add_color_picker) * [get](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/checkbox_t#get) * [set](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/checkbox_t#set) sun-brightdesktopmoon sun-brightdesktopmoon --- # list_box_t | Astral circle-info this class is derived from [element\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) , this means that you can use anything from there aswell. [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t#methods) methods: ------------------------------------------------------------------------------------------------------------ ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t#get) get variant one variant two `:get(value: number)` `:` `boolean` returns `true` if the passed index is active, otherwise returns `false`. `:get()` `:` `string` returns the active option name. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t#get_index) get\_index `:get_index()` `:` `number` returns the current active option index. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t#set) set variant one variant two `:set(value: string)` name type description value string name of the option. :set(value: number) name type description value number index of the option. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t#get_options) get\_options `:get_options()` `:` `table` returns a table containing all the listbox options. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t#set_options) set\_options `:set_options(options: table)` name type description options table new options. [Previouscontainer\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t) [Nextelement\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t#methods) * [get](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t#get) * [get\_index](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t#get_index) * [set](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t#set) * [get\_options](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t#get_options) * [set\_options](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t#set_options) sun-brightdesktopmoon sun-brightdesktopmoon --- # multi_dropdown_t | Astral circle-info this class is derived from [element\_t](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) , this means that you can use anything from there aswell. [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/multi_dropdown_t#methods) methods: ------------------------------------------------------------------------------------------------------------------ ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/multi_dropdown_t#get) get get all entries get based on string get based on index `:get()` `:` `table` returns a table with all the **active** dropdown entries. `:get(name: string)` `:` `boolean` name type description name string name of the entry. returns `true` if the entry with the corresponding name is active, otherwise returns `false`. `:get(index: number)` `:` `boolean` name type description index number index of the entry. returns `true` if the entry with the corresponding index is active, otherwise returns `false`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/multi_dropdown_t#set) set set based on string set based on index override all values `:set(name: string, state: boolean)` name type description name string name of the entry. state boolean new state of the entry. sets the value of the multi dropdown's entry. `:set(index: number, state: boolean)` name type description `index` number index of the entry. state boolean new state of the entry. sets the value of the multi dropdown's entry. `:set(value: table)` name type description value table table of strings corresponding with dropdown entries. sets all active entries. [Previousdropdown\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/dropdown_t) [Nexttext\_box\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/text_box_t) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/multi_dropdown_t#methods) * [get](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/multi_dropdown_t#get) * [set](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/multi_dropdown_t#set) sun-brightdesktopmoon sun-brightdesktopmoon --- # element_t | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#methods) methods: ----------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#add_tooltip) add\_tooltip `:add_tooltip(tooltip: string)` `:` [`element_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) name type description tooltip string tooltip text. creates and appends a tooltip to the element, returning itself. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#get_name) get\_name `:get_name()` `:` `string` ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#get_path) get\_path `:get_path()` `:` `string` ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#override) override `:override(value: any)` name type description value any value to override element to. overrides a elements current value to the given value without setting the menu / config value. if `nil` is passed, the override is undone. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#is_overriden) is\_overriden `:is_overriden()` `:` `boolean` ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#get_visibility) get\_visibility `:get_visibility()` `:` `boolean` returns `true` if the menu element is visible, otherwise returns `false`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#set_visibility) set\_visibility `:set_visibility(state: boolean)` name type description state boolean `true` or `false`. hides or shows the menu element. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#get_interactable) get\_interactable `:get_interactable()` `:` `boolean` ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#set_interactable) set\_interactable `:set_interactable(interactable: boolean)` name type description interactable boolean set to `false` to disable interactions with this element. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#add_callback) add\_callback `:add_callback(callback: function)` name type description callback function function which will be invoked. adds a change callback to the specified element. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#remove_callback) remove\_callback `:remove_callback(callback: function)` name type description callback function reference to function. removes a already set change callback. [Previouslist\_box\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t) [Nextbutton\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/button_t) * [methods:](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#methods) * [add\_tooltip](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#add_tooltip) * [get\_name](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#get_name) * [get\_path](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#get_path) * [override](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#override) * [is\_overriden](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#is_overriden) * [get\_visibility](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#get_visibility) * [set\_visibility](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#set_visibility) * [get\_interactable](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#get_interactable) * [set\_interactable](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#set_interactable) * [add\_callback](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#add_callback) * [remove\_callback](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t#remove_callback) sun-brightdesktopmoon sun-brightdesktopmoon --- # container_t | Astral ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_seperator) add\_seperator `:add_seperator()` `:` [`element_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) creates and returns a [seperator](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#element_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_label) add\_label `:add_label(name: string)` `:` [`element_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) name type description name string name of the element creates and returns a [label](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#element_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_color_picker) add\_color\_picker `:add_color_picker(name: string)` `:` [`color_picker_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/color_picker_t) name type description name string name of the element creates and returns a [color picker](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/color_picker_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_checkbox) add\_checkbox `:add_checkbox(name: string)` `:` [`checkbox_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/checkbox_t) name type description name string name of the element creates and returns a [checkbox](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/checkbox_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_slider) add\_slider `:add_slider(name: string, min: float, max: float[, step: float, trail: string, remap: table])` `:` [`slider_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/slider_t) name type description name string name of the element min number minimum slider value max number maximum slider value step number optional. sets how many decimals the slider accepts. trail string optional. concatenate's a string at the end of the value (e.g "%"). remap table optional. table with number keys and strings as the definition. creates and returns a [slider](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/slider_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_dropdown) add\_dropdown `:add_dropdown(name: string, options: table)` `:` [`dropdown_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/dropdown_t) name type description name string name of the element options table dropdown options. creates and returns a [dropdown](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/dropdown_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_multi_dropdown) add\_multi\_dropdown `:add_multi_dropdown(name: string, options: table)` `:` [`multi_dropdown_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/multi_dropdown_t) name type description name string name of the element options table multi dropdown options. creates and returns a [multi dropdown](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/multi_dropdown_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_list_box) add\_list\_box `:add_list_box(name: string, options: table[, max_height: number, allow_search: boolean])` `:` [`list_box_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t) name type description name string name of the element options table list box options. max\_height number optional. max listbox height in pixels. allow\_search boolean optional. appends a search bar to the list box. creates and returns a [list box](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_text_box) add\_text\_box `:add_text_box(name: string[, input_type: e_input_type, inline: boolean])` `:` [`text_box_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/text_box_t) name type description name string name of the element. input\_type [e\_input\_type](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_input_type) optional. defaults to `ALL`. inline boolean optional. creates and returns a [text box](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/text_box_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_button) add\_button `:add_button(name: string, callback: function)` `:` [`button_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/button_t) name type description name string name of the element. callback function function which will be invoked on a press. creates and returns a [button](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/button_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_hotkey) add\_hotkey `:add_hotkey(name: string)` `:` [`hotkey_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/hotkey_t) name type description name string name of the element. creates and returns a [hotkey](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/hotkey_t) . [Previousbind\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/bind_t) [Nextlist\_box\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t) * [add\_seperator](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_seperator) * [add\_label](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_label) * [add\_color\_picker](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_color_picker) * [add\_checkbox](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_checkbox) * [add\_slider](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_slider) * [add\_dropdown](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_dropdown) * [add\_multi\_dropdown](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_multi_dropdown) * [add\_list\_box](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_list_box) * [add\_text\_box](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_text_box) * [add\_button](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_button) * [add\_hotkey](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t#add_hotkey) sun-brightdesktopmoon sun-brightdesktopmoon --- # utils | Astral circle-exclamation all file writing/reading paths are relative to the lua folder. [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#functions) functions: -------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_username) get\_username `utils.get_username()` `:` `string` returns the **astral** client's username. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_game_path) get\_game\_path `utils.get_game_path()` `:` `string` returns the absolute path to the game files. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#is_in_game) is\_in\_game `utils.is_in_game()` `:` `boolean` returns `true` if the client is in a game, otherwise returns `false`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#file_exists) file\_exists `utils.file_exists(name: string)` `:` `boolean` name type description name string name of the file. returns `true` if the specified file exists, otherwise returns `false`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#write_file) write\_file `utils.write_file(name: string, data: string[, erase: boolean])` `:` `boolean` name type description name string name of the file. data string data to write. erase boolean optional. set to `true` to overwrite the current file's content (if it exists). writes a file and returns `false` upon failure, otherwise returns `true`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#read_file) read\_file `utils.read_file(name: string)` `:` `string` name type description name string name of the file. reads and returns the data of the specified file. returns `nil` on failure. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#create_folder) create\_folder `utils.create_folder(name: string)` `:` `boolean` name type description name string name of the folder. returns `true` upon success, otherwise returns `false`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#play_sound) play\_sound `utils.play_sound(path: string[, volume: number])` name type description path string path to the sound file. volume number optional. plays the specified sound file. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#console_print) console\_print `utils.console_print(col: color, text: string[, ...])` name type description col [color](https://astral-lua.gitbook.io/astral/documentation/classes/color) color of the text. text string text to print. ... any optional arguments to concatenate with `text`. prints a text to the console. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#chat_print) chat\_print `utils.chat_print(text: string)` name type description text string text to print. prints a clientside text to the chat (only you can see it). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#console_exec) console\_exec `utils.console_exec(cmd: string)` name type description cmd string command to execute executes a game command. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_game_rules) get\_game\_rules `utils.get_game_rules()` `:` [`schema_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/entities/schema_t) returns the `C_CSGameRules` instance. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#time_to_ticks) time\_to\_ticks `utils.time_to_ticks(time: number)` `:` `number` name type description time number time in seconds. converts time (seconds) to ticks. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#ticks_to_time) ticks\_to\_time `utils.ticks_to_time(ticks: number)` `:` `number` name type description ticks number amount of ticks. converts ticks to time (seconds). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_schema_offset) get\_schema\_offset `utils.get_schema_offset(scope: string, classname: string, name: string)` `:` `number` name type description scope string scope (e.g `client.dll`). classname string name of the class (e. g `C_CSPlayerPawn`). name string name (e. g `m_iHealth`). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_localized) get\_localized `utils.get_localized(token: string)` `:` `string` name type description token string localizes a string. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_hitbox_name) get\_hitbox\_name `utils.get_hitbox_name(hitbox: e_hitbox|number)` `:` `string` name type description hitbox [e\_hitbox](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_hitbox) hitbox ID. returns the given hitboxes name (e.g "left leg"). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_hitgroup_name) get\_hitgroup\_name `utils.get_hitgroup_name(hitgroup: e_hitgroup|number)` `:` `string` name type description hitgroup [e\_hitgroup](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_hitgroup) hitgroup ID. returns the given hitboxes name (e.g "body"). * * * circle-exclamation all of these functions return a `uintptr_t` type, meaning if you need a function or anything other than the address, you will have to cast it via `ffi.cast`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_module_address) get\_module\_address `utils.get_module_address(name: string)` `:` `number` name type description name string name of the module (e.g. `"client.dll"`). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_module_export) get\_module\_export `utils.get_module_export(module_name: string, export_name: string)` `:` `number` name type description module\_name string name of the module (e.g. `"tier0.dll"`). export\_name string name of the export (e.g. `"RandomFloat"`). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_module_import) get\_module\_import `utils.get_module_import(module_name: string, import_name: string)` `:` `number` name type description module\_name string name of the module (e.g. `"client.dll"`). import\_name string name of the import (e.g. `"VirtualQuery"`). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#find_module_signature) find\_module\_signature `utils.find_module_signature(module_name: string, signature: string)` `:` `number` name type description module\_name string name of the module (e.g. `"client.dll"`). signature string IDA style byte signature, the wildcard is `?`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_interface) get\_interface `utils.get_interface(module_name: string, name: string)` `:` `number` name type description module\_name string name of the module (e.g. `"client.dll"`). name string name of the interface (e.g. `"SteamUtils010"`). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_vfunc) get\_vfunc `utils.get_vfunc(address: number, index: number)` `:` `number` name type description address number global space address of the virtual table. index number index of the virtual function. [Previousbutton\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/button_t) [Nextpanoramachevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/panorama) Last updated 16 days ago * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#functions) * [get\_username](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_username) * [get\_game\_path](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_game_path) * [is\_in\_game](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#is_in_game) * [file\_exists](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#file_exists) * [write\_file](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#write_file) * [read\_file](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#read_file) * [create\_folder](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#create_folder) * [play\_sound](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#play_sound) * [console\_print](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#console_print) * [chat\_print](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#chat_print) * [console\_exec](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#console_exec) * [get\_game\_rules](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_game_rules) * [time\_to\_ticks](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#time_to_ticks) * [ticks\_to\_time](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#ticks_to_time) * [get\_schema\_offset](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_schema_offset) * [get\_localized](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_localized) * [get\_hitbox\_name](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_hitbox_name) * [get\_hitgroup\_name](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_hitgroup_name) * [get\_module\_address](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_module_address) * [get\_module\_export](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_module_export) * [get\_module\_import](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_module_import) * [find\_module\_signature](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#find_module_signature) * [get\_interface](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_interface) * [get\_vfunc](https://astral-lua.gitbook.io/astral/documentation/namespaces/utils#get_vfunc) sun-brightdesktopmoon sun-brightdesktopmoon --- # render | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#functions) functions: --------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#get_screen_size) get\_screen\_size `render.get_screen_size()` `:` [`vector2d`](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) returns the screen size. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#get_render_scale) get\_render\_scale `render.get_render_scale()` `:` `number` returns the cheat render scale. circle-info to convert a 3d world-space position to screen-space, use [:to\_screen](https://astral-lua.gitbook.io/astral/documentation/classes/vector#to_screen) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#create_png) create\_png 📌 render any png via the [image](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#image) function. `render.create_png(path: string)` `:` [`userdata, vector2d`](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) name type description path string path to the image. creates and returns the image texture and the image size. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#create_png_from_memory) create\_png\_from\_memory 📌 render any png via the [image](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#image) function. `render.create_png_from_memory(content: string)` `:` [`userdata, vector2d`](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) name type description content string raw image content. creates and returns the image texture and the image size. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#create_svg) create\_svg 📌 render any svg via the [image](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#image) function. `render.create_svg(path: string, scale: number)` `:` [`userdata, vector2d`](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) name type description path string path to the svg file. scale number svg size scaling in fractions. creates and returns the image texture and the image size. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#create_svg_from_memory) create\_svg\_from\_memory 📌 render any svg via the [image](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#image) function. `render.create_svg_from_memory(svg: string, scale: number)` `:` [`userdata, vector2d`](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) name type description svg string svg content. scale number svg size scaling in fractions. creates and returns the image texture and the image size. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#create_font) create\_font 📌 render any font via the [text](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#text) function. `render.create_font(path: string, size: number, bold: boolean)` `:` `userdata` name type description path string absolute path to the font size number size of the font bold boolean bold font. creates and returns a font. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#load_engine_image) load\_engine\_image `render.load_engine_image(path: string)` `:` [`engine_texture_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/render/engine_texture_t) name type description path string path to game resource e.g. `s2r://panorama/images/econ/weapons/base_weapons/weapon_ak47_png.vtex` gets a engine image from the specified path. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#getting-default-fonts) getting default fonts menu font normal font small font `render.get_menu_font()` `:` `userdata` returns the menu font pointer. `render.get_normal_font()` `:` `userdata` returns the normal (ESP) font pointer. `render.get_small_font()` `:` `userdata` returns the small (pixel) font pointer. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#get_text_size) get\_text\_size `render.get_text_size(font: userdata, text: string)` `:` [`vector2d`](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) name type description font userdata font which will be used. text string text to measure. returns a 2d vector representing the width and height of the text. [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#draw-functions) draw functions: ------------------------------------------------------------------------------------------------------------------- circle-info these functions can only be invoked inside of the [render](https://astral-lua.gitbook.io/astral/documentation/events#render) event. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#push_clip_rect) push\_clip\_rect `render.push_clip_rect(pos: vector2d, size: vector2d)` name type description pos [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) position of the clipping rectangle. size [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) size of the clipping rectangle. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#pop_clip_rect) pop\_clip\_rect `render.pop_clip_rect()` ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#push_alpha_scale) push\_alpha\_scale `render.push_alpha_scale(scale: number)` name type description scale number alpha scale. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#pop_alpha_scale) pop\_alpha\_scale `render.pop_alpha_scale()` ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#push_rotation) push\_rotation `render.push_rotation(pivot: vector2d, degrees: number)` name type description pivot [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) the 2D point the rotation is performed around. degrees number the rotation angle, in degrees. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#pop_rotation) pop\_rotation `render.pop_rotation()` * * * ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#line) line `render.line(start: vector2d, end: vector2d, col: color[, thickness: number])` name type description start [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) start of the line. end [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) end of the line. col [color](https://astral-lua.gitbook.io/astral/documentation/classes/color) color of the line. thickness number optional. thickness of the line. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#text) text `render.text(font: userdata, text: string, pos: vector2d: col: color[, alignment: number])` name type description font userdata font which will be used. text string text to draw. pos [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) position of the text. col [color](https://astral-lua.gitbook.io/astral/documentation/classes/color) color of the text. alignment [e\_alignment](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_alignment) optional. text alignment rules. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#image) image `render.image(texture: userdata, pos: vector2d, size: vector2d, color: color)` name type description texture userdata image texture. pos [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) image position. size [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) image size. color [color](https://astral-lua.gitbook.io/astral/documentation/classes/color) image color. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#rect) rect `render.rect(pos: vector2d, size: vector2d, col: color[, rounding: number, flags: number])` name type description pos [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) position of the rectangle. size [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) size of the rectangle. col [color](https://astral-lua.gitbook.io/astral/documentation/classes/color) color of the rectangle rounding number optional. corner rounding. flags [e\_rounding](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_rounding) optional. corner rounding rules. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#filled_rect) filled\_rect `render.filled_rect(pos: vector2d, size: vector2d, col: color[, rounding: number, flags: number])` name type description pos [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) position of the rectangle. size [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) size of the rectangle. col [color](https://astral-lua.gitbook.io/astral/documentation/classes/color) color of the rectangle rounding number optional. corner rounding. flags [e\_rounding](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_rounding) optional. corner rounding rules. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#filled_gradient_rect) filled\_gradient\_rect `render.filled_gradient_rect(pos: vector2d, size: vector2d, col: color, col2: color[, horizontal: boolean, rounding: number, flags: number])` name type description pos [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) position of the rectangle. size [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) size of the rectangle. col [color](https://astral-lua.gitbook.io/astral/documentation/classes/color) start color of the gradient. col2 [color](https://astral-lua.gitbook.io/astral/documentation/classes/color) end color of the gradient. horizontal boolean optional. set to `false` for vertical grading. rounding number optional. corner rounding. flags [e\_rounding](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_rounding) optional. corner rounding rules. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#circle) circle `render.circle(pos: vector2d, radius: number, col: color[, thickness: number, start: number, end: number])` name type description pos [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) position of the circle. radius number radius of the circle. col [color](https://astral-lua.gitbook.io/astral/documentation/classes/color) color of the circle. thickness number optional. thickness of the circle. start number optional. start angle of the circle. end number optional. end angle of the circle. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#filled_circle) filled\_circle `render.filled_circle(pos: vector2d, radius: number, col: color[, start: number, end: number])` name type description pos [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) position of the circle. radius number radius of the circle. col [color](https://astral-lua.gitbook.io/astral/documentation/classes/color) color of the circle. start number optional. start angle of the circle. end number optional. end angle of the circle. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#triangle) triangle `render.triangle(pos1: vector2d, pos2: vector2d, pos3: vector2d, col: color)` name type description pos1 [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) first corner. pos2 [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) second corner. pos3 [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) third corner. col [color](https://astral-lua.gitbook.io/astral/documentation/classes/color) color of the triangle. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#filled_triangle) filled\_triangle `render.filled_triangle(pos1: vector2d, pos2: vector2d, pos3: vector2d, col: color)` name type description pos1 [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) first corner. pos2 [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) second corner. pos3 [vector2d](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) third corner. col [color](https://astral-lua.gitbook.io/astral/documentation/classes/color) color of the triangle. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#poly) poly `render.poly(points: table, col: color[, closed: boolean, thickness, number])` name type description points table table of 2d vectors. col [color](https://astral-lua.gitbook.io/astral/documentation/classes/color) color of the polygon. closed boolean optional. thickness number optional. thickness of the polygon. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#gradient_poly) gradient\_poly `render.gradient_poly(points: table>[, thickness: number])` name type description points table table of tables containing a 2d vector and a color. thickness number optional. thickness of the polygon. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#filled_poly) filled\_poly `render.filled_poly(points: table, col: color)` name type description points table table of 2d vectors. col [color](https://astral-lua.gitbook.io/astral/documentation/classes/color) color of the polygon. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#filled_gradient_poly) filled\_gradient\_poly `render.filled_gradient_poly(points: table>)` name type description points table table of tables containing a 2d vector and a color. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#filled_concave_poly) filled\_concave\_poly `render.filled_concave_poly(points: table, col: color)` name type description points table table of 2d vectors. col [color](https://astral-lua.gitbook.io/astral/documentation/classes/color) color of the polygon. draws a filled [concave polygonarrow-up-right](https://www.cuemath.com/geometry/concave-polygons/) . [Previousragechevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/rage) [Nextengine\_texture\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/render/engine_texture_t) Last updated 1 day ago * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#functions) * [get\_screen\_size](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#get_screen_size) * [get\_render\_scale](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#get_render_scale) * [create\_png](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#create_png) * [create\_png\_from\_memory](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#create_png_from_memory) * [create\_svg](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#create_svg) * [create\_svg\_from\_memory](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#create_svg_from_memory) * [create\_font](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#create_font) * [load\_engine\_image](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#load_engine_image) * [getting default fonts](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#getting-default-fonts) * [get\_text\_size](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#get_text_size) * [draw functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#draw-functions) * [push\_clip\_rect](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#push_clip_rect) * [pop\_clip\_rect](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#pop_clip_rect) * [push\_alpha\_scale](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#push_alpha_scale) * [pop\_alpha\_scale](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#pop_alpha_scale) * [push\_rotation](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#push_rotation) * [pop\_rotation](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#pop_rotation) * [line](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#line) * [text](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#text) * [image](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#image) * [rect](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#rect) * [filled\_rect](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#filled_rect) * [filled\_gradient\_rect](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#filled_gradient_rect) * [circle](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#circle) * [filled\_circle](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#filled_circle) * [triangle](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#triangle) * [filled\_triangle](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#filled_triangle) * [poly](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#poly) * [gradient\_poly](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#gradient_poly) * [filled\_poly](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#filled_poly) * [filled\_gradient\_poly](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#filled_gradient_poly) * [filled\_concave\_poly](https://astral-lua.gitbook.io/astral/documentation/namespaces/render#filled_concave_poly) sun-brightdesktopmoon sun-brightdesktopmoon --- # ui | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#functions) functions: ----------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#get_menu_pos) get\_menu\_pos `ui.get_menu_pos()` `:` [`vector2d`](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) returns the current menu position. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#get_menu_size) get\_menu\_size `ui.get_menu_size()` `:` [`vector2d`](https://astral-lua.gitbook.io/astral/documentation/classes/vector2d) returns the current menu size. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#get_menu_alpha) get\_menu\_alpha `ui.get_menu_alpha()` `:` `number` returns the current menu alpha represented as a 0-1 fraction. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#is_menu_open) is\_menu\_open `ui.is_menu_open()` `:` `boolean` returns `true` if the menu is open, otherwise returns `false`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#reference) reference `ui.reference(path: string)` `:` [`element_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) name type description path string path to the menu element. returns the menu element that corresponds to the specified path. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#get_binds) get\_binds `ui.get_binds()` `:` [`table`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/bind_t) returns a table of every **active** [keybind](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/bind_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#find_container) find\_container `ui.find_container(path: string)` `:` [`container_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t) name type description path string path to the menu containerr. returns the menu [container](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/container_t) that corresponds to the specified path. [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#menu-controls) menu controls: ------------------------------------------------------------------------------------------------------------- circle-info For bigger scripts there is a cleaner alternative using [containers](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#find_container) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_seperator) add\_seperator `ui.add_seperator(path: string)` `:` [`element_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) name type description path string path where the element will be placed. creates and returns a [seperator](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#element_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_label) add\_label `ui.add_label(path: string, name: string)` `:` [`element_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/element_t) name type description path string path where the element will be placed. name string name of the element creates and returns a [label](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#element_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_color_picker) add\_color\_picker `ui.add_color_picker(path: string, name: string)` `:` [`color_picker_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/color_picker_t) name type description path string path where the element will be placed. name string name of the element creates and returns a [color picker](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/color_picker_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_checkbox) add\_checkbox `ui.add_checkbox(path: string, name: string)` `:` [`checkbox_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/checkbox_t) name type description path string path where the element will be placed. name string name of the element. creates and returns a [checkbox](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/checkbox_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_slider) add\_slider `ui.add_slider(path: string, name: string, min: float, max: float[, step: float, trail: string, remap: table])` `:` [`slider_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/slider_t) name type description path string path where the element will be placed. name string name of the element min number minimum slider value max number maximum slider value step number optional. sets how many decimals the slider accepts. trail string optional. concatenate's a string at the end of the value (e.g "%"). remap table optional. table with number keys and strings as the definition. creates and returns a [slider](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/slider_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_dropdown) add\_dropdown `ui.add_dropdown(path: string, name: string, options: table)` `:` [`dropdown_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/dropdown_t) name type description path string path where the element will be placed. name string name of the element options table dropdown options. creates and returns a [dropdown](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/dropdown_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_multi_dropdown) add\_multi\_dropdown `ui.add_multi_dropdown(path: string, name: string, options: table)` `:` [`multi_dropdown_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/multi_dropdown_t) name type description path string path where the element will be placed. name string name of the element options table multi dropdown options. creates and returns a [multi dropdown](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/multi_dropdown_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_list_box) add\_list\_box `ui.add_list_box(path: string, name: string, options: table[, max_height: number, allow_search: boolean])` `:` [`list_box_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t) name type description path string path where the element will be placed. name string name of the element options table list box options. max\_height number optional. max listbox height in pixels. allow\_search boolean optional. appends a search bar to the list box. creates and returns a [list box](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/list_box_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_text_box) add\_text\_box `ui.add_text_box(path: string, name: string[, input_type: e_input_type, inline: boolean])` `:` [`text_box_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/text_box_t) name type description path string path where the element will be placed. name string name of the element. input\_type [e\_input\_type](https://astral-lua.gitbook.io/astral/documentation/enumerations/e_input_type) optional. defaults to `ALL`. inline boolean optional. creates and returns a [text box](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/text_box_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_button) add\_button `ui.add_button(path: string, name: string, callback: function)` `:` [`button_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/button_t) name type description path string path where the element will be placed. name string name of the element. callback function function which will be invoked on a press. creates and returns a [button](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/button_t) . ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_hotkey) add\_hotkey `ui.add_hotkey(path: string, name: string)` `:` [`hotkey_t`](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/hotkey_t) name type description path string path where the element will be placed. name string name of the element. creates and returns a [hotkey](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/hotkey_t) . [Previousbullet\_tchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/trace/bullet_t) [Nextcheckbox\_tchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui/checkbox_t) * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#functions) * [get\_menu\_pos](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#get_menu_pos) * [get\_menu\_size](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#get_menu_size) * [get\_menu\_alpha](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#get_menu_alpha) * [is\_menu\_open](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#is_menu_open) * [reference](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#reference) * [get\_binds](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#get_binds) * [find\_container](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#find_container) * [menu controls:](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#menu-controls) * [add\_seperator](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_seperator) * [add\_label](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_label) * [add\_color\_picker](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_color_picker) * [add\_checkbox](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_checkbox) * [add\_slider](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_slider) * [add\_dropdown](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_dropdown) * [add\_multi\_dropdown](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_multi_dropdown) * [add\_list\_box](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_list_box) * [add\_text\_box](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_text_box) * [add\_button](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_button) * [add\_hotkey](https://astral-lua.gitbook.io/astral/documentation/namespaces/ui#add_hotkey) sun-brightdesktopmoon sun-brightdesktopmoon --- # math | Astral [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#functions) functions: ------------------------------------------------------------------------------------------------------- ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#abs) abs `math.abs(x: number)` `:` `number` name type description x number number returns the absolute value of `x`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#acos) acos `math.acos(x: number)` `:` `number` name type description x number number returns the arc cosine of `x` (in radians). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#asin) asin `math.asin(x: number)` `:` `number` name type description x number number returns the arc sine of `x` (in radians). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#atan) atan `math.atan(x: number)` `:` `number` name type description x number number returns the arc tangent of `x` (in radians). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#atan2) atan2 `math.atan2(x: number, y: number)` `:` `number` name type description x number number y number number returns the arc tangent of `x` and `y` (in radians), but uses the signs of both parameters to find the quadrant of the result. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#ceil) ceil `math.ceil(x: number)` `:` `number` name type description x number number returns the smallest integer larger than or equal to `x`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#cos) cos `math.cos(x: number)` `:` `number` name type description x number number returns the cosine of `x` (assumed to be in radians). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#cosh) cosh `math.cosh(x: number)` `:` `number` name type description x number number returns the hyperbolic cosine of `x`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#deg) deg `math.deg(x: number)` `:` `number` name type description x number number returns the angle `x` (given in radians) in degrees. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#exp) exp `math.exp(x: number)` `:` `number` name type description x number number returns the value e power `x`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#floor) floor `math.floor(x: number)` `:` `number` name type description x number number returns the largest integer smaller than or equal to `x`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#fmod) fmod `math.fmod(x: number, y: number)` `:` `number` name type description x number number y number number returns the remainder of the division of `x` by `y` that rounds the quotient towards zero. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#frexp) frexp `math.frexp(x: number)` `:` `number, number` name type description x number number returns `m` and `e` such that `x = m2e`, `e` is an integer and the absolute value of `m` is in the range `[0.5, 1]` (or zero when `x` is zero). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#huge) huge `math.huge` `:` `number` the value `HUGE_VAL`, a value larger than or equal to any other numerical value. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#idexp) idexp `math.idexp(x: number, e: number)` `:` `number` name type description x number number e number number returns `m2e` (`e` should be an integer). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#log) log `math.log(x: number)` `:` `number` name type description x number number returns the natural logarithm of `x`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#log10) log10 `math.log10(x: number)` `:` `number` name type description x number number returns the base-10 logarithm of `x`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#max) max `math.max(x: number[, ...])` `:` `number` name type description x number number ... comma-separated numbers to concatenate with `x` returns the maximum value among its arguments. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#min) min `math.min(x: number[, ...])` `:` `number` name type description x number number ... comma-separated numbers to concatenate with `x` returns the minimum value among its arguments. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#modf) modf `math.abs(x: number)` `:` `number` name type description x number number returns two numbers, the integral part of `x` and the fractional part of `x`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#pi) pi `math.pi` `:` `number` the value of pi. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#pow) pow `math.pow(x: number, y: number)` `:` `number` name type description x number number y number number returns `x^y`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#rad) rad `math.rad(x: number)` `:` `number` name type description x number number returns the angle `x` (given in degrees) in radians. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#random) random `math.random([m [, n]])` `:` `number` name type description m number number n number number this function is an interface to the simple pseudo-random generator function rand provided by ANSI C. when called without arguments, returns a uniform pseudo-random real number in the range `[0,1]`. when called with an integer number `m`, `math.random` returns a uniform pseudo-random integer in the range `[1, m]`. when called with two integer numbers `m` and `n`, math.random returns a uniform pseudo-random integer in the range `[m, n]`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#sin) sin `math.sin(x: number)` `:` `number` name type description x number number returns the sine of `x` (assumed to be in radians). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#sin-1) sin `math.sin(x: number)` `:` `number` name type description x number number returns the hyperbolic sine of `x`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#sqrt) sqrt `math.sqrt(x: number)` `:` `number` name type description x number number returns the square root of `x`. (formula: `x^0.5`) ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#tan) tan `math.tan(x: number)` `:` `number` name type description x number number returns the tangent of `x` (assumed to be in radians). ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#tanh) tanh `math.tanh(x: number)` `:` `number` name type description x number number returns the hyperbolic tangent of `x`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#get_fov) get\_fov forward vector approach qangle approach `math.get_fov(origin: vector, forward: vector, point: vector)` `:` `number` name type description origin vector start position. forward vector forward vector. point vector point. `math.get_fov(origin: vector, angles: qangle, point: vector)` `:` `number` name type description origin vector start position. angles qangle point vector point. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#normalized_angle) normalized\_angle `math.normalized_angle(angle: number)` `:` `number` name type description angle number returns the normalized angle value. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#angle_diff) angle\_diff `math.angle_diff(src: number, dest: number)` `:` `number` name type description src number first angle. dest number second angle. measures the difference between two angles. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#approach_angle) approach\_angle `math.approach_angle(target: number, value: number, speed: number)` `:` `number` name type description target number the desired angle to approach in degrees. value number the current angle in degrees. speed number the maximum change allowed this update. returns a new angle that has moved from `value` toward `target` without exceeding `speed`. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#get_closest_point_on_ray) get\_closest\_point\_on\_ray `math.get_closest_point_on_ray(start: vector, direction: vector, point: vector)` `:` [`vector`](https://astral-lua.gitbook.io/astral/documentation/classes/vector) name type description start [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) direction [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) point [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) returns the closest point to a ray. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#get_closest_point_on_plane) get\_closest\_point\_on\_plane `math.get_closest_point_on_plane(start: vector, direction: vector, point: vector)` `:` [`vector`](https://astral-lua.gitbook.io/astral/documentation/classes/vector) name type description start [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) direction [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) point [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) returns the closest point to a plane. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#get_closest_point_on_ray_to_ray) get\_closest\_point\_on\_ray\_to\_ray `math.get_closest_point_on_ray_to_ray(pos1: vector, dir: vector, pos2: vector[, max_length: number])` `:` [`vector`](https://astral-lua.gitbook.io/astral/documentation/classes/vector) name type description pos1 [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) first position. dir [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) direction. pos2 [vector](https://astral-lua.gitbook.io/astral/documentation/classes/vector) second position. max\_length number optional. returns the closest point on a ray to a ray. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#clamp) clamp `math.clamp(value: number, min: value, max: value)` `:` `number` name type description value number current value. min number minimum value. max number maximum value. clamps a number between two given values. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#lerp) lerp `math.lerp(value: number, target: number, weight: number)` `:` `number` name type description value number initial value. target number target value. weight number 0-1 fraction. interpolates a number between the given values. ### [hashtag](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#remap) remap `math.remap(value: number, a: number, b: number, c: number, d: number)` `:` `number` name type description value number initial value a number b number c number d number remaps a number from the current values. [Previouslegitchevron-left](https://astral-lua.gitbook.io/astral/documentation/namespaces/legit) [Nextnet\_chanchevron-right](https://astral-lua.gitbook.io/astral/documentation/namespaces/net_chan) * [functions:](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#functions) * [abs](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#abs) * [acos](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#acos) * [asin](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#asin) * [atan](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#atan) * [atan2](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#atan2) * [ceil](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#ceil) * [cos](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#cos) * [cosh](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#cosh) * [deg](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#deg) * [exp](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#exp) * [floor](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#floor) * [fmod](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#fmod) * [frexp](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#frexp) * [huge](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#huge) * [idexp](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#idexp) * [log](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#log) * [log10](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#log10) * [max](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#max) * [min](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#min) * [modf](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#modf) * [pi](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#pi) * [pow](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#pow) * [rad](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#rad) * [random](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#random) * [sin](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#sin) * [sin](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#sin-1) * [sqrt](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#sqrt) * [tan](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#tan) * [tanh](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#tanh) * [get\_fov](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#get_fov) * [normalized\_angle](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#normalized_angle) * [angle\_diff](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#angle_diff) * [approach\_angle](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#approach_angle) * [get\_closest\_point\_on\_ray](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#get_closest_point_on_ray) * [get\_closest\_point\_on\_plane](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#get_closest_point_on_plane) * [get\_closest\_point\_on\_ray\_to\_ray](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#get_closest_point_on_ray_to_ray) * [clamp](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#clamp) * [lerp](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#lerp) * [remap](https://astral-lua.gitbook.io/astral/documentation/namespaces/math#remap) sun-brightdesktopmoon sun-brightdesktopmoon ---