# Table of Contents - [Welcome | Neverlose](#welcome-neverlose) - [Common knowledge | Neverlose](#common-knowledge-neverlose) - [Quick start | Neverlose](#quick-start-neverlose) - [Examples | Neverlose](#examples-neverlose) - [Vector | Neverlose](#vector-neverlose) - [Color | Neverlose](#color-neverlose) - [ESP | Neverlose](#esp-neverlose) - [Materials | Neverlose](#materials-neverlose) - [ConVars | Neverlose](#convars-neverlose) - [UI | Neverlose](#ui-neverlose) - [Variables | Neverlose](#variables-neverlose) - [db | Neverlose](#db-neverlose) - [cvar | Neverlose](#cvar-neverlose) - [Events | Neverlose](#events-neverlose) - [json | Neverlose](#json-neverlose) - [bit | Neverlose](#bit-neverlose) - [common | Neverlose](#common-neverlose) - [files | Neverlose](#files-neverlose) - [network | Neverlose](#network-neverlose) - [events | Neverlose](#events-neverlose) - [esp | Neverlose](#esp-neverlose) - [globals | Neverlose](#globals-neverlose) - [panorama | Neverlose](#panorama-neverlose) - [color | Neverlose](#color-neverlose) - [materials | Neverlose](#materials-neverlose) - [_G | Neverlose](#-g-neverlose) - [rage | Neverlose](#rage-neverlose) - [math | Neverlose](#math-neverlose) - [vector | Neverlose](#vector-neverlose) - [utils | Neverlose](#utils-neverlose) - [entity | Neverlose](#entity-neverlose) - [ui | Neverlose](#ui-neverlose) - [render | Neverlose](#render-neverlose) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Quick start | Neverlose](#quick-start-neverlose) - [Events | Neverlose](#events-neverlose) --- # Welcome | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/readme.md) . ![](https://docs-csgo.neverlose.cc/~gitbook/image?url=https%3A%2F%2F3594665820-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F37PG3extaxoGL9yvcP52%252Fuploads%252Fgit-blob-ad4a5f975f48e44b83ae58878e94dc0ee1652235%252Flogo.png%3Falt%3Dmedia&width=768&dpr=3&quality=100&sign=d8baa817&sv=2) [](https://docs-csgo.neverlose.cc/#about) About ---------------------------------------------------- Neverlose is a unique software providing huge functionality and easy setup, with a fast and friendly support team. [](https://docs-csgo.neverlose.cc/#getting-started) Getting Started ------------------------------------------------------------------------ For information on how to get started with lua scripting, check out the link below. [📲Quick start](https://docs-csgo.neverlose.cc/useful-information/quick-start) [](https://docs-csgo.neverlose.cc/#current-features) Current features -------------------------------------------------------------------------- Library Description [LuaJIT 2.1.0](https://github.com/LuaJIT/LuaJIT) LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language. [FFI](https://luajit.org/ext_ffi.html) The FFI library allows calling external C functions and using C data structures from pure Lua code. [BIT](https://bitop.luajit.org/api.html) BitOp is a C extension module for Lua which adds bitwise operations on numbers. [](https://docs-csgo.neverlose.cc/#disclaimer) Disclaimer -------------------------------------------------------------- Arguments in square brackets are optional. [](https://docs-csgo.neverlose.cc/#documentation-errors) Documentation errors ---------------------------------------------------------------------------------- This documentation was made by Salvatore and Serene. Please report any errors in the documentation either to us in a private message on the forum or to Serene#1337 on Discord. [NextQuick start](https://docs-csgo.neverlose.cc/useful-information/quick-start) Last updated 2 years ago * [About](https://docs-csgo.neverlose.cc/#about) * [Getting Started](https://docs-csgo.neverlose.cc/#getting-started) * [Current features](https://docs-csgo.neverlose.cc/#current-features) * [Disclaimer](https://docs-csgo.neverlose.cc/#disclaimer) * [Documentation errors](https://docs-csgo.neverlose.cc/#documentation-errors) --- # Common knowledge | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/useful-information/common-knowledge.md) . ### [](https://docs-csgo.neverlose.cc/useful-information/common-knowledge#script-location) Script location Neverlose scripts are located in the `Counter-Strike Global Offensive\nl` directory. There's no need to back up your scripts - they are automatically synchronized and stored on the Neverlose servers. ### [](https://docs-csgo.neverlose.cc/useful-information/common-knowledge#script-environment) Script environment Each script runs in it's own separate environment. This means that global variables can not be reused between scripts. [PreviousQuick start](https://docs-csgo.neverlose.cc/useful-information/quick-start) [NextExamples](https://docs-csgo.neverlose.cc/useful-information/script-examples) Last updated 2 years ago * [Script location](https://docs-csgo.neverlose.cc/useful-information/common-knowledge#script-location) * [Script environment](https://docs-csgo.neverlose.cc/useful-information/common-knowledge#script-environment) --- # Quick start | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/useful-information/quick-start.md) . [](https://docs-csgo.neverlose.cc/useful-information/quick-start#text-editor) 📋 Text editor ------------------------------------------------------------------------------------------------- The best text editors make it simple and easy to code without formatting issues corrupting it. Text editor Link 🥇 Visual Studio Code [code.visualstudio.com](https://code.visualstudio.com/) 🥈 Sublime Text [sublimetext.com](https://www.sublimetext.com/) 🥉 Notepad++ [notepad-plus-plus.org](https://notepad-plus-plus.org/) [](https://docs-csgo.neverlose.cc/useful-information/quick-start#beginners-guide) 🔰 Beginner's guide ---------------------------------------------------------------------------------------------------------- If you're new to Lua scripting, we'd recommend to take a look at the «[Lua in 5 minutes](https://learnxinyminutes.com/docs/lua/) » guide [](https://docs-csgo.neverlose.cc/useful-information/quick-start#learn-more) 📘 Learn more ----------------------------------------------------------------------------------------------- [⛩️Common knowledge](https://docs-csgo.neverlose.cc/useful-information/common-knowledge) [🧠Examples](https://docs-csgo.neverlose.cc/useful-information/script-examples) [PreviousWelcome](https://docs-csgo.neverlose.cc/) [NextCommon knowledge](https://docs-csgo.neverlose.cc/useful-information/common-knowledge) Last updated 4 years ago * [📋 Text editor](https://docs-csgo.neverlose.cc/useful-information/quick-start#text-editor) * [🔰 Beginner's guide](https://docs-csgo.neverlose.cc/useful-information/quick-start#beginners-guide) * [📘 Learn more](https://docs-csgo.neverlose.cc/useful-information/quick-start#learn-more) --- # Examples | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/useful-information/script-examples.md) . [⚙️Materials](https://docs-csgo.neverlose.cc/useful-information/script-examples/materials) [⚙️Color](https://docs-csgo.neverlose.cc/useful-information/script-examples/color) [⚙️Vector](https://docs-csgo.neverlose.cc/useful-information/script-examples/vector) [⚙️ESP](https://docs-csgo.neverlose.cc/useful-information/script-examples/esp) [⚙️ConVars](https://docs-csgo.neverlose.cc/useful-information/script-examples/convars) [⚙️UI](https://docs-csgo.neverlose.cc/useful-information/script-examples/ui) [PreviousCommon knowledge](https://docs-csgo.neverlose.cc/useful-information/common-knowledge) [NextMaterials](https://docs-csgo.neverlose.cc/useful-information/script-examples/materials) Last updated 3 years ago --- # Vector | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/useful-information/script-examples/vector.md) . ### [](https://docs-csgo.neverlose.cc/useful-information/script-examples/vector#closest-enemy-to-crosshair) Closest Enemy To Crosshair Copy -- You can create your own vector objects -- All vectors are 3D local vec = vector(1, 2, 3) -- There are 3 fields you can access: "x", "y", and "z" print(string.format("x: %.2f, y: %.2f, z: %.2f", vec.x, vec.y, vec.z)) -- You can also set them vec.x, vec.y, vec.z = 0, 0, 0 events.render:set(function() -- All vectors are 3D, even the ones you'd expect to be 2D local screen_center = render.screen_size() * 0.5 local local_player = entity.get_local_player() if not local_player or not local_player:is_alive() then return end local camera_position = render.camera_position() -- Even angles are 3D vectors -- x is pitch, y is yaw, z is roll local camera_angles = render.camera_angles() -- Let's convert it to a forward vector though local direction = vector():angles(camera_angles) local closest_distance, closest_enemy = math.huge for _, enemy in ipairs(entity.get_players(true)) do local head_position = enemy:get_hitbox_position(1) local ray_distance = head_position:dist_to_ray( camera_position, direction ) if ray_distance < closest_distance then closest_distance = ray_distance closest_enemy = enemy end end if not closest_enemy then return end render.text( 1, vector(screen_center.x, screen_center.y + 20), color(), "cd", string.format( "Closest enemy to crosshair: %s", closest_enemy:get_name() ) ) end) ![](https://docs-csgo.neverlose.cc/~gitbook/image?url=https%3A%2F%2F3594665820-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F37PG3extaxoGL9yvcP52%252Fuploads%252Ffmr3n8x2FmjyFd7nGF0r%252Fcsgo_Xr1Yi9P4jR.gif%3Falt%3Dmedia%26token%3Da31651bb-ad32-44fc-89cc-79801ea52213&width=768&dpr=3&quality=100&sign=d05f79&sv=2) Preview [PreviousColor](https://docs-csgo.neverlose.cc/useful-information/script-examples/color) [NextESP](https://docs-csgo.neverlose.cc/useful-information/script-examples/esp) Last updated 3 years ago --- # Color | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/useful-information/script-examples/color.md) . ### [](https://docs-csgo.neverlose.cc/useful-information/script-examples/color#color-pseudocode) Color Pseudocode Copy -- Colors have a flexible constructor local foo = color(255, 0, 0, 255) local bar = color("#00FF00FF") -- There are 4 fields you can access: "r", "g", "b", and "a" print(string.format("r: %d, g: %d, b: %d, a: %d", foo.r, foo.g, foo.b, foo.a)) -- You can also set them by manually indexing them like so foo.r, foo.g, foo.b, foo.a = 0, 0, 255, 200 -- or by initializing it with several functions that our API has to offer foo:as_fraction(1, 0, 1, 1) -- There are a lot of built-in ways to interpret colors print(bar) --> color(0, 255, 0, 255) print(foo:to_hex()) --> FF0000FF print(string.format("r: %d, g: %d, b: %d, a: %d", foo:unpack())) -- Learn more at Variables -> color [PreviousMaterials](https://docs-csgo.neverlose.cc/useful-information/script-examples/materials) [NextVector](https://docs-csgo.neverlose.cc/useful-information/script-examples/vector) Last updated 3 years ago --- # ESP | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/useful-information/script-examples/esp.md) . ### [](https://docs-csgo.neverlose.cc/useful-information/script-examples/esp#text-example) Text Example Copy local low_health = 20 local text_example = esp.enemy:new_text("Text Example", "LOW HP", function(player) local health = player.m_iHealth if health > low_health then return end return "LOW HP" end) local group_ref = text_example:create() local slider_ref = group_ref:slider("Low Health", 0, 50, low_health) slider_ref:set_callback(function(slider_ref) low_health = slider_ref:get() end, true) ![](https://docs-csgo.neverlose.cc/~gitbook/image?url=https%3A%2F%2F3594665820-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F37PG3extaxoGL9yvcP52%252Fuploads%252FFf57qT0jvvKLhwmYvZgY%252Fcsgo_0jcVGTij8B.gif%3Falt%3Dmedia%26token%3D01a35d2e-0db6-4e8a-8f51-ac53da53a670&width=768&dpr=3&quality=100&sign=4f95e63e&sv=2) ### [](https://docs-csgo.neverlose.cc/useful-information/script-examples/esp#bar-example) Bar Example ### [](https://docs-csgo.neverlose.cc/useful-information/script-examples/esp#item-example) Item Example [PreviousVector](https://docs-csgo.neverlose.cc/useful-information/script-examples/vector) [NextConVars](https://docs-csgo.neverlose.cc/useful-information/script-examples/convars) Last updated 3 years ago * [Text Example](https://docs-csgo.neverlose.cc/useful-information/script-examples/esp#text-example) * [Bar Example](https://docs-csgo.neverlose.cc/useful-information/script-examples/esp#bar-example) * [Item Example](https://docs-csgo.neverlose.cc/useful-information/script-examples/esp#item-example) Copy local bar_example = esp.enemy:new_bar("Bar Example", function(player) local velocity = player.m_vecVelocity local speed = velocity:length() if speed < 2 then return end local max_speed = 260 local weapon = player:get_player_weapon() if weapon then max_speed = weapon:get_max_speed() end return speed / max_speed * 100 end) Copy local item_example = esp.enemy:new_item("Item Example") local item_example_group_ref = item_example:create() local switch_ref = item_example_group_ref:switch("Switch") events.render:set(function() print(string.format("Item Example Selected: %s", item_example:get())) print(string.format("Switch Enabled: %s", switch_ref:get())) end) --- # Materials | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/useful-information/script-examples/materials.md) . Copy local var_flags = { ["DEBUG"] = 0, ["NO_DEBUG_OVERRIDE"] = 1, ["NO_DRAW"] = 2, ["USE_IN_FILLRATE_MODE"] = 3, ["VERTEXCOLOR"] = 4, ["VERTEXALPHA"] = 5, ["SELFILLUM"] = 6, ["ADDITIVE"] = 7, ["ALPHATEST"] = 8, ["MULTIPASS"] = 9, ["ZNEARER"] = 10, ["MODEL"] = 11, ["FLAT"] = 12, ["NOCULL"] = 13, ["NOFOG"] = 14, ["IGNOREZ"] = 15, ["DECAL"] = 16, ["ENVMAPSPHERE"] = 17, ["NOALPHAMOD"] = 18, ["ENVMAPCAMERASPACE"] = 19, ["BASEALPHAENVMAPMASK"] = 20, ["TRANSLUCENT"] = 21, ["NORMALMAPALPHAENVMAPMASK"] = 22, ["NEEDS_SOFTWARE_SKINNING"] = 23, ["OPAQUETEXTURE"] = 24, ["ENVMAPMODE"] = 25, ["SUPPRESS_DECALS"] = 26, ["HALFLAMBERT"] = 27, ["WIREFRAME"] = 28, ["ALLOWALPHATOCOVERAGE"] = 29, ["IGNORE_ALPHA_MODULATION"] = 30, ["VERTEXFOG"] = 31 } local var_flags_names = {} for var_flag_name in pairs(var_flags) do var_flags_names[#var_flags_names + 1] = var_flag_name end table.sort(var_flags_names) local group_ref = ui.find("Visuals", "Players", "Self", "Chams", "Weapon"):create() local var_flags_ref = group_ref:listable("Var Flags", var_flags_names) var_flags_ref:set_callback(function(var_flags_ref) local selected_var_flags = {} for _, selected_index in ipairs(var_flags_ref:get()) do local var_flag_name = var_flags_names[selected_index] local var_flag = var_flags[var_flag_name] selected_var_flags[#selected_var_flags + 1] = var_flag end for _, mat in ipairs(materials.get_materials("neverlose/self/weapon")) do for _, var_flag in pairs(var_flags) do mat:var_flag(var_flag, false) end for _, var_flag in ipairs(selected_var_flags) do mat:var_flag(var_flag, true) end end end, true) events.shutdown:set(function() for _, mat in ipairs(materials.get_materials("neverlose/self/weapon")) do mat:reset() end end) [PreviousExamples](https://docs-csgo.neverlose.cc/useful-information/script-examples) [NextColor](https://docs-csgo.neverlose.cc/useful-information/script-examples/color) Last updated 3 years ago --- # ConVars | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/useful-information/script-examples/convars.md) . ### [](https://docs-csgo.neverlose.cc/useful-information/script-examples/convars#execute) Execute > ℹ️ Force full-update > > ℹ️ Turn up player footstep volume Copy -- Initialize the cvar objects local cl_fullupdate = cvar.cl_fullupdate local snd_setmixer = cvar.snd_setmixer -- Invoke the callback cl_fullupdate:call() -- Adjust players’ step volume by setting the mixer volume to 1.2 snd_setmixer:call('GlobalFootsteps', 'vol', 1.2) ### [](https://docs-csgo.neverlose.cc/useful-information/script-examples/convars#getting-setting-values) Getting / Setting values > ℹ️ Override maximum fake-lag limit Copy -- Initialize the cvar objects local process_ticks = cvar.sv_maxusrcmdprocessticks -- [60]: New value | [true]: Sets the raw value process_ticks:int(60, true) ### [](https://docs-csgo.neverlose.cc/useful-information/script-examples/convars#callbacks) Callbacks > ℹ️ Instantly crash the server if someones changes the `sv_cheats` cvar to 1 > > ℹ️ Refuse the connection to the server if the IP is blacklisted [PreviousESP](https://docs-csgo.neverlose.cc/useful-information/script-examples/esp) [NextUI](https://docs-csgo.neverlose.cc/useful-information/script-examples/ui) Last updated 3 years ago * [Execute](https://docs-csgo.neverlose.cc/useful-information/script-examples/convars#execute) * [Getting / Setting values](https://docs-csgo.neverlose.cc/useful-information/script-examples/convars#getting-setting-values) * [Callbacks](https://docs-csgo.neverlose.cc/useful-information/script-examples/convars#callbacks) Copy cvar.sv_cheats:set_callback(function(cvar_obj, old_value, new_value) if tonumber(old_value) == 0 and tonumber(new_value) == 1 then -- invoke ent_create convar callback with "weapon_ak47" argument -- cvar.ent_create:call 'weapon_ak47' cvar.clear:call() print '\aFF697Asv_cheats was updated. Crashing the server.' utils.console_exec 'ent_create weapon_ak47' end end) cvar.connect:set_callback(function(cvar_obj, args) if args[1] == '127.0.0.1' then return false end end) --- # UI | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/useful-information/script-examples/ui.md) . ### [](https://docs-csgo.neverlose.cc/useful-information/script-examples/ui#ui-pseudocode) UI Pseudocode Copy -- Pseudocode that shows most of the ui functions and how to use them -- If you want to get a reference to an existing group or item, call .find local double_tap_ref = ui.find("aimbot", "ragebot", "main", "double tap") -- "ui.create" creates a group -- in which you can add items such as switches, sliders, combos, etc. local group_ref = ui.create("Group") -- Some arguments can be optional, like the 2nd one in this function, -- it will make its default value true local switch_ref = group_ref:switch("Switch", true) -- You can change its value switch_ref:set(false) -- Or you can "override" its value -- This will allow you to change the value of the item -- without changing its value in the menu or in the cheat's configuration switch_ref:override(true) -- Reset the previous override switch_ref:override() -- You can register a function that will be executed -- every time the value of the item changes -- The reference can be accessed from the arguments of the callback switch_ref:set_callback(function(ref) -- You can access the value of the item by calling :get -- To access the value it's overriden to with :override, call :get_override print(string.format("New value: %s", ref:get())) end) -- If you want to what type of object the item is, you can call :get_type -- print(switch_ref:type()) --> switch -- You can attach other items to some types of items by calling :create -- This will create and return a reference to the item group, -- to which you can add other items local switch_group_ref = switch_ref:create() -- Our API offers a lot of overloads, you can either just provide a bunch of strings -- or you can provide a table of strings local combo_ref = switch_group_ref:combo("Combo", "Option A", "Option B", "Option C") -- You can update the contents of combos, selectables, list, and listables with :update combo_ref:update({"Option A"}) -- You can attach color pickers to some types of items, -- but keep in mind that you won't be able to attach a group at the same time local combo_color_picker_ref = combo_ref:color_picker(color(255, 0, 0, 255)) -- If you want to see what group the item belongs to, call :parent -- print(group_ref == switch_ref:parent()) --> true -- print(switch_group_ref == combo_ref:parent()) --> true -- If you want to describe an item, you can call :tooltip, -- which will display a text when you move the cursor over the item switch_ref:tooltip("Some useful information.") -- Further reading: -- https://lua.neverlose.cc/documentation/variables/ui -- DM Serene#1337 for any documentation errors ### [](https://docs-csgo.neverlose.cc/useful-information/script-examples/ui#multi-color-picker) Multi-Color Picker [PreviousConVars](https://docs-csgo.neverlose.cc/useful-information/script-examples/convars) [NextEvents](https://docs-csgo.neverlose.cc/documentation/events) Last updated 3 years ago * [UI Pseudocode](https://docs-csgo.neverlose.cc/useful-information/script-examples/ui#ui-pseudocode) * [Multi-Color Picker](https://docs-csgo.neverlose.cc/useful-information/script-examples/ui#multi-color-picker) Copy -- create a group local group_ref = ui.create("Example Group") -- create a color picker in the group local color_picker_ref = group_ref:color_picker("Example Color Picker", { ["Simple"] = { color(255, 255, 255) }, ["Double"] = { color(255, 255, 255), color(0, 0, 0) }, ["Multiple"] = { color(255, 0, 0), color(0, 255, 0), color(0, 0, 255), color(255, 0, 255) }, }) -- print the available modes for _, v in ipairs(color_picker_ref:list()) do print(v) -- [neverlose] Simple -- [neverlose] Multiple -- [neverlose] Double end events.render(function() -- get the currently selected mode and color(s) -- (the second returned value can be a table) local mode, colors = color_picker_ref:get() print(mode) -- get colors from a specific mode local top_left, top_right, bottom_left, bottom_right = unpack(color_picker_ref:get("Multiple")) render.gradient( vector(20, 20), vector(120, 120), top_left, top_right, bottom_left, bottom_right ) end) --- # Variables | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables.md) . [🌎\_G](https://docs-csgo.neverlose.cc/documentation/variables/_g) [🗄️bit](https://docs-csgo.neverlose.cc/documentation/variables/bit) [🌈color](https://docs-csgo.neverlose.cc/documentation/variables/color) [⌚common](https://docs-csgo.neverlose.cc/documentation/variables/common) [🎲cvar](https://docs-csgo.neverlose.cc/documentation/variables/cvar) [💾db](https://docs-csgo.neverlose.cc/documentation/variables/db) [👾entity](https://docs-csgo.neverlose.cc/documentation/variables/entity) [👩‍💻esp](https://docs-csgo.neverlose.cc/documentation/variables/esp) [🗳️events](https://docs-csgo.neverlose.cc/documentation/variables/events) [📂files](https://docs-csgo.neverlose.cc/documentation/variables/files) [📎globals](https://docs-csgo.neverlose.cc/documentation/variables/globals) [🔓json](https://docs-csgo.neverlose.cc/documentation/variables/json) [✨materials](https://docs-csgo.neverlose.cc/documentation/variables/materials) [🔢math](https://docs-csgo.neverlose.cc/documentation/variables/math) [💻ui](https://docs-csgo.neverlose.cc/documentation/variables/ui) [☁️network](https://docs-csgo.neverlose.cc/documentation/variables/network) [🌃panorama](https://docs-csgo.neverlose.cc/documentation/variables/panorama) [💢rage](https://docs-csgo.neverlose.cc/documentation/variables/rage) [🎨render](https://docs-csgo.neverlose.cc/documentation/variables/render) [🧰utils](https://docs-csgo.neverlose.cc/documentation/variables/utils) [📍vector](https://docs-csgo.neverlose.cc/documentation/variables/vector) [PreviousEvents](https://docs-csgo.neverlose.cc/documentation/events) [Next\_G](https://docs-csgo.neverlose.cc/documentation/variables/_g) Last updated 4 years ago --- # db | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/db.md) . ### [](https://docs-csgo.neverlose.cc/documentation/variables/db#utilizing-database) Utilizing database `db.key_name:` `any` `db.key_name = value` Name Type Description **key\_name** `**any**` Name of the key **value** `**any**` Value the key should be set to. This can be anything that can be sanitized (no functions, userdata) Indexing database keys is a heavy process. Do not do it inside callbacks that are called a lot of times per second. Copy -- look up for database key named "test" -- returns the new table if database returned nil local data = db.test or { } data.name = 'Salvatore' data.project = 'Spirthack Innovations LLC' events.shutdown:set(function() -- replace "test" key with the new value db.test = data end) [Previouscvar](https://docs-csgo.neverlose.cc/documentation/variables/cvar) [Nextentity](https://docs-csgo.neverlose.cc/documentation/variables/entity) Last updated 4 years ago --- # cvar | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/cvar.md) . ### [](https://docs-csgo.neverlose.cc/documentation/variables/cvar#example) Example Copy cvar.mp_teammates_are_enemies:int(1) cvar.clear:call() [](https://docs-csgo.neverlose.cc/documentation/variables/cvar#functions) Functions: ----------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/cvar#call) :call `cvar_object:call(...)` Name Type Description ... Arguments passed to the callback Executes a ConCommand or cvar callback, passing its arguments to it. ### [](https://docs-csgo.neverlose.cc/documentation/variables/cvar#int) :int Get value Set value `cvar_object:int():` `number` `cvar_object:int(value: number[, raw: boolean ])` Name Type Description **value** `**number**` New int value **raw** `**boolean**` Optional. If `true` then the `raw` value will be set Gets or sets the ConVar int value. ### [](https://docs-csgo.neverlose.cc/documentation/variables/cvar#float) :float Get value Set value `cvar_object:float():` `number` `cvar_object:float(value: number[, raw: boolean ])` Name Type Description **value** `**number**` New float value **raw** `**boolean**` Optional. If `true` then the `raw` value will be set Gets or sets the ConVar float value. ### [](https://docs-csgo.neverlose.cc/documentation/variables/cvar#string) :string `cvar_object:string([ value: any ]):` `string` Name Type Description **value** `**any**` New string value. If not specified then returns the string value of the ConVar Gets or sets the ConVar string value. ### [](https://docs-csgo.neverlose.cc/documentation/variables/cvar#set_callback) :set\_callback ConVar Command You can access the `cvar_object`, `old_value` and `new_value` by adding them to the function arguments. You can access the `cvar_object` and `args` by adding them to the function arguments. Inside the callback, return false to prevent the command from being executed. `cvar_object:set_callback(callback: function)` Name Type Description **callback** `**function**` Lua function to call Registers the callback to the specified ConVar/Command. The registered function will be called every time the specified convar value is updated. ### [](https://docs-csgo.neverlose.cc/documentation/variables/cvar#unset_callback) :unset\_callback `cvar_object:unset_callback(callback: function)` Name Type Description **callback** `**function**` Lua function that was passed to the `:set_callback` function Unregisters the callback that was set via the `:set_callback` function from the specified ConVar/Command. [Previouscommon](https://docs-csgo.neverlose.cc/documentation/variables/common) [Nextdb](https://docs-csgo.neverlose.cc/documentation/variables/db) Last updated 3 years ago * [Example](https://docs-csgo.neverlose.cc/documentation/variables/cvar#example) * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/cvar#functions) * [:call](https://docs-csgo.neverlose.cc/documentation/variables/cvar#call) * [:int](https://docs-csgo.neverlose.cc/documentation/variables/cvar#int) * [:float](https://docs-csgo.neverlose.cc/documentation/variables/cvar#float) * [:string](https://docs-csgo.neverlose.cc/documentation/variables/cvar#string) * [:set\_callback](https://docs-csgo.neverlose.cc/documentation/variables/cvar#set_callback) * [:unset\_callback](https://docs-csgo.neverlose.cc/documentation/variables/cvar#unset_callback) --- # Events | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/events.md) . [](https://docs-csgo.neverlose.cc/documentation/events#list-of-game-events) List of game events: ----------------------------------------------------------------------------------------------------- In order to reference an event, index the `events` namespace with an event name [![Logo](https://docs-csgo.neverlose.cc/~gitbook/image?url=https%3A%2F%2Fwiki.alliedmods.net%2Ffavicon.ico&width=20&dpr=3&quality=100&sign=600f77c0&sv=2)Counter-Strike: Global Offensive Events - AlliedModders Wikiwiki.alliedmods.net](https://wiki.alliedmods.net/Counter-Strike:_Global_Offensive_Events) Official CS:GO events [](https://docs-csgo.neverlose.cc/documentation/events#list-of-events) List of events: ------------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/events#render) render Fired every frame. Most functions from the [`render`](https://docs-csgo.neverlose.cc/documentation/variables/render) namespace can only be used here. ### [](https://docs-csgo.neverlose.cc/documentation/events#render_glow) render\_glow Fired every time the game prepares glow object manager. This event gives you the ability to render glow lines. Access the function by adding an argument to the callback. `ctx:render(from: vector, to: vector, thickness: number, flags: string, color: color)` Name Type Description **from** `**vector**` Start position in world space **to** `**vector**` Final position in world space **thickness** `**number**` Line thickness as a number in the range \[0.0, ∞\] **flags** `**string**` Glow flags. `l` to draw line, `g` to draw `glow` outline, or `w` to make it fully visible behind walls **color** `**color**` Color of the line 🧷 Anti-aim direction glow lines[](https://docs-csgo.neverlose.cc/documentation/events#anti-aim-direction-glow-lines) ![](https://docs-csgo.neverlose.cc/~gitbook/image?url=https%3A%2F%2F3594665820-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F37PG3extaxoGL9yvcP52%252Fuploads%252Ft95EElmDcmCyhBDlXM7z%252Fimage.png%3Falt%3Dmedia%26token%3De3e05f2d-2cf1-4af1-b964-535d2c0033e9&width=300&dpr=3&quality=100&sign=a438ac17&sv=2) ### [](https://docs-csgo.neverlose.cc/documentation/events#override_view) override\_view Fired every time the game prepares camera view. Name Type Description **fov** `**number**` Field of View **view** `**vector**` Camera view angles **camera** `**vector**` World position of the camera ### [](https://docs-csgo.neverlose.cc/documentation/events#createmove) createmove Fired every time the game prepares a move command. Use this to modify something before the aimbot or movement features. Use the parameter passed by the callback to access the [`UserCmd`](https://docs-csgo.neverlose.cc/documentation/events#struct-usercmd) . #### [](https://docs-csgo.neverlose.cc/documentation/events#struct-usercmd) 🔗 struct `UserCmd` Name Type Description **block\_movement** `**number**` Set to `1` to make the cheat slowdown you to the weapon's minimal speed or set to `2` to fully stop you. Defaults to `0` **no\_choke** `**boolean**` Set to `true` to force the cheat to not choke the current command **send\_packet** `**boolean**` Set to `false` to force the cheat to choke the current command **force\_defensive** `**boolean**` Set to `true` to trigger `'defensive'` exploit (Double tap is required to be fully charged) **jitter\_move** `**boolean**` Set to `false` to disable jitter move **choked\_commands** `**number**` Amount of choked commands **command\_number** `**number**` Current command number **tickcount** `**number**` Current command tickcount **random\_seed** `**number**` Current command random seed **view\_angles** `**vector**` Player view angles **move\_yaw** `**number**` Movement yaw angle **forwardmove** `**number**` Forward / backward speed **sidemove** `**number**` Left / right speed **upmove** `**number**` Up / down speed 🧷 Available cmd buttons[](https://docs-csgo.neverlose.cc/documentation/events#available-cmd-buttons) ### [](https://docs-csgo.neverlose.cc/documentation/events#createmove_run) createmove\_run Fired every time the game runs a move command. Use the parameter passed by the callback to access the [`RunCommand`](https://docs-csgo.neverlose.cc/documentation/events#struct-usercmd-1) . #### [](https://docs-csgo.neverlose.cc/documentation/events#struct-runcommand) 🔗 struct `RunCommand` Name Type Description **choked\_commands** `**number**` Amount of choked commands **command\_number** `**number**` Current command number **tick\_count** `**number**` Current command tick count **move\_yaw** `**number**` Movement yaw angle **forwardmove** `**number**` Forward / backward speed **sidemove** `**number**` Left / right speed **upmove** `**number**` Up / down speed ### [](https://docs-csgo.neverlose.cc/documentation/events#aim_fire) aim\_fire Fired every time the aimbot shoots at a player. Name Type Description **id** `**number**` Shot ID **target** `**entity**` Target entity **damage** `**number**` Estimated damage **hitchance** `**number**` Estimated hit chance **hitgroup** `**number**` Targeted hitgroup **backtrack** `**number**` Amount of ticks the player was backtracked **aim** `**vector**` World position of the aim point **angle** `**vector**` Aimbot shoot angles ### [](https://docs-csgo.neverlose.cc/documentation/events#aim_ack) aim\_ack Name Type Description **id** `**number**` Shot ID **target** `**entity**` Target entity **damage** `**number**` Actual shot damage **spread** `**number**` Bullet spread angle if available **hitchance** `**number**` Actual shot hit chance **hitgroup** `**number**` Hitgroup that was hit **backtrack** `**number**` Amount of ticks the player was backtracked **aim** `**vector**` World position of the aim point **wanted\_damage** `**number**` Targeted damage **wanted\_hitgroup** `**number**` Targeted hitgroup **state** `**string**` Reason the shot was missed or nil if the shot was hit. Available miss reasons: `spread`, `correction`, `misprediction`, `prediction error`, `backtrack failure`, `damage rejection`, `unregistered shot`, `player death`, `death`. ### [](https://docs-csgo.neverlose.cc/documentation/events#bullet_fire) bullet\_fire Fired every time someone fires a bullet. Name Type Description **entity** `**entity**` Entity that did the shot **origin** `**vector**` Entity world position **angles** `**vector**` Aim angle based on entity rotation **sound** `**number**` Sound type **spread** `**number**` Weapon spread **inaccuracy** `**number**` Weapon inaccuracy **recoil\_index** `**number**` Weapon recoil index **random\_seed** `**number**` Spread seed of the shot **weapon\_id** `**number**` Weapon definition index **weapon\_mode** `**number**` Weapon fire mode ### [](https://docs-csgo.neverlose.cc/documentation/events#console_input) console\_input Fired every time the user runs a console command. Use the parameter passed by the callback to access the input string. This can be used to implement custom console commands. Return `false` to prevent the game from processing the command. ### [](https://docs-csgo.neverlose.cc/documentation/events#draw_model) draw\_model Fired before a model is rendered. Use the parameter passed by the callback to access the model context. Return `false` to prevent the game from rendering the original model. Name Type Description **name** `**string**` Name of the model. (e.g: `weapons\v_knife_cord.mdl`) **entity** `**entity**` Entity that belongs to the model. **draw** `**function**` Draws the model with the specified material. Pass nil to the first argument to draw the model with the default material. 🧷 Draw model example[](https://docs-csgo.neverlose.cc/documentation/events#draw-model-example) ### [](https://docs-csgo.neverlose.cc/documentation/events#level_init) level\_init Fired after fully connected to the server (first non-delta packet received). (`SIGNONSTATE:FULL`) ### [](https://docs-csgo.neverlose.cc/documentation/events#pre_render) pre\_render Fired before a frame is rendered. (`FrameStageNotify:FRAME_RENDER_START`) ### [](https://docs-csgo.neverlose.cc/documentation/events#post_render) post\_render Fired after a frame is rendered. (`FrameStageNotify:FRAME_RENDER_END`) ### [](https://docs-csgo.neverlose.cc/documentation/events#net_update_start) net\_update\_start Fired before the game processes entity updates from the server. (`FrameStageNotify:FRAME_NET_UPDATE_START`) ### [](https://docs-csgo.neverlose.cc/documentation/events#net_update_end) net\_update\_end Fired after an entity update packet is received from the server. (`FrameStageNotify:FRAME_NET_UPDATE_END`) ### [](https://docs-csgo.neverlose.cc/documentation/events#config_state) config\_state Fired every time config state is updated. The current state is accessible from the callback arguments as one of these strings: `pre_save`, `post_save`, `pre_load`, `post_load`. ### [](https://docs-csgo.neverlose.cc/documentation/events#mouse_input) mouse\_input Fired every time the mouse input occurs. Return `false` to lock the mouse input. ### [](https://docs-csgo.neverlose.cc/documentation/events#shutdown) shutdown Fired when the script is about to unload. ### [](https://docs-csgo.neverlose.cc/documentation/events#pre_update_clientside_animation) pre\_update\_clientside\_animation Fired before C\_CSPlayer::UpdateClientSideAnimation is called. Name Type Description **player** `**entity**` ... ### [](https://docs-csgo.neverlose.cc/documentation/events#post_update_clientside_animation) post\_update\_clientside\_animation Fired after C\_CSPlayer::UpdateClientSideAnimation is called. Name Type Description **player** `**entity**` ... ### [](https://docs-csgo.neverlose.cc/documentation/events#grenade_override_view) grenade\_override\_view Invoked to override the input values for the grenade prediction. Contains detailed view parameters associated with the grenade trajectory prediction. Name Type Description **angles** `**vector**` Input view angles **src** `**vector**` Input starting position or origin **velocity** `**vector**` Input velocity **view\_offset** `**vector**` Input view offset ### [](https://docs-csgo.neverlose.cc/documentation/events#grenade_warning) grenade\_warning Fired when the "Grenade Proximity Warning" is being rendered. Return `false` to it from being rendered. Name Type Description **entity** `**entity**` The game entity representing the grenade in proximity. **origin** `**vector**` The current position of the grenade. **closest\_point** `**vector**` Represents the nearest point to the player where the grenade will cause damage. For example, in the case of a molotov, this point indicates where the flames would be most harmful. **type** `**string**` Specifies the type of the grenade, "Frag" or "Molly". **damage** `**number**` Predicts the potential damage that would be inflicted upon the local player if they remain at their current position when the grenade detonates. **expire\_time** `**number**` Specifies the time when the grenade detonates or is no longer a threat. **icon** `**ImgObject**` A reference to the texture used in the warning. **path** `**table**` Table of 3D vectors representing the complete trajectory path of the grenade. ### [](https://docs-csgo.neverlose.cc/documentation/events#grenade_prediction) grenade\_prediction Fired when the cheat is drawing the predicted grenade trajectory. Contains detailed information about the grenade's trajectory and impact. Name Type Description **type** `**string**` Identifies the type of the grenade, e.g., "Smoke", "Flash", "Frag". **damage** `**number**` Represents the amount of damage inflicted upon the `target` due to the grenade's effect. **fatal** `**boolean**` Indicates whether the grenade's effect resulted in a lethal outcome for the `target`. **path** `**table**` Table of 3D vectors representing the complete trajectory path of the grenade. **collisions** `**table**` Table of 3D vectors containing all the collision points where the grenade interacts with an obstacle or wall. **target** `**entity**` The game entity that the grenade directly impacts or affects. ### [](https://docs-csgo.neverlose.cc/documentation/events#localplayer_transparency) localplayer\_transparency Invoked to override the opacity of the local player's model. You can override it by returning a custom alpha value. Name Type Description **current\_alpha** `**number**` The current alpha. Ranges from 0 (completely transparent) to 255 (completely opaque). [](https://docs-csgo.neverlose.cc/documentation/events#list-of-complicated-events) List of complicated events: ------------------------------------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/events#voice_message) voice\_message Fired every time the game receives a voice packet. Name Type Description **entity** `**entity**` Entity that belongs to the voice packet. **audible\_mask** `**number**` Audible mask **xuid** `**number**` Xuid **proximity** `**number**` Proximity **format** `**number**` Format **sequence\_bytes** `**number**` Sequence bytes **section\_number** `**number**` Section number **uncompressed\_sample\_offset** `**number**` Uncompressed sample offset **buffer** `**bf_read**` Voice packet buffer **is\_nl** `**boolean**` Packet was sent by the Neverlose #### [](https://docs-csgo.neverlose.cc/documentation/events#struct-bf_read) 🔗 struct `bf_read` Name Type Description **read\_bits** `**function**` Reads a number value from the buffer `:read_bits(num_bits)` **read\_coord** `**function**` Reads a floating number value from the buffer `:read_coord()` (4 bytes) **reset** `**function**` Resets the pointer of the buffer to its original offset **crypt** `**function**` Encrypts/decrypts buffer `:crypt(key)` #### [](https://docs-csgo.neverlose.cc/documentation/events#struct-bf_write) 🔗 struct `bf_write` Name Type Description **write\_bits** `**function**` Writes a number value to the buffer `:write_bits(value, num_bits)` **write\_coord** `**function**` Writes a floating number value to the buffer `:write_coord(value)` (4 bytes) **is\_overflowed** `**function**` Returns `true` if the buffer is overflowed **crypt** `**function**` Encrypts/decrypts buffer `:crypt(key)` > 📌 Firing this event from the Lua will send a voice packet > > `events.voice_message(function: buffer)` > `[neverlose] received voice packet from Salvatore | pct_tickcount: 1200` [PreviousUI](https://docs-csgo.neverlose.cc/useful-information/script-examples/ui) [NextVariables](https://docs-csgo.neverlose.cc/documentation/variables) Last updated 2 years ago * [List of game events:](https://docs-csgo.neverlose.cc/documentation/events#list-of-game-events) * [List of events:](https://docs-csgo.neverlose.cc/documentation/events#list-of-events) * [render](https://docs-csgo.neverlose.cc/documentation/events#render) * [render\_glow](https://docs-csgo.neverlose.cc/documentation/events#render_glow) * [override\_view](https://docs-csgo.neverlose.cc/documentation/events#override_view) * [createmove](https://docs-csgo.neverlose.cc/documentation/events#createmove) * [createmove\_run](https://docs-csgo.neverlose.cc/documentation/events#createmove_run) * [aim\_fire](https://docs-csgo.neverlose.cc/documentation/events#aim_fire) * [aim\_ack](https://docs-csgo.neverlose.cc/documentation/events#aim_ack) * [bullet\_fire](https://docs-csgo.neverlose.cc/documentation/events#bullet_fire) * [console\_input](https://docs-csgo.neverlose.cc/documentation/events#console_input) * [draw\_model](https://docs-csgo.neverlose.cc/documentation/events#draw_model) * [level\_init](https://docs-csgo.neverlose.cc/documentation/events#level_init) * [pre\_render](https://docs-csgo.neverlose.cc/documentation/events#pre_render) * [post\_render](https://docs-csgo.neverlose.cc/documentation/events#post_render) * [net\_update\_start](https://docs-csgo.neverlose.cc/documentation/events#net_update_start) * [net\_update\_end](https://docs-csgo.neverlose.cc/documentation/events#net_update_end) * [config\_state](https://docs-csgo.neverlose.cc/documentation/events#config_state) * [mouse\_input](https://docs-csgo.neverlose.cc/documentation/events#mouse_input) * [shutdown](https://docs-csgo.neverlose.cc/documentation/events#shutdown) * [pre\_update\_clientside\_animation](https://docs-csgo.neverlose.cc/documentation/events#pre_update_clientside_animation) * [post\_update\_clientside\_animation](https://docs-csgo.neverlose.cc/documentation/events#post_update_clientside_animation) * [grenade\_override\_view](https://docs-csgo.neverlose.cc/documentation/events#grenade_override_view) * [grenade\_warning](https://docs-csgo.neverlose.cc/documentation/events#grenade_warning) * [grenade\_prediction](https://docs-csgo.neverlose.cc/documentation/events#grenade_prediction) * [localplayer\_transparency](https://docs-csgo.neverlose.cc/documentation/events#localplayer_transparency) * [List of complicated events:](https://docs-csgo.neverlose.cc/documentation/events#list-of-complicated-events) * [voice\_message](https://docs-csgo.neverlose.cc/documentation/events#voice_message) Copy local hitgroup_str = { [0] = 'generic', 'head', 'chest', 'stomach', 'left arm', 'right arm', 'left leg', 'right leg', 'neck', 'generic', 'gear' } events.player_hurt:set(function(e) local me = entity.get_local_player() local attacker = entity.get(e.attacker, true) if me == attacker then local user = entity.get(e.userid, true) local hitgroup = hitgroup_str[e.hitgroup] print(('Hit %s in the %s for %d damage (%d health remaining)'):format( user:get_name(), hitgroup, e.dmg_health, e.health )) end end) Copy events.render:set(function(ctx) render.rect(vector(0, 0), vector(1920, 1080), color(230, 150)) end) Copy local real_yaw, abs_yaw = 0, 0 events.createmove:set(function(cmd) local me = entity.get_local_player() local anim_state = me:get_anim_state() if not anim_state or cmd.choked_commands > 0 then return end real_yaw = anim_state.eye_yaw abs_yaw = anim_state.abs_yaw end) events.render_glow:set(function(ctx) local me = entity.get_local_player() if not me or not me:is_alive() then return end local origin = me:get_origin() local real_yaw_dir = origin + (vector():angles(0, real_yaw) * 20) local abs_yaw_dir = origin + (vector():angles(0, abs_yaw) * 25) ctx:render(origin, real_yaw_dir, 0.15, 'lg', color(255, 0, 0)) -- Real yaw ctx:render(origin, abs_yaw_dir, 0.15, 'g', color(35, 215, 235)) -- Body yaw end) Copy -- Sets the Roll angle when Shift (+speed) is being held events.createmove:set(function(cmd) if cmd.in_speed then cmd.view_angles.z = 50 -- you are now unhittable end end) Copy local on_createmove = function(cmd) cmd.in_attack -- +attack cmd.in_attack2 -- +attack2 cmd.in_use -- +use cmd.in_jump -- +jump cmd.in_duck -- +duck cmd.in_walk -- +walk cmd.in_speed -- +speed cmd.in_reload -- +reload cmd.in_moveleft cmd.in_moveright cmd.in_forward cmd.in_back cmd.in_left cmd.in_right cmd.in_bullrush end events.createmove:set(on_createmove) Copy local last_random_int events.console_input:set(function(text) if text == '/roll' then local random_int = utils.random_int(1, 6) local str = common.get_username() .. ' rolled a ' .. random_int if random_int == 1 and random_int == last_random_int then str = str .. '... snake eyes!' end print(str) last_random_int = random_int return false end end) Copy local ct_fbi_glass = materials.get('models/player/ct_fbi/ct_fbi_glass', true) events.draw_model:set(function(ctx) local me = entity.get_local_player() if ctx.entity == me then -- Override local player model with the new material ctx:draw(ct_fbi_glass) -- Prevent the game from drawing the original model return false end end) Copy events.config_state(function(state) print(state == "pre_save") end) Copy events.voice_message(function(ctx) local buffer = ctx.buffer local code = buffer:read_bits(16) if code ~= 0x1337 then return end local tickcount = buffer:read_bits(32) print(string.format( 'received voice packet from %s | pct_tickcount: %d', ctx.entity:get_name(), tickcount )) end) -- Note that you wont be able to receive your own voice packet -- unless voice_loopback convar is set to 1 events.voice_message:call(function(buffer) buffer:write_bits(0x1337, 16) buffer:write_bits(globals.tickcount, 32) end) --- # json | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/json.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/json#functions) Functions: ----------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/json#parse) parse `json.parse(json_text: string):` `any` Argument Type Description **json\_text** `**string**` UTF-8 JSON text Will deserialize any UTF-8 JSON string into a Lua value or table. ### [](https://docs-csgo.neverlose.cc/documentation/variables/json#stringify) stringify `json.stringify(value: any):` `string` Argument Type Description **value** `**any**` A lua boolean, number, string, table or nil Will serialize a Lua value into a string containing the JSON representation. [Previousglobals](https://docs-csgo.neverlose.cc/documentation/variables/globals) [Nextmaterials](https://docs-csgo.neverlose.cc/documentation/variables/materials) Last updated 4 years ago * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/json#functions) * [parse](https://docs-csgo.neverlose.cc/documentation/variables/json#parse) * [stringify](https://docs-csgo.neverlose.cc/documentation/variables/json#stringify) --- # bit | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/bit.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/bit#functions) Functions: ---------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/bit#arshift) arshift `bit.arshift(x: number, n: number):` `number` Name Type Description **x** `**number**` Number **n** `**number**` Number of bits Returns the bitwise arithmetic right-shift of its first argument by the number of bits given by the second argument. Arithmetic right-shift treats the most-significant bit as a sign bit and replicates it. Only the lower 5 bits of the shift count are used (reduces to the range \[0..31\]). ### [](https://docs-csgo.neverlose.cc/documentation/variables/bit#band) band `bit.band(x1: number, x2: number[, ...]):` `number` Name Type Description **x1** `**number**` Number **x2** `**number**` Number **...** Number(s) Returns the bitwise and of all of its arguments. Note that more than two arguments are allowed. ### [](https://docs-csgo.neverlose.cc/documentation/variables/bit#bnot) bnot `bit.bnot(x: number)`: number Name Type Description **x** `**number**` Number Returns the bitwise not of its argument. ### [](https://docs-csgo.neverlose.cc/documentation/variables/bit#bor) bor `bit.bor(x1: number, x2: number[, ...]):` `number` Name Type Description **x1** `**number**` Number **x2** `**number**` Number **...** Number(s) Returns the bitwise or of all of its arguments. Note that more than two arguments are allowed. ### [](https://docs-csgo.neverlose.cc/documentation/variables/bit#bswap) bswap `bit.bswap(x: number):` number Name Type Description **x** `**number**` Number Swaps the bytes of its argument and returns it. This can be used to convert little-endian 32 bit numbers to big-endian 32 bit numbers or vice versa. ### [](https://docs-csgo.neverlose.cc/documentation/variables/bit#bxor) bxor `bit.bxor(x1: number, [x2...]: number):` `number` Name Type Description **x1** `**number**` Number **\[x2...\]** `**number**` Number(s) Returns the bitwise xor of all of its arguments. Note that more than two arguments are allowed. ### [](https://docs-csgo.neverlose.cc/documentation/variables/bit#lshift) lshift `bit.lshift(x: number, n: number):` `number` Name Type Description **x** `**number**` Number **n** `**number**` Number of bits Returns the bitwise logical left-shift of its first argument by the number of bits given by the second argument. Logical shifts treat the first argument as an unsigned number and shift in 0-bits. Only the lower 5 bits of the shift count are used (reduces to the range \[0..31\]). ### [](https://docs-csgo.neverlose.cc/documentation/variables/bit#rol) rol `bit.rol(x: number, n: number):` `number` Name Type Description **x** `**number**` Number **n** `**number**` Number of bits Returns the bitwise left rotation of its first argument by the number of bits given by the second argument. Bits shifted out on one side are shifted back in on the other side. Only the lower 5 bits of the rotate count are used (reduces to the range \[0..31\]). ### [](https://docs-csgo.neverlose.cc/documentation/variables/bit#ror) ror `bit.ror(x: number, n: number):` `number` Name Type Description **x** `**number**` Number **n** `**number**` Number of bits Returns the bitwise right rotation of its first argument by the number of bits given by the second argument. Bits shifted out on one side are shifted back in on the other side. Only the lower 5 bits of the rotate count are used (reduces to the range \[0..31\]). ### [](https://docs-csgo.neverlose.cc/documentation/variables/bit#rshift) rshift `bit.rshift(x: number, n: number):` `number` Name Type Description **x** `**number**` Number **n** `**number**` Number of bits Returns the bitwise logical right-shift of its first argument by the number of bits given by the second argument. Logical shifts treat the first argument as an unsigned number and shift in 0-bits. Only the lower 5 bits of the shift count are used (reduces to the range \[0..31\]). ### [](https://docs-csgo.neverlose.cc/documentation/variables/bit#tobit) tobit `bit.tobit(x: number):` `number` Name Type Description **x** `**number**` Number to normalize Normalizes a number to the numeric range for bit operations and returns it. This function is usually not needed since all bit operations already normalize all of their input arguments. ### [](https://docs-csgo.neverlose.cc/documentation/variables/bit#tohex) tohex `bit.tohex(x: number, n: number):` `number` Name Type Description **x** `**number**` Number to convert **n** `**number**` Number of hex digits to return Converts its first argument to a hex string. The number of hex digits is given by the absolute value of the optional second argument. Positive numbers between 1 and 8 generate lowercase hex digits. Negative numbers generate uppercase hex digits. Only the least-significant 4\*|n| bits are used. The default is to generate 8 lowercase hex digits. [Previous\_G](https://docs-csgo.neverlose.cc/documentation/variables/_g) [Nextcolor](https://docs-csgo.neverlose.cc/documentation/variables/color) Last updated 4 years ago * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/bit#functions) * [arshift](https://docs-csgo.neverlose.cc/documentation/variables/bit#arshift) * [band](https://docs-csgo.neverlose.cc/documentation/variables/bit#band) * [bnot](https://docs-csgo.neverlose.cc/documentation/variables/bit#bnot) * [bor](https://docs-csgo.neverlose.cc/documentation/variables/bit#bor) * [bswap](https://docs-csgo.neverlose.cc/documentation/variables/bit#bswap) * [bxor](https://docs-csgo.neverlose.cc/documentation/variables/bit#bxor) * [lshift](https://docs-csgo.neverlose.cc/documentation/variables/bit#lshift) * [rol](https://docs-csgo.neverlose.cc/documentation/variables/bit#rol) * [ror](https://docs-csgo.neverlose.cc/documentation/variables/bit#ror) * [rshift](https://docs-csgo.neverlose.cc/documentation/variables/bit#rshift) * [tobit](https://docs-csgo.neverlose.cc/documentation/variables/bit#tobit) * [tohex](https://docs-csgo.neverlose.cc/documentation/variables/bit#tohex) --- # common | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/common.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/common#functions) Functions: ------------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#get_date) get\_date [![Logo](https://docs-csgo.neverlose.cc/~gitbook/image?url=https%3A%2F%2Fdevhints.io%2Fassets%2Ffavicon.png&width=20&dpr=3&quality=100&sign=d05c47a&sv=2)Date & time formats cheatsheetDevhints.io cheatsheets](https://devhints.io/datetime) `common.get_date(format: string[, unix_time: number]):` `string` Name Type Description **format** `**string**` Date format (`strftime`) **unix\_time** `**number**` Optional. Unix-format time Returns the formatted date. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#get_unixtime) get\_unixtime `common.get_unixtime():` `number` Returns the number of seconds that have elapsed since the unix epoch (1 January 1970 00:00:00) ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#get_timestamp) get\_timestamp `common.get_timestamp():` `number` Returns high precision timestamp in milliseconds. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#get_system_time) get\_system\_time `common.get_system_time():` `table` Returns the windows time as a table containing the `year`, `month`, `day`, `hours`, `minutes`, and `seconds` values. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#get_product_version) get\_product\_version `common.get_product_version():` `number` Returns the product version of the game client. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#get_game_directory) get\_game\_directory `common.get_game_directory():` `string` Returns the path to the game client folder. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#get_map_data) get\_map\_data `common.get_map_data():` `table` Returns a table containing the `name`, `shortname`, and `group` values. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#get_username) get\_username `common.get_username():` `string` Returns your Neverlose username. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#get_config_name) get\_config\_name `common.get_config_name():` `string` Returns the name of the currently loaded config. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#get_active_scripts) get\_active\_scripts `common.get_active_scripts():` `table` Returns a table of strings containing the names of the loaded scripts. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#get_mouse_wheel_delta) get\_mouse\_wheel\_delta `common.get_mouse_wheel_delta():` `number` Returns a value that indicates the amount that the mouse wheel has changed. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#is_in_thirdperson) is\_in\_thirdperson `common.is_in_thirdperson():` `boolean` Returns `true` if the camera is in thirdperson. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#reload_script) reload\_script `common.reload_script()` Reloads current script. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#unload_script) unload\_script `common.unload_script()` Unloads current script. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#force_full_update) force\_full\_update `common.force_full_update()` Forces the server to send a full update packet. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#set_clan_tag) set\_clan\_tag `common.set_clan_tag(text: string)` Name Type Description **text** `**string**` New clan tag Sets your in-game clan tag. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#set_name) set\_name `common.set_name(text: string)` Name Type Description **text** `**string**` New name Sets your in-game name. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#add_event) add\_event `common.add_event(text: string[, icon_name: string])` Name Type Description **text** `**string**` Text to print to into the upper-left panel. **icon\_name** `**string**` Optional. Fontawesome icon name. Prints the text into the upper-left neverlose event panel. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#add_notify) add\_notify `common.add_notify(title: string, text: string)` Name Type Description **title** `**string**` Text to print to into the title. **body** `**string**` Text to print to into the body of the notification. Draws the notification. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#is_button_down) is\_button\_down [![Logo](https://docs-csgo.neverlose.cc/~gitbook/image?url=https%3A%2F%2Flearn.microsoft.com%2Ffavicon.ico&width=20&dpr=3&quality=100&sign=a435cfee&sv=2)Virtual-Key Codes (Winuser.h) - Win32 appsMicrosoftLearn](https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) `common.is_button_down(key: number):` `boolean` Name Type Description **key** `**number**` Key to check Returns `true` if the button is down, or nil on failure. ### [](https://docs-csgo.neverlose.cc/documentation/variables/common#is_button_released) is\_button\_released `common.is_button_released(key: number):` `boolean` Name Type Description **key** `**number**` Key to check Returns `true` if the button is released, or nil on failure. [Previouscolor](https://docs-csgo.neverlose.cc/documentation/variables/color) [Nextcvar](https://docs-csgo.neverlose.cc/documentation/variables/cvar) Last updated 2 years ago * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/common#functions) * [get\_date](https://docs-csgo.neverlose.cc/documentation/variables/common#get_date) * [get\_unixtime](https://docs-csgo.neverlose.cc/documentation/variables/common#get_unixtime) * [get\_timestamp](https://docs-csgo.neverlose.cc/documentation/variables/common#get_timestamp) * [get\_system\_time](https://docs-csgo.neverlose.cc/documentation/variables/common#get_system_time) * [get\_product\_version](https://docs-csgo.neverlose.cc/documentation/variables/common#get_product_version) * [get\_game\_directory](https://docs-csgo.neverlose.cc/documentation/variables/common#get_game_directory) * [get\_map\_data](https://docs-csgo.neverlose.cc/documentation/variables/common#get_map_data) * [get\_username](https://docs-csgo.neverlose.cc/documentation/variables/common#get_username) * [get\_config\_name](https://docs-csgo.neverlose.cc/documentation/variables/common#get_config_name) * [get\_active\_scripts](https://docs-csgo.neverlose.cc/documentation/variables/common#get_active_scripts) * [get\_mouse\_wheel\_delta](https://docs-csgo.neverlose.cc/documentation/variables/common#get_mouse_wheel_delta) * [is\_in\_thirdperson](https://docs-csgo.neverlose.cc/documentation/variables/common#is_in_thirdperson) * [reload\_script](https://docs-csgo.neverlose.cc/documentation/variables/common#reload_script) * [unload\_script](https://docs-csgo.neverlose.cc/documentation/variables/common#unload_script) * [force\_full\_update](https://docs-csgo.neverlose.cc/documentation/variables/common#force_full_update) * [set\_clan\_tag](https://docs-csgo.neverlose.cc/documentation/variables/common#set_clan_tag) * [set\_name](https://docs-csgo.neverlose.cc/documentation/variables/common#set_name) * [add\_event](https://docs-csgo.neverlose.cc/documentation/variables/common#add_event) * [add\_notify](https://docs-csgo.neverlose.cc/documentation/variables/common#add_notify) * [is\_button\_down](https://docs-csgo.neverlose.cc/documentation/variables/common#is_button_down) * [is\_button\_released](https://docs-csgo.neverlose.cc/documentation/variables/common#is_button_released) --- # files | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/files.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/files#example-available) Example available! ---------------------------------------------------------------------------------------------------------- [](https://docs-csgo.neverlose.cc/documentation/variables/files#functions) Functions: ------------------------------------------------------------------------------------------ ### [](https://docs-csgo.neverlose.cc/documentation/variables/files#create_folder) create\_folder `files.create_folder(path: string)` Name Type Description **path** `**string**` New folder path ### [](https://docs-csgo.neverlose.cc/documentation/variables/files#read) read `files.read(path: string):` `any` Name Type Description **path** `**string**` Path to the file Returns contents of the specified file. ### [](https://docs-csgo.neverlose.cc/documentation/variables/files#write) write `files.write(path: string, contents: string[, is_binary: boolean]):` `boolean` Name Type Description **path** `**string**` Path to the file **contents** `**any**` Contents the file should be set to **is\_binary** `**boolean**` Is `contents` a binary Replaces contents of the specified file. Returns `false` on failure. ### [](https://docs-csgo.neverlose.cc/documentation/variables/files#get_crc32) get\_crc32 `files.get_crc32(path: string):` `number` Name Type Description **path** `**string**` Path to the file Returns the crc32 checksum of the file. [Previousevents](https://docs-csgo.neverlose.cc/documentation/variables/events) [Nextglobals](https://docs-csgo.neverlose.cc/documentation/variables/globals) Last updated 3 years ago * [Example available!](https://docs-csgo.neverlose.cc/documentation/variables/files#example-available) * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/files#functions) * [create\_folder](https://docs-csgo.neverlose.cc/documentation/variables/files#create_folder) * [read](https://docs-csgo.neverlose.cc/documentation/variables/files#read) * [write](https://docs-csgo.neverlose.cc/documentation/variables/files#write) * [get\_crc32](https://docs-csgo.neverlose.cc/documentation/variables/files#get_crc32) --- # network | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/network.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/network#functions) Functions: -------------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/network#get) get `network.get(url: string[, headers: table, callback: function]):` `string` Name Type Description **url** `**string**` URL **headers** `**table**` Headers **callback** `**function**` Callback Sends a GET request to the URL. ### [](https://docs-csgo.neverlose.cc/documentation/variables/network#post) post `network.post(url: string[, data: table, headers: table, callback: function]):` `string` Name Type Description **url** `**string**` URL **data** `**table**` Post data **headers** `**table**` Headers **callback** `**function**` Callback Sends a POST request to the URL. [Previousui](https://docs-csgo.neverlose.cc/documentation/variables/ui) [Nextpanorama](https://docs-csgo.neverlose.cc/documentation/variables/panorama) Last updated 3 years ago * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/network#functions) * [get](https://docs-csgo.neverlose.cc/documentation/variables/network#get) * [post](https://docs-csgo.neverlose.cc/documentation/variables/network#post) --- # events | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/events.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/events#functions) Functions: ------------------------------------------------------------------------------------------- Available cheat events can be found [here](https://docs-csgo.neverlose.cc/documentation/events) . ### [](https://docs-csgo.neverlose.cc/documentation/variables/events#set) :set `events.event_name:set(callback: function)` Name Type Description **callback** `**function**` Lua function to call Sets the callback for the specified event. The registered function will be called every time the specified event occurs. ### [](https://docs-csgo.neverlose.cc/documentation/variables/events#unset) :unset `events.event_name:unset(callback: function)` Name Type Description **callback** `**function**` Lua function that was passed to the `:set` function Unsets the callback that was set via the `:set` function from the specified event. ### [](https://docs-csgo.neverlose.cc/documentation/variables/events#call) :call `events.event_name:call(...)` Name Type Description **...** Arguments to be passed by the callback Fires the specified event. ### [](https://docs-csgo.neverlose.cc/documentation/variables/events#alternative-behavior) Alternative behavior: ### [](https://docs-csgo.neverlose.cc/documentation/variables/events#call-1) :\_\_call `events.event_name(callback: function[, state: boolean])` Name Type Description **callback** `**function**` Lua function to call **state** `**boolean**` Optional. Callback state. If not specified then toggles the callback state for the specified function. Sets / unsets the callback for the specified event. Toggle Behavior State Behavior [Previousesp](https://docs-csgo.neverlose.cc/documentation/variables/esp) [Nextfiles](https://docs-csgo.neverlose.cc/documentation/variables/files) Last updated 3 years ago * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/events#functions) * [:set](https://docs-csgo.neverlose.cc/documentation/variables/events#set) * [:unset](https://docs-csgo.neverlose.cc/documentation/variables/events#unset) * [:call](https://docs-csgo.neverlose.cc/documentation/variables/events#call) * [Alternative behavior:](https://docs-csgo.neverlose.cc/documentation/variables/events#alternative-behavior) * [:\_\_call](https://docs-csgo.neverlose.cc/documentation/variables/events#call-1) Copy local function function_callback() print(globals.tickcount) end -- Sets the createmove callback for the specified function events.createmove(function_callback) -- Execute after 0.5 secs utils.execute_after(0.5, function() -- Toggles the createmove callback for the specified function events.createmove(function_callback) end) Copy local function function_callback() print(globals.tickcount) end events.createmove(function_callback, true) -- Sets the callback events.createmove(function_callback, false) -- Unsets the callback --- # esp | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/esp.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/esp#example-available) Example available! -------------------------------------------------------------------------------------------------------- [⚙️ESP](https://docs-csgo.neverlose.cc/useful-information/script-examples/esp) [](https://docs-csgo.neverlose.cc/documentation/variables/esp#class-names) Class names ------------------------------------------------------------------------------------------- Available ESP classes: `enemy`, `team`, `self` [](https://docs-csgo.neverlose.cc/documentation/variables/esp#functions) Functions: ---------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/esp#new_text) :new\_text `esp.esp_class:new_text(name: string, preview: string, callback: function):` `ESPGroup` Name Type Description **name** `**string**` ESP element picker text **preview** `**string**` ESP preview text **callback** `**function**` Function that will be called for each entity while drawing the ESP Registers ESP text to the specified class. The callback function is called every frame. It is passed an entity pointer. Return a string in order to manage the output. ### [](https://docs-csgo.neverlose.cc/documentation/variables/esp#new_bar) :new\_bar `esp.esp_class:new_bar(name: string, callback: function):` `ESPGroup` Name Type Description **name** `**string**` ESP element picker text **callback** `**function**` Function that will be called for each entity while drawing the ESP Registers an ESP bar to the specified class. The callback function is called every frame. Access the entity pointer using the arguments of the specified callback. Return a boolean followed by the number in the range \[0.0, 1.0\]. ### [](https://docs-csgo.neverlose.cc/documentation/variables/esp#new_item) :new\_item `esp.esp_class:new_item(name: string):` `ESPGroup` Name Type Description **name** `**string**` ESP element picker text Registers an ESP item that is neither text nor a bar. #### [](https://docs-csgo.neverlose.cc/documentation/variables/esp#struct-espgroup) 🔗 struct `ESPGroup` Name Type Description **get** `**function**` Returns the value of the item. **set** `**function**` Sets the value of the item. **name** `**function**` Returns the name of the item. If the argument is present, the name is set to the new value. **create** `**function**` Attaches a [`group`](https://docs-csgo.neverlose.cc/documentation/variables/ui#menugroup) to the current item. [Previousentity](https://docs-csgo.neverlose.cc/documentation/variables/entity) [Nextevents](https://docs-csgo.neverlose.cc/documentation/variables/events) Last updated 2 years ago * [Example available!](https://docs-csgo.neverlose.cc/documentation/variables/esp#example-available) * [Class names](https://docs-csgo.neverlose.cc/documentation/variables/esp#class-names) * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/esp#functions) * [:new\_text](https://docs-csgo.neverlose.cc/documentation/variables/esp#new_text) * [:new\_bar](https://docs-csgo.neverlose.cc/documentation/variables/esp#new_bar) * [:new\_item](https://docs-csgo.neverlose.cc/documentation/variables/esp#new_item) --- # globals | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/globals.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/globals#variables) Variables: -------------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#curtime) curtime `globals.curtime` `:` `number` Server time in seconds. ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#realtime) realtime `globals.realtime` `:` `number` Local time in seconds. ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#frametime) frametime `globals.frametime` `:` `number` Duration of the last game frame in seconds. ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#framecount) framecount `globals.framecount` `:` `number` Amount of frames since the game started. ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#absoluteframetime) absoluteframetime `globals.absoluteframetime` `:` `number` Duration of the last game frame in seconds. ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#tickcount) tickcount `globals.tickcount` `:` `number` Number of ticks elapsed on the server. ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#tickinterval) tickinterval `globals.tickinterval` `:` `number` Duration of a tick in seconds. ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#max_players) max\_players `globals.max_players` `:` `number` Maximum number of players on the server. ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#is_connected) is\_connected `globals.is_connected` `:` `boolean` Returns `true` if the player is connected, but not necessarily active in game (could still be loading). ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#is_in_game) is\_in\_game `globals.is_in_game` `:` `boolean` Returns `true` if the player is currently connected to a game server. ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#choked_commands) choked\_commands `globals.choked_commands` `:` `number` Number of choked commands. ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#commandack) commandack `globals.commandack` `:` `number` Current command number acknowledged by server. ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#commandack_prev) commandack\_prev `globals.commandack_prev` `:` `number` Sequence number of last outgoing command. ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#last_outgoing_command) last\_outgoing\_command `globals.last_outgoing_command` `:` `number` Number of last command sequence number acknowledged by server. ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#server_tick) server\_tick `globals.server_tick` `:` `number` Last-received tick from the server. ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#client_tick) client\_tick `globals.client_tick` `:` `number` The client's own tick count. ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#delta_tick) delta\_tick `globals.delta_tick` `:` `number` Last-valid received snapshot (server) tick. ### [](https://docs-csgo.neverlose.cc/documentation/variables/globals#clock_offset) clock\_offset `globals.clock_offset` `:` `number` Difference between the server and client tick counts, used to predict the current server tick count. [Previousfiles](https://docs-csgo.neverlose.cc/documentation/variables/files) [Nextjson](https://docs-csgo.neverlose.cc/documentation/variables/json) Last updated 3 years ago * [Variables:](https://docs-csgo.neverlose.cc/documentation/variables/globals#variables) * [curtime](https://docs-csgo.neverlose.cc/documentation/variables/globals#curtime) * [realtime](https://docs-csgo.neverlose.cc/documentation/variables/globals#realtime) * [frametime](https://docs-csgo.neverlose.cc/documentation/variables/globals#frametime) * [framecount](https://docs-csgo.neverlose.cc/documentation/variables/globals#framecount) * [absoluteframetime](https://docs-csgo.neverlose.cc/documentation/variables/globals#absoluteframetime) * [tickcount](https://docs-csgo.neverlose.cc/documentation/variables/globals#tickcount) * [tickinterval](https://docs-csgo.neverlose.cc/documentation/variables/globals#tickinterval) * [max\_players](https://docs-csgo.neverlose.cc/documentation/variables/globals#max_players) * [is\_connected](https://docs-csgo.neverlose.cc/documentation/variables/globals#is_connected) * [is\_in\_game](https://docs-csgo.neverlose.cc/documentation/variables/globals#is_in_game) * [choked\_commands](https://docs-csgo.neverlose.cc/documentation/variables/globals#choked_commands) * [commandack](https://docs-csgo.neverlose.cc/documentation/variables/globals#commandack) * [commandack\_prev](https://docs-csgo.neverlose.cc/documentation/variables/globals#commandack_prev) * [last\_outgoing\_command](https://docs-csgo.neverlose.cc/documentation/variables/globals#last_outgoing_command) * [server\_tick](https://docs-csgo.neverlose.cc/documentation/variables/globals#server_tick) * [client\_tick](https://docs-csgo.neverlose.cc/documentation/variables/globals#client_tick) * [delta\_tick](https://docs-csgo.neverlose.cc/documentation/variables/globals#delta_tick) * [clock\_offset](https://docs-csgo.neverlose.cc/documentation/variables/globals#clock_offset) --- # panorama | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/panorama.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/panorama#functions) Functions: --------------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/panorama#loadstring) loadstring `panorama.loadstring(js_code: string[, panel: string]):` `any` Name Type Description **js\_code** `**string**` String containing JavaScript code **panel** `**string**` (panorama root panel) Optional. Panel name [](https://docs-csgo.neverlose.cc/documentation/variables/panorama#accessing-apis) Accessing API's ------------------------------------------------------------------------------------------------------- `panorama[api]:` `table` Name Type Description **api** `**string**` API name, e.g. GameStateAPI `panorama[panel][api]:` `table` Name Type Description **panel** `**string**` (panorama root panel) Panel name **api** `**string**` API name, e.g. GameStateAPI Copy -- Access an API from the default root panel local MyPersonaAPI = panorama.MyPersonaAPI print(MyPersonaAPI.GetXuid()) -- Access an API from a specific root panel local UiToolkitAPI = panorama.CSGOMainMenu.UiToolkitAPI UiToolkitAPI.CloseAllVisiblePopups() [Previousnetwork](https://docs-csgo.neverlose.cc/documentation/variables/network) [Nextrage](https://docs-csgo.neverlose.cc/documentation/variables/rage) Last updated 3 years ago * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/panorama#functions) * [loadstring](https://docs-csgo.neverlose.cc/documentation/variables/panorama#loadstring) * [Accessing API's](https://docs-csgo.neverlose.cc/documentation/variables/panorama#accessing-apis) --- # color | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/color.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/color#example-available) Example available! ---------------------------------------------------------------------------------------------------------- [⚙️Color](https://docs-csgo.neverlose.cc/useful-information/script-examples/color) [](https://docs-csgo.neverlose.cc/documentation/variables/color#functions) Functions: ------------------------------------------------------------------------------------------ ### [](https://docs-csgo.neverlose.cc/documentation/variables/color#clone) :clone `color_object:clone():` `color` Creates and returns a copy of the color object. ### [](https://docs-csgo.neverlose.cc/documentation/variables/color#init) :init RGBA HEX `color_object:init(r: number, g: number, b: number, a: number):` `color` > 📌 Available overloads (`RGBA`): color() -> `255`, `255`, `255`, `255` color(`200`) -> `200`, `200`, `200`, `255` color(`255`, `160`) -> `255`, `255`, `255`, `160` color(`255`, `195`, `25`) -> `255`, `195`, `25`, `255` color(`255`, `195`, `25`, `200`) -> `255`, `195`, `25`, `200` Name Type Description **r** `**number**` New R color range **g** `**number**` New G color range **b** `**number**` New B color range **a** `**number**` New A color range `color_object:init(value: string):` `color` > 📌 Available overloads (`HEX` -> `RGBA`): color '`C8`' -> `200`, `200`, `200`, `255` color '`FF``A0`' -> `255`, `255`, `255`, `160` color '`FFC319`' -> `255`, `195`, `25`, `255` color '`AABBCCDD`' -> `170`, `187`, `204`, `221` Name Type Description **value** `**string**` HEX string value (Format: `AABBCCDD` including all available overloads) Overwrites the color's ranges. Returns itself. ### [](https://docs-csgo.neverlose.cc/documentation/variables/color#as_fraction) :as\_fraction `color_object:as_fraction(r: number, g: number, b: number, a: number):` `color` Name Type Description **r** `**number**` New R color range as a percentage in the range \[0.0, 1.0\] **g** `**number**` New G color range as a percentage in the range \[0.0, 1.0\] **b** `**number**` New B color range as a percentage in the range \[0.0, 1.0\] **a** `**number**` New A color range as a percentage in the range \[0.0, 1.0\] Overwrites the color's ranges using the fraction values. Returns itself. ### [](https://docs-csgo.neverlose.cc/documentation/variables/color#as_int32) :as\_int32 `color_object:as_int32(value: number):` `color` Name Type Description **value** `**number**` int32 color value Overwrites the color's ranges converting the int32 value to RGBA values. Returns itself. ### [](https://docs-csgo.neverlose.cc/documentation/variables/color#as_hsv) :as\_hsv `color_object:as_hsv(h: number, s: number, v: number, a: number):` `color` Name Type Description **h** `**number**` Hue color range \[0.0, 1.0\] **s** `**number**` Saturation color range \[0.0, 1.0\] **v** `**number**` Value color range \[0.0, 1.0\] **a** `**number**` Alpha color range \[0.0, 1.0\] Overwrites the color's ranges converting the HSV to RGBA values. Returns itself. ### [](https://docs-csgo.neverlose.cc/documentation/variables/color#as_hsl) :as\_hsl `color_object:as_hsl(h: number, s: number, l: number, a: number):` `color` Name Type Description **h** `**number**` Hue color range \[0.0, 1.0\] **s** `**number**` Saturation color range \[0.0, 1.0\] **l** `**number**` Lightness color range \[0.0, 1.0\] **a** `**number**` Alpha color range \[0.0, 1.0\] Overwrites the color's ranges converting the HSL to RGBA values. Returns itself. ### [](https://docs-csgo.neverlose.cc/documentation/variables/color#to_fraction) :to\_fraction `color_object:to_fraction():` `number`, `number`, `number`, `number` Returns the r, g, b, and a ranges of the color as a percentage in the range of \[0.0, 1.0\]. ### [](https://docs-csgo.neverlose.cc/documentation/variables/color#to_hex) :to\_hex `color_object:to_hex():` `string` Returns the HEX string representing the color. ### [](https://docs-csgo.neverlose.cc/documentation/variables/color#to_int32) :to\_int32 `color_object:to_int32():` `number` Returns the int32 value representing the color. ### [](https://docs-csgo.neverlose.cc/documentation/variables/color#to_hsv) :to\_hsv `color_object:to_hsv():` `number`, `number`, `number` Returns the HSV representation of the color. ### [](https://docs-csgo.neverlose.cc/documentation/variables/color#to_hsl) :to\_hsl `color_object:to_hsl():` `number`, `number`, `number` Returns the HSL representation of the color. ### [](https://docs-csgo.neverlose.cc/documentation/variables/color#lerp) :lerp `color_object:lerp(other: color, weight: number):` `color` Name Type Description **other** `**color**` The color to interpolate to **weight** `**number**` A value between 0 and 1 that indicates the weight of **other** Returns the linearly interpolated color between two colors by the specified weight. ### [](https://docs-csgo.neverlose.cc/documentation/variables/color#grayscale) :grayscale `color_object:grayscale([ weight: number ]):` `color` Name Type Description **weight** `**number**` Optional. A value between 0 and 1 that indicates the weight of **grayscale** Returns the grayscaled color. ### [](https://docs-csgo.neverlose.cc/documentation/variables/color#alpha_modulate) :alpha\_modulate `color_object:alpha_modulate(alpha: number):` `color` Name Type Description **alpha** `**number**` Alpha color range \[0, 255\] Returns the current color with an overridden Alpha color range. ### [](https://docs-csgo.neverlose.cc/documentation/variables/color#unpack) :unpack `color_object:unpack():` `number`, `number`, `number`, `number` Returns the r, g, b, and a values of the color. Note that these fields can be accessed by indexing r, g, b, and a. [Previousbit](https://docs-csgo.neverlose.cc/documentation/variables/bit) [Nextcommon](https://docs-csgo.neverlose.cc/documentation/variables/common) Last updated 3 years ago * [Example available!](https://docs-csgo.neverlose.cc/documentation/variables/color#example-available) * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/color#functions) * [:clone](https://docs-csgo.neverlose.cc/documentation/variables/color#clone) * [:init](https://docs-csgo.neverlose.cc/documentation/variables/color#init) * [:as\_fraction](https://docs-csgo.neverlose.cc/documentation/variables/color#as_fraction) * [:as\_int32](https://docs-csgo.neverlose.cc/documentation/variables/color#as_int32) * [:as\_hsv](https://docs-csgo.neverlose.cc/documentation/variables/color#as_hsv) * [:as\_hsl](https://docs-csgo.neverlose.cc/documentation/variables/color#as_hsl) * [:to\_fraction](https://docs-csgo.neverlose.cc/documentation/variables/color#to_fraction) * [:to\_hex](https://docs-csgo.neverlose.cc/documentation/variables/color#to_hex) * [:to\_int32](https://docs-csgo.neverlose.cc/documentation/variables/color#to_int32) * [:to\_hsv](https://docs-csgo.neverlose.cc/documentation/variables/color#to_hsv) * [:to\_hsl](https://docs-csgo.neverlose.cc/documentation/variables/color#to_hsl) * [:lerp](https://docs-csgo.neverlose.cc/documentation/variables/color#lerp) * [:grayscale](https://docs-csgo.neverlose.cc/documentation/variables/color#grayscale) * [:alpha\_modulate](https://docs-csgo.neverlose.cc/documentation/variables/color#alpha_modulate) * [:unpack](https://docs-csgo.neverlose.cc/documentation/variables/color#unpack) --- # materials | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/materials.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/materials#example-available) Example available! -------------------------------------------------------------------------------------------------------------- [⚙️Materials](https://docs-csgo.neverlose.cc/useful-information/script-examples/materials) [](https://docs-csgo.neverlose.cc/documentation/variables/materials#functions) Functions: ---------------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/materials#get) get `materials.get(path: string[, force_load: boolean]):` `Material` Name Type Description **path** `**string**` Directory to the specified material **force\_load** `**force_load**` Loads the material if not loaded Returns the material object in the specified path. ### [](https://docs-csgo.neverlose.cc/documentation/variables/materials#get_materials) get\_materials `materials.get_materials(partial_path: string[, force_load: boolean, callback: function]):` `table` Name Type Description **partial\_path** `**string**` Directory to the specified materials **force\_load** `**force_load**` Loads each material if not loaded **callback** `**function**` A callback with a pointer to the material object as the argument If the callback is nil, it returns the table of material objects along the specified path. Otherwise the callback will be called. Access the material object using the arguments of the specified callback. ### [](https://docs-csgo.neverlose.cc/documentation/variables/materials#create) create `materials.create(name: strings, key_values: string):` `Material` Name Type Description **name** `**string**` New material name **key\_values** `**string**` New material values Creates and returns a new material object [](https://docs-csgo.neverlose.cc/documentation/variables/materials#struct-material) 🔗 struct `Material` -------------------------------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/materials#get_name) :get\_name `material:get_name():` `string` Returns the name of the material. ### [](https://docs-csgo.neverlose.cc/documentation/variables/materials#get_texture_group_name) :get\_texture\_group\_name() `material:get_texture_group_name():` `string` Returns the texture group name of the material. ### [](https://docs-csgo.neverlose.cc/documentation/variables/materials#var_flag) :var\_flag `material:var_flag(flag: number[, value: boolean]):` `boolean` Name Type Description **flag** `**number**` Material var flag **value** `**boolean**` New material var flag value Gets or sets the value of the material var flag. ### [](https://docs-csgo.neverlose.cc/documentation/variables/materials#shader_param) :shader\_param `material:shader_param(name: string[, value: any]):` `any` Name Type Description **name** `**string**` Shader parameter name **value** `**any**` New shader parameter value Gets or sets the value of the material shader parameter. ### [](https://docs-csgo.neverlose.cc/documentation/variables/materials#color_modulate) :color\_modulate `material:color_modulate([color: color])` Name Type Description **color** `**color**` New color modulation value Gets or sets the material color modulation value. ### [](https://docs-csgo.neverlose.cc/documentation/variables/materials#alpha_modulate) :alpha\_modulate `material:alpha_modulate([alpha: number])` Name Type Description **alpha** `**number**` New alpha modulation value Gets or sets the material alpha modulation value. ### [](https://docs-csgo.neverlose.cc/documentation/variables/materials#is_valid) :is\_valid `material:is_valid():` `boolean` Returns `true` if the material is valid. ### [](https://docs-csgo.neverlose.cc/documentation/variables/materials#reset) :reset `material:reset()` Resets the material properties to its original values along with discarding the override. ### [](https://docs-csgo.neverlose.cc/documentation/variables/materials#override) :override `material:override(mat: Material)` Name Type Description **mat** `**Material**` Material object with the needed properties Overrides material properties to properties from another material without setting them. [Previousjson](https://docs-csgo.neverlose.cc/documentation/variables/json) [Nextmath](https://docs-csgo.neverlose.cc/documentation/variables/math) Last updated 3 years ago * [Example available!](https://docs-csgo.neverlose.cc/documentation/variables/materials#example-available) * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/materials#functions) * [get](https://docs-csgo.neverlose.cc/documentation/variables/materials#get) * [get\_materials](https://docs-csgo.neverlose.cc/documentation/variables/materials#get_materials) * [create](https://docs-csgo.neverlose.cc/documentation/variables/materials#create) * [🔗 struct Material](https://docs-csgo.neverlose.cc/documentation/variables/materials#struct-material) * [:get\_name](https://docs-csgo.neverlose.cc/documentation/variables/materials#get_name) * [:get\_texture\_group\_name()](https://docs-csgo.neverlose.cc/documentation/variables/materials#get_texture_group_name) * [:var\_flag](https://docs-csgo.neverlose.cc/documentation/variables/materials#var_flag) * [:shader\_param](https://docs-csgo.neverlose.cc/documentation/variables/materials#shader_param) * [:color\_modulate](https://docs-csgo.neverlose.cc/documentation/variables/materials#color_modulate) * [:alpha\_modulate](https://docs-csgo.neverlose.cc/documentation/variables/materials#alpha_modulate) * [:is\_valid](https://docs-csgo.neverlose.cc/documentation/variables/materials#is_valid) * [:reset](https://docs-csgo.neverlose.cc/documentation/variables/materials#reset) * [:override](https://docs-csgo.neverlose.cc/documentation/variables/materials#override) --- # _G | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/_g.md) . ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#assert) assert `assert(expression: any[, text: string, ...]): any` Name Type Description **expression** `**any**` The expression to assert. **text** `**text**` The error message to throw when assertion fails. This is only type-checked if the assertion fails. **...** `**any**` Any arguments past the error message will be returned by a successful assert. If the result of the first argument is false or nil, an error is thrown with the second argument as the message. ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#error) error `error(text: any[, level: number])` Name Type Description **text** `**string**` The error message to throw. **level** `**number**` The level to throw the error at. Throws a Lua error and breaks out of the current call stack. ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#getmetatable) getmetatable `getmetatable(object: any): any` Name Type Description **object** `**any**` The value to return the metatable of. Returns the metatable of an object. This function obeys the metatable's \_\_metatable field, and will return that field if the metatable has it set. ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#ipairs) ipairs `ipairs(tbl: table): function, table, number` Name Type Description **tbl** `**table**` The table to iterate over. Returns an iterator function for a for loop, to return ordered key-value pairs from a table. ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#print) print `print(text: string[, ...])` Name Type Description **text** `**string**` Text to print into the console. **...** `**any**` Optional arguments to concatenate with `text`. Prints the text to the console. ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#print_error) print\_error `print_error(text: string[, ...])` Name Type Description **text** `**string**` Text to print into the console. **...** `**any**` Optional arguments to concatenate with `text`. Prints an error to the console and plays a sound. ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#print_chat) print\_chat `print_chat(text: string[, ...])` Name Type Description **text** `**string**` Text to print into the in-game chat. **...** `**any**` Optional arguments to concatenate with `text`. Prints the text to the in-game chat. ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#print_raw) print\_raw `print_raw(text: string[, ...])` Name Type Description **text** `**string**` Text to print into the console. **...** `**any**` Optional arguments to concatenate with `text`. Prints the text that can be changed in color by prepending it with `"\a"` followed by the color in the hexadecimal "RRGGBB" format. For example, `"\aFF0000Hi"` will print `"Hi"` in red. ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#print_dev) print\_dev `print_dev(text: string[, ...])` Name Type Description **text** `**string**` Text to print to into the upper-left console panel. **...** `**any**` Optional arguments to concatenate with `text`. Prints the text into the upper-left console panel. ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#tonumber) tonumber `tonumber(value: any[, base: number]):` `number` Name Type Description **value** `**any**` The value to convert. Can be a number or string. **base** `**number**` Optional. The base used in the string. Can be any integer between 2 and 36, inclusive. Returns the numeric representation of the value with the given base, or `nil` if the conversion failed. ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#tostring) tostring `tostring(var: any):` `string` Name Type Description **var** `**any**` The object to be converted to a string. Returns the string representation of the value. ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#type) type `type(var: any):` `string` Name Type Description **var** `**any**` The object to get the type of. Returns the name of the object's type. ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#unpack) unpack `unpack(tbl: table, start_index: number, end_index: number):` `...` Name Type Description **tbl** `**table**` The table to generate the vararg from. **start\_index** `**number**` Which index to start from. Optional. **end\_index** `**number**` Which index to end at. Optional, even if you set `start_index`. ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#xpcall) xpcall `xpcall(func: function, err_callback: function[, ...]):` `boolean`, `...` Name Type Description **func** `**function**` The function to call initially. **err\_callback** `**function**` The function to be called if execution of the first fails. The error message is passed as a string. **...** `**any**` Arguments to pass to the initial function. Attempts to call the first function. If the execution succeeds, this returns `true` followed by the returns of the function. If execution fails, this returns `false` and the second function is called with the error message. ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#to_ticks) to\_ticks `to_ticks(time: number):` `number` Name Type Description **time** `**number**` The seconds to convert to ticks. Converts time (seconds) to ticks. ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#to_time) to\_time `to_time(ticks: number):` `number` Name Type Description **ticks** `**number**` The number of ticks to convert to time. Converts ticks to time (seconds). ### [](https://docs-csgo.neverlose.cc/documentation/variables/_g#new_class) new\_class > ℹ️ This class system makes it easier to structure code in complex projects. `new_class():` `metatable` Creates the new class. Example1 Example2 > You can also create multiple structs and access one from another. [PreviousVariables](https://docs-csgo.neverlose.cc/documentation/variables) [Nextbit](https://docs-csgo.neverlose.cc/documentation/variables/bit) Last updated 2 years ago * [assert](https://docs-csgo.neverlose.cc/documentation/variables/_g#assert) * [error](https://docs-csgo.neverlose.cc/documentation/variables/_g#error) * [getmetatable](https://docs-csgo.neverlose.cc/documentation/variables/_g#getmetatable) * [ipairs](https://docs-csgo.neverlose.cc/documentation/variables/_g#ipairs) * [print](https://docs-csgo.neverlose.cc/documentation/variables/_g#print) * [print\_error](https://docs-csgo.neverlose.cc/documentation/variables/_g#print_error) * [print\_chat](https://docs-csgo.neverlose.cc/documentation/variables/_g#print_chat) * [print\_raw](https://docs-csgo.neverlose.cc/documentation/variables/_g#print_raw) * [print\_dev](https://docs-csgo.neverlose.cc/documentation/variables/_g#print_dev) * [tonumber](https://docs-csgo.neverlose.cc/documentation/variables/_g#tonumber) * [tostring](https://docs-csgo.neverlose.cc/documentation/variables/_g#tostring) * [type](https://docs-csgo.neverlose.cc/documentation/variables/_g#type) * [unpack](https://docs-csgo.neverlose.cc/documentation/variables/_g#unpack) * [xpcall](https://docs-csgo.neverlose.cc/documentation/variables/_g#xpcall) * [to\_ticks](https://docs-csgo.neverlose.cc/documentation/variables/_g#to_ticks) * [to\_time](https://docs-csgo.neverlose.cc/documentation/variables/_g#to_time) * [new\_class](https://docs-csgo.neverlose.cc/documentation/variables/_g#new_class) Copy local ctx = new_class() :struct 'struct_one' { variable1 = 'test', some_function = function(self, arg1) print(arg1) print(string.format('Hello World (%s)', self.variable1)) end } ctx.struct_one:some_function('test') Copy local ctx = new_class() :struct 'struct_one' { variable = 1, some_function = function(self) print(string.format( 'variable from struct_two: %d', self.struct_two.variable )) end } :struct 'struct_two' { variable = 2, some_function = function(self) print(string.format( 'variable from struct_one: %d', self.struct_one.variable )) end } ctx.struct_two:some_function() ctx.struct_one:some_function() print(ctx.struct_one.variable) --- # rage | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/rage.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/rage#structs) Structs: ------------------------------------------------------------------------------------- [](https://docs-csgo.neverlose.cc/documentation/variables/rage#antiaim) 🔗 `antiaim` ----------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/rage#get_max_desync) :get\_max\_desync `rage.antiaim:get_max_desync():` `number` Returns the maximum amount of desync. ### [](https://docs-csgo.neverlose.cc/documentation/variables/rage#get_rotation) :get\_rotation `rage.antiaim:get_rotation([value: boolean]):` `number` Name Type Description **value** `**boolean**` Optional. If `true`, fake rotation will be returned. Returns the current anti-aim rotation. ### [](https://docs-csgo.neverlose.cc/documentation/variables/rage#get_target) :get\_target `rage.antiaim:get_target([return_fr: boolean]):` `number` Name Type Description **return\_fr** `**boolean**` Optional. If `true`, freestanding yaw will be returned. Returns the at target yaw rotation or nil if not available. ### [](https://docs-csgo.neverlose.cc/documentation/variables/rage#inverter) :inverter `rage.antiaim:inverter([value: boolean]):` `boolean` Name Type Description **value** `**boolean**` Optional. Inverter state. Gets or sets the state of the anti-aim inverter. ### [](https://docs-csgo.neverlose.cc/documentation/variables/rage#override_hidden_pitch) :override\_hidden\_pitch `rage.antiaim:override_hidden_pitch(value: number):` `number` Name Type Description **value** `**number**` Hidden pitch value. Overrides the hidden pitch to the desired value. ### [](https://docs-csgo.neverlose.cc/documentation/variables/rage#override_hidden_yaw_offset) :override\_hidden\_yaw\_offset `rage.antiaim:override_hidden_yaw_offset(value: number):` `number` Name Type Description **value** `**number**` Hidden yaw offset value. Overrides the hidden yaw offset to the desired value. [](https://docs-csgo.neverlose.cc/documentation/variables/rage#exploit) 🔗 `exploit` ----------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/rage#get) :get `rage.exploit:get():` `number` Returns the exploit charge as a unit interval (value in the range \[0, 1\]). ### [](https://docs-csgo.neverlose.cc/documentation/variables/rage#allow_charge) :allow\_charge `rage.exploit:allow_charge([value: boolean])` Name Type Description **value** `**boolean**` Optional. If `true`, allows exploit charge. If `false`, blocks exploit charge. Defaults to `true` Allows/blocks exploit charge. ### [](https://docs-csgo.neverlose.cc/documentation/variables/rage#allow_defensive) :allow\_defensive `rage.exploit:allow_defensive([value: boolean])` Name Type Description **value** `**boolean**` Optional. If `true`, allows the cheat to discharge defensive exploit. If `false`, blocks defensive exploit discharge. Defaults to `true` Allows/blocks defensive exploit discharge. ### [](https://docs-csgo.neverlose.cc/documentation/variables/rage#force_teleport) :force\_teleport `rage.exploit:force_teleport()` ### [](https://docs-csgo.neverlose.cc/documentation/variables/rage#force_charge) :force\_charge `rage.exploit:force_charge()` [Previouspanorama](https://docs-csgo.neverlose.cc/documentation/variables/panorama) [Nextrender](https://docs-csgo.neverlose.cc/documentation/variables/render) Last updated 2 years ago * [Structs:](https://docs-csgo.neverlose.cc/documentation/variables/rage#structs) * [🔗 antiaim](https://docs-csgo.neverlose.cc/documentation/variables/rage#antiaim) * [:get\_max\_desync](https://docs-csgo.neverlose.cc/documentation/variables/rage#get_max_desync) * [:get\_rotation](https://docs-csgo.neverlose.cc/documentation/variables/rage#get_rotation) * [:get\_target](https://docs-csgo.neverlose.cc/documentation/variables/rage#get_target) * [:inverter](https://docs-csgo.neverlose.cc/documentation/variables/rage#inverter) * [:override\_hidden\_pitch](https://docs-csgo.neverlose.cc/documentation/variables/rage#override_hidden_pitch) * [:override\_hidden\_yaw\_offset](https://docs-csgo.neverlose.cc/documentation/variables/rage#override_hidden_yaw_offset) * [🔗 exploit](https://docs-csgo.neverlose.cc/documentation/variables/rage#exploit) * [:get](https://docs-csgo.neverlose.cc/documentation/variables/rage#get) * [:allow\_charge](https://docs-csgo.neverlose.cc/documentation/variables/rage#allow_charge) * [:allow\_defensive](https://docs-csgo.neverlose.cc/documentation/variables/rage#allow_defensive) * [:force\_teleport](https://docs-csgo.neverlose.cc/documentation/variables/rage#force_teleport) * [:force\_charge](https://docs-csgo.neverlose.cc/documentation/variables/rage#force_charge) --- # math | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/math.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/math#functions) Functions: ----------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/math#abs) abs `math.abs(x: number):` `number` Name Type Description **x** `**number**` Number Returns the absolute value of x. ### [](https://docs-csgo.neverlose.cc/documentation/variables/math#acos) acos `math.acos(x: number):` `number` Name Type Description **x** `**number**` Number Returns the arc cosine of x (in radians). ### [](https://docs-csgo.neverlose.cc/documentation/variables/math#asin) asin `math.asin(x: number):` `number` Name Type Description **x** `**number**` Number Returns the arc sine of x (in radians). ### [](https://docs-csgo.neverlose.cc/documentation/variables/math#atan) atan `math.atan(x: number):` `number` Name Type Description **x** `**number**` Number Returns the arc tangent of x (in radians). ### [](https://docs-csgo.neverlose.cc/documentation/variables/math#atan2) atan2 `math.atan2(x: number, y: number):` `number` Name Type Description **x** `**number**` Number **y** `**number**` Number Returns the arc tangent of y/x (in radians), but uses the signs of both parameters to find the quadrant of the result. (It also handles correctly the case of x being zero.) ### [](https://docs-csgo.neverlose.cc/documentation/variables/math#ceil) ceil `math.ceil(x: number):` `number` Name Type Description **x** `**number**` Number Returns the smallest integer larger than or equal to x. ### [](https://docs-csgo.neverlose.cc/documentation/variables/math#clamp) clamp `math.clamp(value: number[, min: number, max: number]):` `number` Name Type Description **value** `**number**` The value to clamp **min** `**number**` The minimum value **max** `**number**` The maximum value Returns the clamped value. ### [](https://docs-csgo.neverlose.cc/documentation/variables/math#cos) cos `math.cos(x: number):` `number` Name Type Description **x** `**number**` Number Returns the cosine of x (assumed to be in radians). ### [](https://docs-csgo.neverlose.cc/documentation/variables/math#cosh) cosh `math.cosh(x: number):` `number` Name Type Description **x** `**number**` Number Returns the hyperbolic cosine of x. ### [](https://docs-csgo.neverlose.cc/documentation/variables/math#deg) deg `math.deg(x: number):` `number` Name Type Description **x** `**number**` Number Returns the angle x (given in radians) in degrees. ### [](https://docs-csgo.neverlose.cc/documentation/variables/math#exp) exp `math.exp(x: number):` `number` Name Type Description **x** `**number**` Number Returns the value e power x. ### [](https://docs-csgo.neverlose.cc/documentation/variables/math#floor) floor `math.floor(x: number):` `number` Name Type Description **x** `**number**` Number Returns the largest integer smaller than or equal to x. ### [](https://docs-csgo.neverlose.cc/documentation/variables/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. ### [](https://docs-csgo.neverlose.cc/documentation/variables/math#frexp) frexp `math.frexp(x: number):` `number`, `number` Name Type Description **x** `**number**` Number x\=m2ex = m2^ex\=m2e 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).\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/math#huge)\ \ huge\ \ `math.huge` `:` `number`\ \ The value HUGE\_VAL, a value larger than or equal to any other numerical value.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/math#ldexp)\ \ **ldexp**\ \ `math.ldexp(x: number, e: number):` `number`\ \ Name\ \ Type\ \ Description\ \ **x**\ \ `**number**`\ \ Number\ \ **e**\ \ `**number**`\ \ Number\ \ output\=m2eoutput = m2^eoutput\=m2e\ \ Returns `m2e` (e should be an integer).\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/math#log)\ \ log\ \ `math.log(x: number):` `number`\ \ Name\ \ Type\ \ Description\ \ **x**\ \ `**number**`\ \ Number\ \ Returns the natural logarithm of x.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/math#log10)\ \ log10\ \ `math.log10(x: number):` `number`\ \ Name\ \ Type\ \ Description\ \ **x**\ \ `**number**`\ \ Number\ \ Returns the base-10 logarithm of x.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/math#map)\ \ map\ \ `math.map(value: number, in_from: number, in_to: number, out_from: number, out_to: number[, should_clamp: boolean]):` `number`\ \ Name\ \ Type\ \ Description\ \ **value**\ \ `**number**`\ \ The value to map\ \ **in\_from**\ \ `**number**`\ \ In minimum value\ \ **in\_to**\ \ `**number**`\ \ In maximum value\ \ **out\_from**\ \ `**number**`\ \ Out minimum value\ \ **out\_to**\ \ `**number**`\ \ Out maximum value\ \ **should\_clamp**\ \ `**boolean**`\ \ Clamp `In` range\ \ Linearly maps two number ranges and returns the mapped value.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/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.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/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.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/math#modf)\ \ modf\ \ `math.modf(x: number):` `number`\ \ Name\ \ Type\ \ Description\ \ **x**\ \ `**number**`\ \ Number\ \ Returns two numbers, the integral part of x and the fractional part of x.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/math#normalize_yaw)\ \ normalize\_yaw\ \ `math.normalize_yaw(x: number):` `number`\ \ Name\ \ Type\ \ Description\ \ **x**\ \ `**number**`\ \ Number\ \ Returns the normalized yaw angle value.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/math#pi)\ \ pi\ \ `math.pi` `:` `number`\ \ The value of pi.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/math#pow)\ \ pow\ \ `math.pow(x: number, y: number):` `number`\ \ Name\ \ Type\ \ Description\ \ **x**\ \ `**number**`\ \ Number\ \ **y**\ \ `**number**`\ \ Number\ \ Returns x^y. (You can also use the expression x^y to compute this value.)\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/math#rad)\ \ rad\ \ `math.rad(x: number):` `number`\ \ Name\ \ Type\ \ Description\ \ **x**\ \ `**number**`\ \ Number\ \ Returns the angle x (given in degrees) in radians.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/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\].\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/math#randomseed)\ \ randomseed\ \ `math.randomseed(x: number):` `number`\ \ Name\ \ Type\ \ Description\ \ **x**\ \ `**number**`\ \ Number\ \ Sets x as the "seed" for the pseudo-random generator: equal seeds produce equal sequences of numbers.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/math#sin)\ \ sin\ \ `math.sin(x: number):` `number`\ \ Name\ \ Type\ \ Description\ \ **x**\ \ `**number**`\ \ Number\ \ Returns the sine of x (assumed to be in radians).\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/math#sinh)\ \ sinh\ \ `math.sinh(x: number):` `number`\ \ Name\ \ Type\ \ Description\ \ **x**\ \ `**number**`\ \ Number\ \ Returns the hyperbolic sine of x.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/math#sqrt)\ \ sqrt\ \ `math.sqrt(x: number):` `number`\ \ Name\ \ Type\ \ Description\ \ **x**\ \ `**number**`\ \ Number\ \ Returns the square root of x. (You can also use the expression x^0.5 to compute this value.)\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/math#tan)\ \ tan\ \ `math.tan(x: number):` `number`\ \ Name\ \ Type\ \ Description\ \ **x**\ \ `**number**`\ \ Number\ \ Returns the tangent of x (assumed to be in radians).\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/math#tanh)\ \ tanh\ \ `math.tanh(x: number):` `number`\ \ Name\ \ Type\ \ Description\ \ **x**\ \ `**number**`\ \ Number\ \ Returns the hyperbolic tangent of x.\ \ [Previousmaterials](https://docs-csgo.neverlose.cc/documentation/variables/materials)\ [Nextui](https://docs-csgo.neverlose.cc/documentation/variables/ui)\ \ Last updated 4 years ago\ \ * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/math#functions)\ \ * [abs](https://docs-csgo.neverlose.cc/documentation/variables/math#abs)\ \ * [acos](https://docs-csgo.neverlose.cc/documentation/variables/math#acos)\ \ * [asin](https://docs-csgo.neverlose.cc/documentation/variables/math#asin)\ \ * [atan](https://docs-csgo.neverlose.cc/documentation/variables/math#atan)\ \ * [atan2](https://docs-csgo.neverlose.cc/documentation/variables/math#atan2)\ \ * [ceil](https://docs-csgo.neverlose.cc/documentation/variables/math#ceil)\ \ * [clamp](https://docs-csgo.neverlose.cc/documentation/variables/math#clamp)\ \ * [cos](https://docs-csgo.neverlose.cc/documentation/variables/math#cos)\ \ * [cosh](https://docs-csgo.neverlose.cc/documentation/variables/math#cosh)\ \ * [deg](https://docs-csgo.neverlose.cc/documentation/variables/math#deg)\ \ * [exp](https://docs-csgo.neverlose.cc/documentation/variables/math#exp)\ \ * [floor](https://docs-csgo.neverlose.cc/documentation/variables/math#floor)\ \ * [fmod](https://docs-csgo.neverlose.cc/documentation/variables/math#fmod)\ \ * [frexp](https://docs-csgo.neverlose.cc/documentation/variables/math#frexp)\ \ * [huge](https://docs-csgo.neverlose.cc/documentation/variables/math#huge)\ \ * [ldexp](https://docs-csgo.neverlose.cc/documentation/variables/math#ldexp)\ \ * [log](https://docs-csgo.neverlose.cc/documentation/variables/math#log)\ \ * [log10](https://docs-csgo.neverlose.cc/documentation/variables/math#log10)\ \ * [map](https://docs-csgo.neverlose.cc/documentation/variables/math#map)\ \ * [max](https://docs-csgo.neverlose.cc/documentation/variables/math#max)\ \ * [min](https://docs-csgo.neverlose.cc/documentation/variables/math#min)\ \ * [modf](https://docs-csgo.neverlose.cc/documentation/variables/math#modf)\ \ * [normalize\_yaw](https://docs-csgo.neverlose.cc/documentation/variables/math#normalize_yaw)\ \ * [pi](https://docs-csgo.neverlose.cc/documentation/variables/math#pi)\ \ * [pow](https://docs-csgo.neverlose.cc/documentation/variables/math#pow)\ \ * [rad](https://docs-csgo.neverlose.cc/documentation/variables/math#rad)\ \ * [random](https://docs-csgo.neverlose.cc/documentation/variables/math#random)\ \ * [randomseed](https://docs-csgo.neverlose.cc/documentation/variables/math#randomseed)\ \ * [sin](https://docs-csgo.neverlose.cc/documentation/variables/math#sin)\ \ * [sinh](https://docs-csgo.neverlose.cc/documentation/variables/math#sinh)\ \ * [sqrt](https://docs-csgo.neverlose.cc/documentation/variables/math#sqrt)\ \ * [tan](https://docs-csgo.neverlose.cc/documentation/variables/math#tan)\ \ * [tanh](https://docs-csgo.neverlose.cc/documentation/variables/math#tanh) --- # vector | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/vector.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/vector#example-available) Example available! ----------------------------------------------------------------------------------------------------------- [⚙️Vector](https://docs-csgo.neverlose.cc/useful-information/script-examples/vector) [](https://docs-csgo.neverlose.cc/documentation/variables/vector#functions) Functions: ------------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#angles) :angles Initialize from Initialize from \[2\] Convert to `vec_object:angles(pitch: number, yaw: number):` `vector` Name Type Description **pitch** `**number**` Pitch component of the angle **yaw** `**number**` Yaw component of the angle Converts the angle into a forward vector overwriting the vector's coordinates. Returns itself. `vec_object:angles(vector: angle):` `vector` Name Type Description **angle** `**vector**` Angle vector component Converts the angle into a forward vector overwriting the vector's coordinates. Returns itself. `vec_object:angles():` `vector` Returns the angle vector representing the normal of the vector. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#ceil) :ceil `vec_object:ceil():` `vector` Ceils & overwrites the x, y, and z coordinates of a vector. Returns itself. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#clone) :clone `vec_object:clone():` `vector` Creates and returns a copy of the vector. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#closest_ray_point) :closest\_ray\_point `vec_object:closest_ray_point(ray_start: vector, ray_end: vector):` `vector` Name Type Description **ray\_start** `**vector**` Ray start position **ray\_end** `**vector**` Ray end position Returns the vector of the closest point along a ray. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#cross) :cross `vec_object:cross(other: vector):` `vector` Name Type Description **other** `**vector**` The vector to calculate the cross product with Returns the cross product of two given vectors. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#dist) :dist `vec_object:dist(other: vector):` `number` Name Type Description **other** `**vector**` The vector to get the distance to Returns the Euclidean distance between the two given vectors. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#dist2d) :dist2d `vec_object:dist2d(other: vector):` `number` Name Type Description **other** `**vector**` The vector to get the distance to Returns the 2D distance to another vector. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#dist2dsqr) :dist2dsqr `vec_object:dist2dsqr(other: vector):` `number` Name Type Description **other** `**vector**` The vector to get the squared distance to Returns the squared 2D distance to another vector. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#distsqr) :distsqr `vec_object:distsqr(other: vector):` `number` Name Type Description **other** `**vector**` The vector to get the squared distance to Returns the squared Euclidean distance to another vector. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#dist_to_ray) :dist\_to\_ray `vec_object:dist_to_ray(ray_start: vector, ray_direction: vector):` `number` Name Type Description **ray\_start** `**vector**` Ray start position **ray\_direction** `**vector**` Ray direction Returns the distance to a ray. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#dot) :dot `vec_object:dot(other: vector):` `number` Name Type Description **other** `**vector**` The vector to calculate the dot product with Returns the dot product of the two given vectors. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#floor) :floor `vec_object:floor():` `vector` Rounds the x, y, and z coordinates of the vector down to the largest integer that is less than or equal. Returns itself. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#in_range) :in\_range `vec_object:in_range(other: vector, range: number):` `boolean` Name Type Description **other** `**vector**` The vector to calculate the distance to **range** `**number**` The distance Returns true if the vector is within the given distance to another vector. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#init) :init `vec_object:init(x: number, y: number, z: number):` `vector` Name Type Description **x** `**number**` New X coordinate **y** `**number**` New Y coordinate **z** `**number**` New Z coordinate Overwrites the vector's coordinates. Returns itself. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#length) :length `vec_object:length():` `number` Returns the Euclidean length of the vector. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#length2d) :length2d `vec_object:length2d():` `number` Returns the length of the vector in two dimensions, without the Z axis. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#length2dsqr) :length2dsqr `vec_object:length2dsqr():` `number` Returns the squared length of the vectors x and y value. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#lengthsqr) :lengthsqr `vec_object:lengthsqr():` `number` Returns the squared length of the vector. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#lerp) :lerp `vec_object: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 the linearly interpolated vector between two vectors by the specified weight. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#normalize) :normalize `vec_object:normalize():` `number` Normalizes the vector and returns the length of the vector. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#normalized) :normalized `vec_object:normalized():` `vector` Returns a vector with the same direction as the specified vector, but with a length of one. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#scale) :scale `vec_object:scale(scalar: number):` `vector` Name Type Description **scalar** number The scalar value Multiplies the vector by the specified scalar. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#scaled) :scaled `vec_object:scaled(scalar: number):` `vector` Name Type Description **scalar** number The scalar value. Returns a copy of the vector multiplied by the specified scalar. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#to) :to `vec_object:to(other: vector):` `vector` Name Type Description **other** `**vector**` The vector to get the direction to. Returns the forward vector from itself to another vector. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#to_screen) :to\_screen `vec_object:to_screen():` `vector` Returns a vector containing the coordinates where the specified position vector appears on the screen. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#unpack) :unpack `vec_object:unpack():` `number`, `number`, `number` Returns the x, y, and z coordinates of the vector. Note that these fields can be accessed by indexing x, y, and z. ### [](https://docs-csgo.neverlose.cc/documentation/variables/vector#vectors) :vectors `vec_object:vectors():` `vector`, `vector` Returns the right and up vector of a forward vector. [Previousutils](https://docs-csgo.neverlose.cc/documentation/variables/utils) Last updated 2 years ago * [Example available!](https://docs-csgo.neverlose.cc/documentation/variables/vector#example-available) * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/vector#functions) * [:angles](https://docs-csgo.neverlose.cc/documentation/variables/vector#angles) * [:ceil](https://docs-csgo.neverlose.cc/documentation/variables/vector#ceil) * [:clone](https://docs-csgo.neverlose.cc/documentation/variables/vector#clone) * [:closest\_ray\_point](https://docs-csgo.neverlose.cc/documentation/variables/vector#closest_ray_point) * [:cross](https://docs-csgo.neverlose.cc/documentation/variables/vector#cross) * [:dist](https://docs-csgo.neverlose.cc/documentation/variables/vector#dist) * [:dist2d](https://docs-csgo.neverlose.cc/documentation/variables/vector#dist2d) * [:dist2dsqr](https://docs-csgo.neverlose.cc/documentation/variables/vector#dist2dsqr) * [:distsqr](https://docs-csgo.neverlose.cc/documentation/variables/vector#distsqr) * [:dist\_to\_ray](https://docs-csgo.neverlose.cc/documentation/variables/vector#dist_to_ray) * [:dot](https://docs-csgo.neverlose.cc/documentation/variables/vector#dot) * [:floor](https://docs-csgo.neverlose.cc/documentation/variables/vector#floor) * [:in\_range](https://docs-csgo.neverlose.cc/documentation/variables/vector#in_range) * [:init](https://docs-csgo.neverlose.cc/documentation/variables/vector#init) * [:length](https://docs-csgo.neverlose.cc/documentation/variables/vector#length) * [:length2d](https://docs-csgo.neverlose.cc/documentation/variables/vector#length2d) * [:length2dsqr](https://docs-csgo.neverlose.cc/documentation/variables/vector#length2dsqr) * [:lengthsqr](https://docs-csgo.neverlose.cc/documentation/variables/vector#lengthsqr) * [:lerp](https://docs-csgo.neverlose.cc/documentation/variables/vector#lerp) * [:normalize](https://docs-csgo.neverlose.cc/documentation/variables/vector#normalize) * [:normalized](https://docs-csgo.neverlose.cc/documentation/variables/vector#normalized) * [:scale](https://docs-csgo.neverlose.cc/documentation/variables/vector#scale) * [:scaled](https://docs-csgo.neverlose.cc/documentation/variables/vector#scaled) * [:to](https://docs-csgo.neverlose.cc/documentation/variables/vector#to) * [:to\_screen](https://docs-csgo.neverlose.cc/documentation/variables/vector#to_screen) * [:unpack](https://docs-csgo.neverlose.cc/documentation/variables/vector#unpack) * [:vectors](https://docs-csgo.neverlose.cc/documentation/variables/vector#vectors) --- # utils | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/utils.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/utils#functions) Functions: ------------------------------------------------------------------------------------------ ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#console_exec) console\_exec `utils.console_exec(cmd: string[, ...])` Name Type Description **cmd** `**string**` The console command(s) to execute **...** Comma-separated arguments to concatenate with **cmd** Executes a console command. Multiple commands can be combined with ';'. Be careful when passing user input (including usernames) to it. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#execute_after) execute\_after `utils.execute_after(delay: number, callback: function[, ...])` Name Type Description **delay** `**number**` Time in seconds to wait before calling callback **callback** `**function**` The Lua function that will be called after the delay **...** Arguments that will be passed to the callback Executes the callback after delay seconds, passing the arguments to it. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#net_channel) net\_channel `utils.net_channel():` `NetChannel` Returns the [`NetChannel`](https://docs-csgo.neverlose.cc/documentation/variables/utils#netchannel) struct. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#trace_line) trace\_line [https://developer.valvesoftware.com/wiki/UTIL\_TraceLinedeveloper.valvesoftware.com](https://developer.valvesoftware.com/wiki/UTIL_TraceLine) `utils.trace_line(from: vector, to: vector[, skip: entity/table/function, mask: number, type: number]):` `trace` Name Type Description **from** `**vector**` Vector to start tracing from **to** `**vector**` Vector to trace to **skip** `**entity**`, `**table**`, `**function**` Optional. Entity skipping options **mask** `**number**` Optional. Trace mask **type** `**number**` Optional. Trace type \[0-3\] `0`: Trace everything `[Default]` `1`: Trace world only `2`: Trace entities only `3`: Trace everything filter props > 📌 The `skip` argument can either be an `entity` object, a table with `entity` objects, or a function, like the ShouldHitEntity callback. If you use it as a callback, you can access the `entity` and `contents_mask` by adding them to the function arguments. Inside the callback, return true if tracing should not skip the entity, otherwise return false. Returns a [`trace`](https://docs-csgo.neverlose.cc/documentation/variables/utils#struct-trace) struct containing all the information. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#trace_hull) trace\_hull `utils.trace_hull(from: vector, to: vector, mins: vector, maxs: vector[, skip: entity/table/function, mask: number, type: number]):` `trace` Name Type Description **from** `**vector**` Vector to start tracing from **to** `**vector**` Vector to trace to **mins** `**vector**` Hull mins **maxs** `**vector**` Hull maxs **skip** `**entity**`, `**table**`, `**function**` Optional. Entity skipping options **mask** `**number**` Optional. Trace mask **type** `**number**` Optional. Trace type \[0-3\] `0`: Trace everything `[Default]` `1`: Trace world only `2`: Trace entities only `3`: Trace everything filter props > 📌 The `skip` argument can either be an `entity` object, a table with `entity` objects, or a function, like the ShouldHitEntity callback. If you use it as a callback, you can access the `entity` and `contents_mask` by adding them to the function arguments. Inside the callback, return true if tracing should not skip the entity, otherwise return false. Returns a [`trace`](https://docs-csgo.neverlose.cc/documentation/variables/utils#struct-trace) struct containing all the information. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#trace_bullet) trace\_bullet `utils.trace_bullet(from_entity: entity, from: vector, to: vector[, skip: entity/table/function]):` `number`, `trace` Name Type Description **from\_entity** `**entity**` Player whose weapon will be used for this trace **from** `**vector**` Vector to start tracing from **to** `**vector**` Vector to trace to **skip** `**entity**`, `**table**`, `**function**` Optional. Entity skipping options. If not passed, the skip entity will be `from_entity` > 📌 The `skip` argument can either be an `entity` object, a table with `entity` objects, or a function, like the ShouldHitEntity callback. If you use it as a callback, you can access the `entity` and `contents_mask` by adding them to the function arguments. Inside the callback, return true if tracing should not skip the entity, otherwise return false. Returns the `damage`, [`trace`](https://docs-csgo.neverlose.cc/documentation/variables/utils#struct-trace) arguments. #### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#struct-trace) 🔗 struct `trace` Name Type Description **start\_pos** `**vector**` Start position **end\_pos** `**vector**` Final position **plane** `**table**` Surface normal at impact. Contains `normal`, `dist`, `type`, and `signbits` values **fraction** `**number**` Percentage in the range \[0.0, 1.0\]. How far the trace went before hitting something. `1.0` - didn't hit anything **contents** `**number**` Contents on other side of surface hit **disp\_flags** `**number**` Displacement flags for marking surfaces with data **all\_solid** `**boolean**` Returns `true` if the plane is invalid **start\_solid** `**boolean**` Returns `true` if the initial point was in a solid area **fraction\_left\_solid** `**number**` Percentage in the range \[0.0, 1.0\]. How far the trace went before leaving solid. Only valid if we started in solid **surface** `**table**` Surface hit (impact surface). Contains `name`, `props`, and `flags` values **hitgroup** `**number**` `0` - generic, non-zero is specific body part **physics\_bone** `**number**` Physics bone that was hit by the trace **world\_surface\_index** `**number**` Index of the msurface2\_t, if applicable **entity** `**entity**` Entity that was hit by the trace **hitbox** `**number**` Box that was hit by the trace **did\_hit** `**function**` Returns `true` if there was any kind of impact at all **did\_hit\_world** `**function**` Returns `true` if the `entity` points at the world entity **did\_hit\_non\_world** `**function**` Returns `true` if the trace hit something and it wasn't the world **is\_visible** `**function**` Returns `true` if the final position is visible ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#opcode_scan) opcode\_scan `utils.opcode_scan(module: string, signature: string[, offset: number]):` `userdata` Name Type Description **module** `**string**` Module name, in which the signature will be scanned. **signature** `**string**` IDA style signature, the wildcard is "`?`" **offset** `**number**` Optional offset to apply to the pointer address. Returns a pointer to the specified pattern if it was found. Otherwise returns `nil`. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#create_interface) create\_interface `utils.create_interface(module: string, interface: string):` `userdata` Name Type Description **module** `**string**` Module name containing the interface. **interface** `**string**` Interface name. Returns a pointer to the specified interface if it was found. Otherwise returns `nil`. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#get_netvar_offset) get\_netvar\_offset `utils.get_netvar_offset(table: string, prop: string):` `number` Name Type Description **table** `**string**` Datatable name **prop** `**string**` Prop name Returns the offset of the specified prop. Can be used to manually navigate to the net prop. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#get_vfunc) get\_vfunc `utils.get_vfunc(index: number, ...):` `function` Name Type Description **index** `**number**` Virtual table index of the function. **...** FFI C Type definition. Creates and returns a wrapper function that calls a virtual table function on the specified index. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#get_vfunc-1) get\_vfunc `utils.get_vfunc(module: string, interface: string, index: number, ...):` `function` Name Type Description **module** `**string**` Module name containing the interface. **interface** `**string**` Interface name. **index** `**number**` Virtual table index of the function. **...** FFI C Type definition. Creates and returns a wrapper function that calls a virtual table function from the specified interface on the specified index. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#random_int) random\_int `utils.random_int(min: number, max: number):` `number` Name Type Description **min** `**number**` Minimum boundary for the random value, included **max** `**number**` Maximum boundary for the random value, included Returns a random integer value. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#random_float) random\_float `utils.random_float(min: number, max: number):` `number` Name Type Description **min** `**number**` Minimum boundary for the random value, included **max** `**number**` Maximum boundary for the random value, included Returns a random float value. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#random_seed) random\_seed `utils.random_seed(seed: number)` Name Type Description **seed** `**number**` New random seed value Sets the new random seed. [](https://docs-csgo.neverlose.cc/documentation/variables/utils#netchannel) 🔗 `NetChannel` ------------------------------------------------------------------------------------------------ Access the struct via [`.net_channel`](https://docs-csgo.neverlose.cc/documentation/variables/utils#net_channel) function * `FLOW:``OUTGOING` `= 0` * `FLOW:``INCOMING` `= 1` ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#time) time `net.time` `:` `number` Current network time. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#time_connected) time\_connected `net.time_connected` `:` `number` Connection time in seconds. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#time_since_last_received) time\_since\_last\_received `net.time_since_last_received` `:` `number` Time since last received packet in seconds. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#is_loopback) is\_loopback `net.is_loopback` `:` `boolean` Returns `true` if server is a loopback (local server). ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#is_playback) is\_playback `net.is_playback` `:` `boolean` Returns `true` if demo is being played. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#is_timing_out) is\_timing\_out `net.is_timing_out` `:` `boolean` Returns `true` if client is timing out. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#sequence_nr-flow) sequence\_nr\[`flow`\] `net.sequence_nr[0]` `:` `number` `net.sequence_nr[1]` `:` `number` Last sent sequence number. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#latency-flow) latency\[`flow`\] `net.latency[0]` `:` `number` `net.latency[1]` `:` `number` Current latency (RTT), more accurate but jittering. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#avg_latency-flow) avg\_latency\[`flow`\] `net.avg_latency[0]` `:` `number` `net.avg_latency[1]` `:` `number` Average latency in seconds. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#loss-flow) loss\[`flow`\] `net.loss[0]` `:` `number` `net.loss[1]` `:` `number` Percentage in the range \[0.0, 1.0\] of the current packet loss. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#choke-flow) choke\[`flow`\] `net.choke[0]` `:` `number` `net.choke[1]` `:` `number` Percentage in the range \[0.0, 1.0\] of the current packet choke. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#packets-flow) packets\[`flow`\] `net.packets[0]` `:` `number` `net.packets[1]` `:` `number` Average amount of packets/sec. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#data-flow) data\[`flow`\] `net.data[0]` `:` `number` `net.data[1]` `:` `number` Data flow in bytes/sec. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#total_packets-flow) total\_packets\[`flow`\] `net.total_packets[0]` `:` `number` `net.total_packets[1]` `:` `number` Total amount of packets/sec. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#total_data-flow) total\_data\[`flow`\] `net.total_data[0]` `:` `number` `net.total_data[1]` `:` `number` Total data flow in bytes/sec. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#get_server_info) :get\_server\_info `net:get_server_info():` `table` Returns a table containing `rate`, `name`, `address`, `frame_time`, and `deviation` (or nil on failure). ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#is_valid_packet) :is\_valid\_packet `net:is_valid_packet(flow: number, frame: number):` `number` Name Type Description **flow** `**number**` Channel (Flow) **frame** `**number**` Sequence number Returns `true` if the packet is valid. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#get_packet_time) :get\_packet\_time `net:get_packet_time(flow: number, frame: number):` `number` Name Type Description **flow** `**number**` Channel (Flow) **frame** `**number**` Sequence number Returns the time when the packet was sent. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#get_packet_bytes) :get\_packet\_bytes `net:get_packet_bytes(flow: number, frame: number, group: number):` `number` Name Type Description **flow** `**number**` Channel (Flow) **frame** `**number**` Sequence number **group** `**number**` Group of this packet Returns the group size of this packet. ### [](https://docs-csgo.neverlose.cc/documentation/variables/utils#get_packet_response_latency) :get\_packet\_response\_latency `net:get_packet_response_latency(flow: number, frame: number):` `number`, `number` Name Type Description **flow** `**number**` Channel (Flow) **frame** `**number**` Sequence number Returns `latency_msecs`, `choke` of this packet. [Previousrender](https://docs-csgo.neverlose.cc/documentation/variables/render) [Nextvector](https://docs-csgo.neverlose.cc/documentation/variables/vector) Last updated 4 years ago * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/utils#functions) * [console\_exec](https://docs-csgo.neverlose.cc/documentation/variables/utils#console_exec) * [execute\_after](https://docs-csgo.neverlose.cc/documentation/variables/utils#execute_after) * [net\_channel](https://docs-csgo.neverlose.cc/documentation/variables/utils#net_channel) * [trace\_line](https://docs-csgo.neverlose.cc/documentation/variables/utils#trace_line) * [trace\_hull](https://docs-csgo.neverlose.cc/documentation/variables/utils#trace_hull) * [trace\_bullet](https://docs-csgo.neverlose.cc/documentation/variables/utils#trace_bullet) * [opcode\_scan](https://docs-csgo.neverlose.cc/documentation/variables/utils#opcode_scan) * [create\_interface](https://docs-csgo.neverlose.cc/documentation/variables/utils#create_interface) * [get\_netvar\_offset](https://docs-csgo.neverlose.cc/documentation/variables/utils#get_netvar_offset) * [get\_vfunc](https://docs-csgo.neverlose.cc/documentation/variables/utils#get_vfunc) * [get\_vfunc](https://docs-csgo.neverlose.cc/documentation/variables/utils#get_vfunc-1) * [random\_int](https://docs-csgo.neverlose.cc/documentation/variables/utils#random_int) * [random\_float](https://docs-csgo.neverlose.cc/documentation/variables/utils#random_float) * [random\_seed](https://docs-csgo.neverlose.cc/documentation/variables/utils#random_seed) * [🔗 NetChannel](https://docs-csgo.neverlose.cc/documentation/variables/utils#netchannel) * [time](https://docs-csgo.neverlose.cc/documentation/variables/utils#time) * [time\_connected](https://docs-csgo.neverlose.cc/documentation/variables/utils#time_connected) * [time\_since\_last\_received](https://docs-csgo.neverlose.cc/documentation/variables/utils#time_since_last_received) * [is\_loopback](https://docs-csgo.neverlose.cc/documentation/variables/utils#is_loopback) * [is\_playback](https://docs-csgo.neverlose.cc/documentation/variables/utils#is_playback) * [is\_timing\_out](https://docs-csgo.neverlose.cc/documentation/variables/utils#is_timing_out) * [sequence\_nr\[flow\]](https://docs-csgo.neverlose.cc/documentation/variables/utils#sequence_nr-flow) * [latency\[flow\]](https://docs-csgo.neverlose.cc/documentation/variables/utils#latency-flow) * [avg\_latency\[flow\]](https://docs-csgo.neverlose.cc/documentation/variables/utils#avg_latency-flow) * [loss\[flow\]](https://docs-csgo.neverlose.cc/documentation/variables/utils#loss-flow) * [choke\[flow\]](https://docs-csgo.neverlose.cc/documentation/variables/utils#choke-flow) * [packets\[flow\]](https://docs-csgo.neverlose.cc/documentation/variables/utils#packets-flow) * [data\[flow\]](https://docs-csgo.neverlose.cc/documentation/variables/utils#data-flow) * [total\_packets\[flow\]](https://docs-csgo.neverlose.cc/documentation/variables/utils#total_packets-flow) * [total\_data\[flow\]](https://docs-csgo.neverlose.cc/documentation/variables/utils#total_data-flow) * [:get\_server\_info](https://docs-csgo.neverlose.cc/documentation/variables/utils#get_server_info) * [:is\_valid\_packet](https://docs-csgo.neverlose.cc/documentation/variables/utils#is_valid_packet) * [:get\_packet\_time](https://docs-csgo.neverlose.cc/documentation/variables/utils#get_packet_time) * [:get\_packet\_bytes](https://docs-csgo.neverlose.cc/documentation/variables/utils#get_packet_bytes) * [:get\_packet\_response\_latency](https://docs-csgo.neverlose.cc/documentation/variables/utils#get_packet_response_latency) --- # entity | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/entity.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/entity#functions) Functions: ------------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get) get `entity.get(idx: number[, by_userid: boolean]):` `entity` Name Type Description **idx** `**number**` Index of the entity **by\_userid** `**boolean**` If `true` then **idx** will be perceived as a userid Returns a pointer to the specified entity. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_local_player) get\_local\_player `entity.get_local_player():` `entity` Returns a pointer to the local player. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_players) get\_players `entity.get_players([enemies_only: boolean, include_dormant: boolean, callback: function]):``table` Name Type Description **enemies\_only** `**boolean**` If `true` then only enemies will be included **include\_dormant** `**boolean**` If `true` then dormant players will be included **callback** `**function**` A callback with an entity pointer as the argument If the callback is nil, it returns the table of pointers to player entities. Otherwise the callback will be called. Access the player pointer using the arguments of the specified callback. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_entities) get\_entities `entity.get_entities([class: number/string, include_dormant: boolean, callback: function]):` `table` Name Type Description **class** `**number/string**` Either a name or an ID of the needed class. Pass `nil` to get every entity. **include\_dormant** `**boolean**` If `true` then dormant players will be included **callback** `**function**` A callback with an entity pointer as the argument If the callback is nil, it returns the table of pointers to entities. Otherwise the callback will be called. Access the entity pointer using the arguments of the specified callback. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_threat) get\_threat `entity.get_threat([ hittable: boolean ]):` `entity` Name Type Description **hittable** `**boolean**` If `true` then returns a pointer to the player that can hit you Returns a pointer to the current threat. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_game_rules) get\_game\_rules `entity.get_game_rules():` `entity` Returns the pointer to the CCSGameRulesProxy instance, or nil if none exists. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_player_resource) get\_player\_resource `entity.get_player_resource():` `entity` Returns the pointer to the CCSPlayerResource instance, or nil if none exists. [](https://docs-csgo.neverlose.cc/documentation/variables/entity#netprops) Netprops ---------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#getting-ffi-pointer) Getting FFI pointer `ent[0]` `:` `userdata` Returns the `ffi` pointer to the entity. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#getting-netprop-values) Getting netprop values `ent.prop_name:` `any` `ent.prop_name[index]:` `any` `ent["prop_name"]:` `any` Name Type Description **prop\_name** `**string**` Name of the networked property **index** `**number**` Optional. If `prop_name` is an array, the value at this array index will be returned ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#setting-netprop-values) Setting netprop values `ent.prop_name = value` `ent.prop_name[index] = value` `ent["prop_name"] = value` Name Type Description **prop\_name** `**string**` Name of the networked property **value** `**any**` The property will be set to this value **index** `**number**` Optional. If `prop_name` is an array, the value at this array index will be set [](https://docs-csgo.neverlose.cc/documentation/variables/entity#common) Common ------------------------------------------------------------------------------------ ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#is_player) :is\_player `ent:is_player():` `boolean` Returns `true` if the entity is a player entity. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#is_weapon) :is\_weapon `ent:is_weapon():` `boolean` Returns `true` if the entity is a weapon entity. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#is_dormant) :is\_dormant `ent:is_dormant():` `boolean` Returns `true` if the entity is dormant. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#is_bot) :is\_bot `ent:is_bot():` `boolean` Returns `true` if the entity is a bot. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#is_alive) :is\_alive `ent:is_alive():` `boolean` Returns `true` if the entity is alive. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#is_enemy) :is\_enemy `ent:is_enemy():` `boolean` Returns `true` if the entity is an enemy. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#is_visible) :is\_visible `ent:is_visible():` `boolean` Returns `true` if the entity is visible. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#is_occluded) :is\_occluded `ent:is_occluded([ to_entity: entity ]):` `boolean` Name Type Description **to\_entity** `**entity**` Optional. The entity that will be checked for occlusion If the `to_entity` is nil, the local player is checked. Returns `true` if the entity is completely occluded for the current entity. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_index) :get\_index `ent:get_index():` `number` Returns the index of the entity. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_name) :get\_name `ent:get_name():` `string` Returns the player name, weapon name or class name if the entity is neither of those. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_origin) :get\_origin `ent:get_origin():` `vector` Returns the position vector of the entity. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_angles) :get\_angles `ent:get_angles():` `vector` Returns the absolute angles of the entity. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_simulation_time) :get\_simulation\_time `ent:get_simulation_time():` `table` Returns a table containing `current` and `old` simulation time values. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_classname) :get\_classname `ent:get_classname():` `string` Returns the name of the entity's class. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_classid) :get\_classid `ent:get_classid():` `number` Returns the ID of the entity's class. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_materials) :get\_materials `ent:get_materials():` `table` Returns a table containing all materials used by the entity. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_model_name) :get\_model\_name `ent:get_model_name():` `string` Returns the model name of the entity. [](https://docs-csgo.neverlose.cc/documentation/variables/entity#players) Players -------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_network_state) :get\_network\_state `ent:get_network_state():` `number` Returns the network state of the player. ID Description **0** The entity is `not dormant` **1** The entity is dormant but the cheat has 100% info where the player is **2** The entity is dormant (updated by `Shared ESP`) **3** The entity is dormant (updated by `Sounds`) **4** The entity is dormant (not updated) **5** The entity is dormant (data is `unavailable` or `too old`) ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_bbox) :get\_bbox `ent:get_bbox():` `table` Returns a table containing `pos1`, `pos2`, and `alpha` values. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_player_info) :get\_player\_info `ent:get_player_info():` `table` Returns a table containing information from the `player_info_t` structure of the entity. Table values: `is_hltv`, `is_fake_player`, `steamid`, `steamid64`, `userid`, and `files_downloaded` ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_player_weapon) :get\_player\_weapon `ent:get_player_weapon([all_weapons: boolean]):` `entity / table` Name Type Description **all\_weapons** `**boolean**` If `true` then all weapons will be included Returns a pointer to the player's weapon entity. If `all_weapons` is `true`, returns a table containing pointers to every weapon entity the player is currently carrying. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_anim_state) :get\_anim\_state `ent:get_anim_state():` `table` Returns a table containing information about the animation state of the player. 🧷 Animation state keys[](https://docs-csgo.neverlose.cc/documentation/variables/entity#animation-state-keys) * \[number\] abs\_yaw * \[number\] abs\_yaw\_last * \[vector\] acceleration * \[number\] acceleration\_weight * \[number\] action\_weight\_bias\_remainder * \[boolean\] adjust\_started * \[number\] aim\_matrix\_transition * \[number\] aim\_matrix\_transition\_delay * \[number\] aim\_pitch\_max * \[number\] aim\_pitch\_min * \[number\] aim\_yaw\_max * \[number\] aim\_yaw\_min * \[number\] anim\_duck\_amount * \[number\] animstate\_model\_version * \[number\] cached\_model\_index * \[number\] camera\_smooth\_height * \[userdata\] crouch\_walk\_aim * \[boolean\] defuse\_started * \[number\] duck\_additional * \[number\] duration\_in\_air * \[number\] duration\_move\_weight\_is\_too\_high * \[number\] duration\_moving * \[number\] duration\_still * \[number\] duration\_strafing * \[number\] eye\_pitch * \[number\] eye\_position\_smooth\_lerp * \[number\] eye\_yaw * \[boolean\] feet\_crossed * \[boolean\] first\_foot\_plant\_since\_init * \[boolean\] first\_run\_since\_init * \[boolean\] flashed * \[userdata\] foot\_left * \[number\] foot\_lerp * \[userdata\] foot\_right * \[number\] in\_air\_smooth\_value * \[number\] jump\_to\_fall * \[number\] ladder\_speed * \[number\] ladder\_weight * \[number\] land\_anim\_multiplier * \[boolean\] landed\_on\_ground\_this\_frame * \[boolean\] landing * \[number\] last\_foot\_plant\_update * \[number\] last\_rendered\_eye\_z * \[number\] last\_time\_velocity\_over\_ten * \[number\] last\_update\_frame * \[number\] last\_update\_increment * \[number\] last\_update\_time * \[number\] last\_velocity\_test\_time * \[userdata\] layer\_order\_preset * \[number\] left\_ground\_height * \[boolean\] left\_the\_ground\_this\_frame * \[number\] move\_weight * \[number\] move\_weight\_smoothed * \[number\] move\_yaw * \[number\] move\_yaw\_current\_to\_ideal * \[number\] move\_yaw\_ideal * \[number\] next\_twitch\_time * \[boolean\] on\_ground * \[boolean\] on\_ladder * \[boolean\] plant\_anim\_started * \[entity\] player * \[boolean\] player\_is\_accelerating * \[userdata\] pose\_param\_mappings * \[vector\] position\_current * \[vector\] position\_last * \[number\] previous\_move\_state * \[number\] primary\_cycle * \[number\] recrouch\_weight * \[boolean\] smooth\_height\_valid * \[number\] speed\_as\_portion\_of\_crouch\_top\_speed * \[number\] speed\_as\_portion\_of\_run\_top\_speed * \[number\] speed\_as\_portion\_of\_walk\_top\_speed * \[userdata\] stand\_run\_aim * \[userdata\] stand\_walk\_aim * \[number\] static\_approach\_speed * \[number\] step\_height\_left * \[number\] step\_height\_right * \[number\] strafe\_change\_cycle * \[number\] strafe\_change\_target\_weight * \[number\] strafe\_change\_weight * \[number\] strafe\_change\_weight\_smooth\_fall\_off * \[boolean\] strafe\_changing * \[number\] strafe\_sequence * \[number\] stutter\_step * \[vector\] target\_acceleration * \[number\] time\_of\_last\_known\_injury * \[number\] time\_to\_align\_lower\_body * \[boolean\] twitch\_anim\_started * \[vector\] velocity * \[vector\] velocity\_last * \[number\] velocity\_length\_xy * \[number\] velocity\_length\_z * \[vector\] velocity\_normalized * \[vector\] velocity\_normalized\_non\_zero * \[number\] walk\_run\_transition * \[boolean\] walk\_to\_run\_transition\_state * \[entity\] weapon * \[entity\] weapon\_last * \[entity\] weapon\_last\_bone\_setup ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_anim_overlay) :get\_anim\_overlay `ent:get_anim_overlay([idx: number]):` `table` Name Type Description **idx** `**number**` Index of the animation layer Returns a table containing information about the specified animation layer. Pass `nil` to get every animation layer. 🧷 Animation overlay keys[](https://docs-csgo.neverlose.cc/documentation/variables/entity#animation-overlay-keys) * \[number\] activity * \[number\] cycle * \[number\] dispatched\_dst * \[number\] dispatched\_src * \[userdata\] dispatched\_studio\_hdr * \[number\] invalidate\_physics\_bits * \[number\] layer\_animtime * \[number\] layer\_fade\_outtime * \[number\] order * \[entity\] owner * \[number\] playback\_rate * \[number\] prev\_cycle * \[number\] sequence * \[number\] weight * \[number\] weight\_delta\_rate ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_eye_position) :get\_eye\_position `ent:get_eye_position():` `vector` Returns the eye position of the player. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_bone_position) :get\_bone\_position `ent:get_bone_position(idx: number):` `vector` Name Type Description **idx** `**number**` Index of the bone Returns the position of the specified bone. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_hitbox_position) :get\_hitbox\_position `ent:get_hitbox_position(idx: number):` `vector` Name Type Description **idx** `**number**` Index of the hitbox Returns the position of the specified hitbox. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_steam_avatar) :get\_steam\_avatar `ent:get_steam_avatar():` `ImgObject` Returns a pointer to the Steam avatar image object of the specified entity. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_xuid) :get\_xuid `ent:get_xuid():` `string` Returns the Steam ID of the player. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_resource) :get\_resource `ent:get_resource():` `entity` Returns the pointer to the CCSPlayerResource instance attached to the player, or nil if none exists. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_spectators) :get\_spectators `ent:get_spectators():` `table` Returns a table of pointers to the players that are currently spectating the specified player. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#set_icon) :set\_icon `ent:set_icon([icon: string])` Name Type Description **icon** `**string**` Optional. URL to the icon or a panorama path. Sets an icon in the scoreboard next to the specified player's avatar. The icon will be removed if no icon was provided. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#simulate_movement) :simulate\_movement `ent:simulate_movement([origin: vector, velocity: vector, flags: number]):` `sim_ctx` Name Type Description **origin** `**vector**` Specifies the origin from which the movement should be simulated. If not provided, it uses the player's current origin. **velocity** `**vector**` Specifies the velocity vector for the simulated movement. If not provided, the function will use the player's current velocity as the default for the simulation. **flags** `**number**` Specifies the m\_fFlags 32-bit mask for prediction. If not provided, it uses the player's current `m_fFlags` value. This function allows you to simulate players' movement by optionally providing an origin, velocity, and flags. Returns an instance of the `sim_ctx` class containing details and tools for the movement simulation. [](https://docs-csgo.neverlose.cc/documentation/variables/entity#simulation-context) Simulation Context ------------------------------------------------------------------------------------------------------------ This class encapsulates the context and results of a movement simulation initiated by `:simmulate_movement`. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#think) :think `sim:think([ticks: number])` Simulates the player's movement for a specified number of ticks. If not specified, it defaults to simulating for 1 tick. Name Type Description **origin** `**vector**` Position of the player after simulation. **velocity** `**vector**` Velocity of the player after simulation. **view\_offset** `**number**` Z axis view offset. Used to calculate the eye position. **duck\_amount** `**number**` `m_flDuckAmount` value of the player after simulation. **did\_hit\_collision** `**boolean**` Flags whether the player hit a collision during the simulation. **obb\_mins** `**vector**` Player's bounding box's minimum points. **obb\_maxs** `**vector**` Player's bounding box's maximum points. **move** `**vector**` **simulation\_ticks** `**number**` The number of ticks over which the simulation was conducted. **gravity\_per\_apply** `**number**` Indicates the applied gravitational force during the simulation. **original\_max\_speed** `**number**` The player's maximum speed before the simulation. **max\_speed** `**number**` The maximum speed achieved by the player during the simulation. **is\_speed\_cropped** `**boolean**` **velocity\_modifier** `**number**` `m_flVelocityModifier` value of the player after simulation. **duck\_speed** `**number**` The simulated speed at which the player can be crouching. **stamina** `**number**` `m_flStamina`value of the player after simulation. **surface\_friction** `**number**` `m_surfaceFriction` value of the player after simulation. **trace** `**trace**` Post-simulation trace object. [](https://docs-csgo.neverlose.cc/documentation/variables/entity#weapons) Weapons -------------------------------------------------------------------------------------- Access functions listed below via [`:get_player_weapon`](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_player_weapon) function ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_weapon_index) :get\_weapon\_index `ent:get_weapon_index():` `number` Returns the index of the weapon. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_weapon_icon) :get\_weapon\_icon `ent:get_weapon_icon():` `ImgObject` Returns the icon of the weapon. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_weapon_info) :get\_weapon\_info `ent:get_weapon_info():` `userdata` Returns a pointer to the `CCSWeaponInfo` struct of the weapon. 🧷 Weapon Info keys[](https://docs-csgo.neverlose.cc/documentation/variables/entity#weapon-info-keys) * \[number\] max\_player\_speed * \[number\] max\_player\_speed\_alt * \[number\] attack\_move\_speed\_factor * \[number\] spread * \[number\] spread\_alt * \[number\] inaccuracy\_crouch * \[number\] inaccuracy\_crouch\_alt * \[number\] inaccuracy\_stand * \[number\] inaccuracy\_stand\_alt * \[number\] inaccuracy\_jump\_initial * \[number\] inaccuracy\_jump\_apex * \[number\] inaccuracy\_jump * \[number\] inaccuracy\_jump\_alt * \[number\] inaccuracy\_land * \[number\] inaccuracy\_land\_alt * \[number\] inaccuracy\_ladder * \[number\] inaccuracy\_ladder\_alt * \[number\] inaccuracy\_fire * \[number\] inaccuracy\_fire\_alt * \[number\] inaccuracy\_move * \[number\] inaccuracy\_move\_alt * \[number\] inaccuracy\_reload * \[number\] recoil\_seed * \[number\] recoil\_angle * \[number\] recoil\_angle\_alt * \[number\] recoil\_angle\_variance * \[number\] recoil\_angle\_variance\_alt * \[number\] recoil\_magnitude * \[number\] recoil\_magnitude\_alt * \[number\] recoil\_magnitude\_variance\_alt * \[number\] spread\_seed * \[number\] recovery\_time\_crouch * \[number\] recovery\_time\_stand * \[number\] recovery\_time\_crouch\_final * \[number\] recovery\_time\_stand\_final * \[number\] recovery\_transition\_start\_bullet * \[number\] recovery\_transition\_end\_bullet * \[boolean\] unzoom\_after\_shot * \[boolean\] hide\_view\_model\_zoomed * \[number\] zoom\_level * \[userdata\] zoom\_fov * \[userdata\] zoom\_time * \[string\] weapon\_class * \[boolean\] has\_burst\_mode * \[boolean\] is\_revolver * \[number\] recoil\_magnitude\_variance * \[string\] weapon\_name * \[number\] weapon\_type * \[number\] weapon\_price * \[string\] console\_name * \[number\] max\_clip1 * \[number\] max\_clip2 * \[string\] world\_model * \[string\] view\_model * \[string\] dropped\_model * \[string\] hud\_name * \[number\] kill\_award * \[number\] cycle\_time * \[number\] cycle\_time\_alt * \[number\] time\_to\_idle * \[boolean\] full\_auto * \[number\] damage * \[number\] headshot\_multiplier * \[number\] armor\_ratio * \[number\] bullets * \[number\] penetration * \[number\] range * \[number\] range\_modifier * \[number\] throw\_velocity * \[boolean\] has\_silencer ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_weapon_owner) :get\_weapon\_owner `ent:get_weapon_owner():` `entity` Returns a pointer to the weapon owner's entity. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_weapon_reload) :get\_weapon\_reload `ent:get_weapon_reload():` `number` Returns the weapon reload percentage (0.0-1.0), -1 if not reloading. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_max_speed) :get\_max\_speed `ent:get_max_speed():` `number` Returns the maximum speed the player can move with the weapon. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_spread) :get\_spread `ent:get_spread():` `number` Returns the spread of the weapon in radians. ### [](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_inaccuracy) :get\_inaccuracy `ent:get_inaccuracy():` `number` Returns the inaccuracy of the weapon in radians. [Previousdb](https://docs-csgo.neverlose.cc/documentation/variables/db) [Nextesp](https://docs-csgo.neverlose.cc/documentation/variables/esp) Last updated 2 years ago * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/entity#functions) * [get](https://docs-csgo.neverlose.cc/documentation/variables/entity#get) * [get\_local\_player](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_local_player) * [get\_players](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_players) * [get\_entities](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_entities) * [get\_threat](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_threat) * [get\_game\_rules](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_game_rules) * [get\_player\_resource](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_player_resource) * [Netprops](https://docs-csgo.neverlose.cc/documentation/variables/entity#netprops) * [Getting FFI pointer](https://docs-csgo.neverlose.cc/documentation/variables/entity#getting-ffi-pointer) * [Getting netprop values](https://docs-csgo.neverlose.cc/documentation/variables/entity#getting-netprop-values) * [Setting netprop values](https://docs-csgo.neverlose.cc/documentation/variables/entity#setting-netprop-values) * [Common](https://docs-csgo.neverlose.cc/documentation/variables/entity#common) * [:is\_player](https://docs-csgo.neverlose.cc/documentation/variables/entity#is_player) * [:is\_weapon](https://docs-csgo.neverlose.cc/documentation/variables/entity#is_weapon) * [:is\_dormant](https://docs-csgo.neverlose.cc/documentation/variables/entity#is_dormant) * [:is\_bot](https://docs-csgo.neverlose.cc/documentation/variables/entity#is_bot) * [:is\_alive](https://docs-csgo.neverlose.cc/documentation/variables/entity#is_alive) * [:is\_enemy](https://docs-csgo.neverlose.cc/documentation/variables/entity#is_enemy) * [:is\_visible](https://docs-csgo.neverlose.cc/documentation/variables/entity#is_visible) * [:is\_occluded](https://docs-csgo.neverlose.cc/documentation/variables/entity#is_occluded) * [:get\_index](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_index) * [:get\_name](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_name) * [:get\_origin](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_origin) * [:get\_angles](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_angles) * [:get\_simulation\_time](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_simulation_time) * [:get\_classname](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_classname) * [:get\_classid](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_classid) * [:get\_materials](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_materials) * [:get\_model\_name](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_model_name) * [Players](https://docs-csgo.neverlose.cc/documentation/variables/entity#players) * [:get\_network\_state](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_network_state) * [:get\_bbox](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_bbox) * [:get\_player\_info](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_player_info) * [:get\_player\_weapon](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_player_weapon) * [:get\_anim\_state](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_anim_state) * [:get\_anim\_overlay](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_anim_overlay) * [:get\_eye\_position](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_eye_position) * [:get\_bone\_position](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_bone_position) * [:get\_hitbox\_position](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_hitbox_position) * [:get\_steam\_avatar](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_steam_avatar) * [:get\_xuid](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_xuid) * [:get\_resource](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_resource) * [:get\_spectators](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_spectators) * [:set\_icon](https://docs-csgo.neverlose.cc/documentation/variables/entity#set_icon) * [:simulate\_movement](https://docs-csgo.neverlose.cc/documentation/variables/entity#simulate_movement) * [Simulation Context](https://docs-csgo.neverlose.cc/documentation/variables/entity#simulation-context) * [:think](https://docs-csgo.neverlose.cc/documentation/variables/entity#think) * [Weapons](https://docs-csgo.neverlose.cc/documentation/variables/entity#weapons) * [:get\_weapon\_index](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_weapon_index) * [:get\_weapon\_icon](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_weapon_icon) * [:get\_weapon\_info](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_weapon_info) * [:get\_weapon\_owner](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_weapon_owner) * [:get\_weapon\_reload](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_weapon_reload) * [:get\_max\_speed](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_max_speed) * [:get\_spread](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_spread) * [:get\_inaccuracy](https://docs-csgo.neverlose.cc/documentation/variables/entity#get_inaccuracy) Copy local on_createmove = function(cmd) local localplayer = entity.get_local_player() if localplayer == nil then return end -- example 1 local health = localplayer.m_iHealth -- example 2 [array netprops] local pitch = localplayer.m_flPoseParameter[12] -- example 3 local stamina = localplayer['m_flStamina'] print(('my health is: %d | pitch: %.1f | stamina: %d%%'):format( health, pitch, 100 - (80 / 100 * stamina) )) end events.createmove:set(on_createmove) Copy for _, player in ipairs(entity.get_players(true)) do -- example 1 player.m_bSpotted = true -- example 2 [array netprops] player.m_flPoseParameter[12] = 0.5 -- example 3 player['m_nSkin'] = 2 end --- # ui | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/ui.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/ui#example-available) Example available! ------------------------------------------------------------------------------------------------------- [⚙️UI](https://docs-csgo.neverlose.cc/useful-information/script-examples/ui) [](https://docs-csgo.neverlose.cc/documentation/variables/ui#functions) Functions: --------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#get_alpha) get\_alpha `ui.get_alpha():` `number` Returns the menu opacity as a unit interval (value in the range \[0, 1\]). ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#get_size) get\_size `ui.get_size():` `vector` Returns the current menu size. ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#get_position) get\_position `ui.get_position():` `vector` Returns the current menu position. ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#get_mouse_position) get\_mouse\_position `ui.get_mouse_position():` `vector` Returns the current mouse position. ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#get_binds) get\_binds `ui.get_binds():` `table` Returns a table of pointers to hotkeys. #### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#struct-hotkey) struct `Hotkey` Name Type Description **name** `**string**` Hotkey name **mode** `**number**` Hotkey mode (`1`: Hold, `2`: Toggle) **value** `**any**` Hotkey value **active** `**boolean**` Hotkey state **reference** `**MenuItem**` Pointer to the menu item ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#get_style) get\_style `ui.get_style([ name: string ]):` `color` / `table` Returns the color of the Style Option. Pass `nil` to return a table with the style options. ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#get_icon) get\_icon `ui.get_icon(name: string):` `string` Returns the unicode converted string corresponding the fontawesome icon. ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#create) create Group Tab `ui.create(group: string):` `MenuGroup` Name Type Description **group** `**string**` Group name Creates and returns a menu group object. ![](https://docs-csgo.neverlose.cc/~gitbook/image?url=https%3A%2F%2F3594665820-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F37PG3extaxoGL9yvcP52%252Fuploads%252FkkzsiSorcLwkRYPEdlA3%252Fimage.png%3Falt%3Dmedia%26token%3De0b7caf2-6985-4fff-ab8c-a678a708197a&width=768&dpr=3&quality=100&sign=a8b25c28&sv=2) `ui.create(tab: string, group: string[, column: number]):` `MenuGroup` Name Type Description **tab** `**string**` Tab name **group** `**string**` Group name **column** `**number**` Optional. Column ID (`1`: Left `2`: Right or `nil` for automatic alignment.) Creates and returns a menu group object. ![](https://docs-csgo.neverlose.cc/~gitbook/image?url=https%3A%2F%2F3594665820-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F37PG3extaxoGL9yvcP52%252Fuploads%252Fg9W2zQVZ0LkY6Iep5xvl%252Fimage.png%3Falt%3Dmedia%26token%3Df79dabe5-ed02-4a6d-813a-80fb0080a218&width=768&dpr=3&quality=100&sign=43d7bfb6&sv=2) ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#find) find Item example Sub-item example Group example Global item example ESP Item Example `ui.find(category: string, tab: string, group: string, item: string):` `MenuItem` Name Type Description **category** `**string**` Category name, e.g. "Aimbot" or "Visuals". **tab** `**string**` Tab name that belongs to the category. **group** `**string**` Name of group with the item. **item** `**string**` The needed item. Returns the `MenuItem` object that corresponds to the specified path. `ui.find(category: string, tab: string, sub_tab: string, group: string, item: string):` `MenuItem` Name Type Description **category** `**string**` Category name, e.g. "Aimbot" or "Visuals". **tab** `**string**` Tab name that belongs to the category. **sub\_tab** `**string**` Sub-tab name. **group** `**string**` Name of group with the item. **item** `**string**` The needed item. Returns the `MenuItem` object that corresponds to the specified path. `ui.find(category: string, tab: string, group: string, item: string, sub_item):` `MenuItem` Name Type Description **category** `**string**` Category name, e.g. "Aimbot" or "Visuals". **tab** `**string**` Tab name that belongs to the category. **group** `**string**` Name of group with the item. **item** `**string**` The item with a group (gear) attached. **sub\_item** `**string**` The sub-item in the item group. Returns the `MenuItem` object that corresponds to the specified path. `ui.find(category: string, tab: string, sub_tab: string, group: string, item: string, sub_item):` `MenuItem` Name Type Description **category** `**string**` Category name, e.g. "Aimbot" or "Visuals". **tab** `**string**` Tab name that belongs to the category. **sub\_tab** `**string**` Sub-tab name. **group** `**string**` Name of group with the item. **item** `**string**` The item with a group (gear) attached. **sub\_item** `**string**` The sub-item in the item group. Returns the `MenuItem` object that corresponds to the specified path. `ui.find(category: string, tab: string, group: string):` `MenuGroup` Name Type Description **category** `**string**` Category name, e.g. "Aimbot" or "Visuals". **tab** `**string**` Tab name that belongs to the category. **group** `**string**` Name of the needed group. Returns the `MenuGroup` object that corresponds to the specified path. `ui.find(category: string, tab: string, sub_tab_name: string, group: string):` `MenuGroup` Name Type Description **category** `**string**` Category name, e.g. "Aimbot" or "Visuals". **tab** `**string**` Tab name that belongs to the category. **sub\_tab** `**string**` Sub-tab name. **group** `**string**` Name of the needed group. `ui.find(group_name: string, item_name: string):` `MenuItem` Name Type Description **group\_name** `**string**` Global group name, e.g. "Settings". **item\_name** `**string**` Item name, e.g. "Dpi Scale". Returns the `MenuItem` object that corresponds to the specified path. `ui.find(category: string, tab: string, sub_tab: string, group: string, item_category: string, item: string):` `ESPGroup` Name Type Description **category** `**string**` **tab** `**string**` **sub\_tab** `**string**` **group** `**string**` **item\_category** `**string**` **item** `**string**` Returns the `ESPGroup` object that corresponds to the specified path. This can return multiple items or `nil` on failure. [![Logo](https://docs-csgo.neverlose.cc/~gitbook/image?url=https%3A%2F%2Ffontawesome.com%2Ffavicon.ico&width=20&dpr=3&quality=100&sign=38bee14a&sv=2)Search Icons & Find the Perfect Design | Font Awesomefontawesome](https://fontawesome.com/v6/search) `ui.sidebar([name: string, icon_name: string]):` `string`, `string` Name Type Description **name** `**string**` Optional. Sidebar tab name **icon\_name** `**string**` Optional. Icon name (Brand icons are currently not supported) Gets or sets the sidebar tab name and an icon. ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#localize) localize `ui.localize(lang: string, str: string[, localized: string]):` `string` / `nil` Name Type Description **lang** `**string**` Language code. **str** `**string**` String to localize or to get the localized string from. **localized** `**string**` Optional. The localized variant. Returns the localized string for the specified language code. If `localized` is present, the `str` will be localized accordingly. [](https://docs-csgo.neverlose.cc/documentation/variables/ui#menugroup) 🔗 `MenuGroup` ------------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#switch) :switch `group:switch(name: string[, init: boolean]):` `MenuItem` Name Type Description **name** `**string**` Item name **init** `**boolean**` Default value Creates and returns a menu item object, or throws an error on failure. ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#slider) :slider `group:slider(name: string, min: number, max: number[, init: number, scale: number, tooltip: function]):` `MenuItem` Name Type Description **name** `**string**` Item name **min** `**number**` Minimum allowed value **max** `**number**` Maximum allowed value **init** `**number**` Default value **scale** `**number**` Display value multiplier. Can be used for decimal places. **tooltip** `**string / function**` A string appends itself to the display value. A function allows you to access the raw display value and displays anything it returns. Creates and returns a menu item object, or throws an error on failure. ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#combo) :combo `group:combo(name: string, items: any[, ...]):` `MenuItem` Name Type Description **name** `**string**` Item name **items** `**any**` One or more comma separated values that will be added to the combo. Alternatively, a table of strings that will be added **...** Creates and returns a menu item object, or throws an error on failure. ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#selectable) :selectable `group:selectable(name: string, items: any[, ...]):` `MenuItem` Name Type Description **name** `**string**` Item name **items** `**any**` One or more comma separated values that will be added to the combo. Alternatively, a table of strings that will be added **...** Creates and returns a menu item object, or throws an error on failure. ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#render.line) :color\_picker Simple Multi-Color `group:color_picker(name: string[, color: color]):` `MenuItem` Name Type Description **name** `**string**` Item name **color** `**color**` Optional. Initial color value `group:color_picker(name: string, colors: table):` `MenuItem` Name Type Description **name** `**string**` Item name **colors** `**table**` Table containing tables with a string index, and those tables should contain one or multiple color objects. Check UI examples. Creates and returns a menu item object, or throws an error on failure. ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#button) :button `group:button(name: string[, callback: function, alt_style: boolean]):` `MenuItem` Name Type Description **name** `**string**` Item name **callback** `**function**` Optional. Function that will be called when the button is clicked **alt\_style** `**boolean**` Optional. Pass `true` to enable the alternative style for the specified button Creates and returns a menu item object, or throws an error on failure. ### [](https://docs-csgo.neverlose.cc/documentation/variables/ui#hotkey) :hotkey [![Logo](https://docs-csgo.neverlose.cc/~gitbook/image?url=https%3A%2F%2Flearn.microsoft.com%2Ffavicon.ico&width=20&dpr=3&quality=100&sign=a435cfee&sv=2)Virtual-Key Codes (Winuser.h) - Win32 appsMicrosoftLearn](https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) `group:hotkey(name: string[, default_key: number):` `MenuItem`\ \ Name\ \ Type\ \ Description\ \ **name**\ \ `**string**`\ \ Item name\ \ **default\_key**\ \ `**number**`\ \ Optional. Default key\ \ Creates and returns a menu item object, or throws an error on failure.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#input)\ \ :input\ \ `group:input(name: string[, text: string]):` `MenuItem`\ \ Name\ \ Type\ \ Description\ \ **name**\ \ `**string**`\ \ Item name\ \ **text**\ \ `**string**`\ \ Optional. Default value\ \ Creates and returns a menu item object, or throws an error on failure.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#list)\ \ :list\ \ `group:list(name: string, items: any[, ...]):` `MenuItem`\ \ Name\ \ Type\ \ Description\ \ **name**\ \ `**string**`\ \ Item name\ \ **items**\ \ `**any**`\ \ One or more comma separated values that will be added to the combo. Alternatively, a table of strings that will be added\ \ **...**\ \ Creates and returns a menu item object, or throws an error on failure.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#listable)\ \ :listable\ \ `group:listable(name: string, items: any[, ...]):` `MenuItem`\ \ Name\ \ Type\ \ Description\ \ **name**\ \ `**string**`\ \ Item name\ \ **items**\ \ `**any**`\ \ One or more comma separated values that will be added to the combo. Alternatively, a table of strings that will be added\ \ **...**\ \ Creates and returns a menu item object, or throws an error on failure.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#label)\ \ :label\ \ `group:label(text: string):` `MenuItem`\ \ Name\ \ Type\ \ Description\ \ **text**\ \ `**string**`\ \ Label text\ \ Creates and returns a menu item object, or throws an error on failure.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#texture)\ \ :texture\ \ 📌 Create the texture via the [`:load_image`](https://docs-csgo.neverlose.cc/documentation/variables/render#render.line-7)\ function.\ \ `group:texture(texture: ImgObject[, size: vector, color: color, mode: string, rounding: number]):` `MenuItem`\ \ Name\ \ Type\ \ Description\ \ **texture**\ \ `**ImgObject**`\ \ Image object\ \ **size**\ \ `**vector**`\ \ Optional. Size of the image\ \ **color**\ \ `**color**`\ \ Optional. Color of the texture\ \ **mode**\ \ `**string**`\ \ Optional. `f` for fill, `r` for repeat\ \ **rounding**\ \ `**number**`\ \ Optional. Image border rounding\ \ Creates and returns a menu item object, or throws an error on failure.\ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#menuitem)\ \ 🔗 `MenuItem`\ \ \ -----------------------------------------------------------------------------------------\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#get)\ \ :get\ \ `item:get():` `any`\ \ Returns the value of the menu item.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#id)\ \ :id\ \ `item:id():` `number`\ \ Returns the unique id of the menu item.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#list-1)\ \ :list\ \ `item:list():` `table`\ \ Returns the list of items. `combo` / `selectable` menu item objects only.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#type)\ \ :type\ \ `item:type():` `string`\ \ Returns the type of the menu item.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#override)\ \ :override\ \ `item:override(value: any[, ...])`\ \ Name\ \ Type\ \ Description\ \ **value**\ \ `**any**`\ \ The value to which the menu item will be set\ \ **...**\ \ Overrides the item value without changing the menu / config values. If the `value` argument is `nil` or missing, the override is undone.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#get_override)\ \ :get\_override\ \ `item:get_override():` `any`\ \ Returns the value of the menu item it's overriden to.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#update)\ \ :update\ \ `item:update(...)`\ \ Name\ \ Type\ \ Description\ \ **...**\ \ `**any**`\ \ Updates the values of the menu item.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#reset)\ \ :reset\ \ `item:reset()`\ \ Resets the menu item to it's original value.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#set)\ \ :set\ \ `item:set(value: any[, ...])`\ \ Name\ \ Type\ \ Description\ \ **value**\ \ `**any**`\ \ The value to which the menu item will be set\ \ **...**\ \ Sets the value of the menu item.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#name)\ \ :name\ \ `item:name([value: any])`\ \ Name\ \ Type\ \ Description\ \ **value**\ \ `**any**`\ \ New name\ \ Gets or sets the name of the menu item.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#tooltip)\ \ :tooltip\ \ `item:tooltip([value: any])`\ \ Name\ \ Type\ \ Description\ \ **value**\ \ `**any**`\ \ New tooltip text\ \ Gets or sets the tooltip of the menu item (depending on the presence of the `value` parameter).\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#visibility)\ \ :visibility\ \ `item:visibility([state: boolean])`\ \ Name\ \ Type\ \ Description\ \ **state**\ \ `**boolean**`\ \ New visibility state\ \ Gets or sets the menu item visibility depending on the value of `state`.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#disabled)\ \ :disabled\ \ `item:disabled([state: boolean])`\ \ Name\ \ Type\ \ Description\ \ **state**\ \ `**boolean**`\ \ New disabled state\ \ Gets or sets the menu item disabled state depending on the value of `state`.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#set_callback)\ \ :set\_callback\ \ `item:set_callback(callback: function[, force_call: boolean])`\ \ Name\ \ Type\ \ Description\ \ **callback**\ \ `**function**`\ \ Function that will be called when the menu item is interacted with\ \ **force\_call**\ \ `**boolean**`\ \ Pass `true` to call the callback function after setup\ \ Sets the callback to the specified menu item.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#unset_callback)\ \ :unset\_callback\ \ `item:unset_callback(callback: function)`\ \ Name\ \ Type\ \ Description\ \ **callback**\ \ `**function**`\ \ Lua function that was passed to the `:set_callback` function\ \ Unsets the callback that was set via the `:set_callback` function.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#render.line-1)\ \ :color\_picker\ \ Simple\ \ Multi-Color\ \ `item:color_picker([color: color]):` `MenuItem`\ \ Name\ \ Type\ \ Description\ \ **color**\ \ `**color**`\ \ Optional. Initial color value\ \ `item:color_picker([colors: table]):` `MenuItem`\ \ Name\ \ Type\ \ Description\ \ **colors**\ \ `**table**`\ \ Table containing tables with a string index, and those tables should contain one or multiple color objects. Check UI examples.\ \ Attaches a color picker to the current menu item object.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#create-1)\ \ :create\ \ `item:create():` `MenuGroup`\ \ Attaches a group (gear) to the current menu item object.\ \ ### \ \ [](https://docs-csgo.neverlose.cc/documentation/variables/ui#parent)\ \ :parent\ \ `item:parent():` `MenuItem` / `MenuGroup`\ \ Returns the parent object of the menu item.\ \ [Previousmath](https://docs-csgo.neverlose.cc/documentation/variables/math)\ [Nextnetwork](https://docs-csgo.neverlose.cc/documentation/variables/network)\ \ Last updated 3 years ago\ \ * [Example available!](https://docs-csgo.neverlose.cc/documentation/variables/ui#example-available)\ \ * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/ui#functions)\ \ * [get\_alpha](https://docs-csgo.neverlose.cc/documentation/variables/ui#get_alpha)\ \ * [get\_size](https://docs-csgo.neverlose.cc/documentation/variables/ui#get_size)\ \ * [get\_position](https://docs-csgo.neverlose.cc/documentation/variables/ui#get_position)\ \ * [get\_mouse\_position](https://docs-csgo.neverlose.cc/documentation/variables/ui#get_mouse_position)\ \ * [get\_binds](https://docs-csgo.neverlose.cc/documentation/variables/ui#get_binds)\ \ * [get\_style](https://docs-csgo.neverlose.cc/documentation/variables/ui#get_style)\ \ * [get\_icon](https://docs-csgo.neverlose.cc/documentation/variables/ui#get_icon)\ \ * [create](https://docs-csgo.neverlose.cc/documentation/variables/ui#create)\ \ * [find](https://docs-csgo.neverlose.cc/documentation/variables/ui#find)\ \ * [sidebar](https://docs-csgo.neverlose.cc/documentation/variables/ui#sidebar)\ \ * [localize](https://docs-csgo.neverlose.cc/documentation/variables/ui#localize)\ \ * [🔗 MenuGroup](https://docs-csgo.neverlose.cc/documentation/variables/ui#menugroup)\ \ * [:switch](https://docs-csgo.neverlose.cc/documentation/variables/ui#switch)\ \ * [:slider](https://docs-csgo.neverlose.cc/documentation/variables/ui#slider)\ \ * [:combo](https://docs-csgo.neverlose.cc/documentation/variables/ui#combo)\ \ * [:selectable](https://docs-csgo.neverlose.cc/documentation/variables/ui#selectable)\ \ * [:color\_picker](https://docs-csgo.neverlose.cc/documentation/variables/ui#render.line)\ \ * [:button](https://docs-csgo.neverlose.cc/documentation/variables/ui#button)\ \ * [:hotkey](https://docs-csgo.neverlose.cc/documentation/variables/ui#hotkey)\ \ * [:input](https://docs-csgo.neverlose.cc/documentation/variables/ui#input)\ \ * [:list](https://docs-csgo.neverlose.cc/documentation/variables/ui#list)\ \ * [:listable](https://docs-csgo.neverlose.cc/documentation/variables/ui#listable)\ \ * [:label](https://docs-csgo.neverlose.cc/documentation/variables/ui#label)\ \ * [:texture](https://docs-csgo.neverlose.cc/documentation/variables/ui#texture)\ \ * [🔗 MenuItem](https://docs-csgo.neverlose.cc/documentation/variables/ui#menuitem)\ \ * [:get](https://docs-csgo.neverlose.cc/documentation/variables/ui#get)\ \ * [:id](https://docs-csgo.neverlose.cc/documentation/variables/ui#id)\ \ * [:list](https://docs-csgo.neverlose.cc/documentation/variables/ui#list-1)\ \ * [:type](https://docs-csgo.neverlose.cc/documentation/variables/ui#type)\ \ * [:override](https://docs-csgo.neverlose.cc/documentation/variables/ui#override)\ \ * [:get\_override](https://docs-csgo.neverlose.cc/documentation/variables/ui#get_override)\ \ * [:update](https://docs-csgo.neverlose.cc/documentation/variables/ui#update)\ \ * [:reset](https://docs-csgo.neverlose.cc/documentation/variables/ui#reset)\ \ * [:set](https://docs-csgo.neverlose.cc/documentation/variables/ui#set)\ \ * [:name](https://docs-csgo.neverlose.cc/documentation/variables/ui#name)\ \ * [:tooltip](https://docs-csgo.neverlose.cc/documentation/variables/ui#tooltip)\ \ * [:visibility](https://docs-csgo.neverlose.cc/documentation/variables/ui#visibility)\ \ * [:disabled](https://docs-csgo.neverlose.cc/documentation/variables/ui#disabled)\ \ * [:set\_callback](https://docs-csgo.neverlose.cc/documentation/variables/ui#set_callback)\ \ * [:unset\_callback](https://docs-csgo.neverlose.cc/documentation/variables/ui#unset_callback)\ \ * [:color\_picker](https://docs-csgo.neverlose.cc/documentation/variables/ui#render.line-1)\ \ * [:create](https://docs-csgo.neverlose.cc/documentation/variables/ui#create-1)\ \ * [:parent](https://docs-csgo.neverlose.cc/documentation/variables/ui#parent) --- # render | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/render.md) . [](https://docs-csgo.neverlose.cc/documentation/variables/render#functions) Functions: ------------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#screen_size) screen\_size `render.screen_size():` `vector` ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#camera_position) camera\_position `render.camera_position():` `vector` Returns the camera position vector. ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#camera_angles) camera\_angles `render.camera_angles([angles: vector]):` `vector` Name Type Description **angles** `**vector**` New camera angles Returns or sets the camera angles. ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#world_to_screen) world\_to\_screen `render.world_to_screen(position: vector):` `vector` Name Type Description **position** `**vector**` Position in world space 📌 Note that there is a cleaner alternative, the [`:to_screen`](https://docs-csgo.neverlose.cc/documentation/variables/vector#render.line-22) vector function. Returns the screen position vector, or nil if the world position is not visible on your screen. This can only be called from the render callback. ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#get_offscreen) get\_offscreen `render.get_offscreen(position: vector, radius: number[, accurate: boolean]):` `vector`, `number`, `boolean` Name Type Description **position** `**vector**` Position in world space **radius** `**number**` Distance from the center of the screen as a percentage in the range \[0.0, ∞\] **accurate** `**boolean**` Optional. If `true` then accurate calculations will be used Returns the `position`, `rotation`, and `is_out_of_fov` arguments or nil on failure. `position`: Screen coordinates (Returns ellipse-based position if the world position is out of FOV) `rotation`: Yaw axis that can be used to rotate drawing stuff `is_out_of_fov`: Returns `true` if the world position is out of FOV. ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#get_pixel) get\_pixel `render.get_pixel(position: vector)` Getting the color of the pixel is a heavy process. Do not do it inside callbacks that are called a lot of times per second. Name Type Description **position** `**vector**` Screen position Returns the color of the specified pixel on the screen. ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#load_font) load\_font 📌 Render any text via the [`draw:text`](https://docs-csgo.neverlose.cc/documentation/variables/render#text) function. Size as a number Size as a vector `render.load_font(name: string, size: number[, flags: string]):` `FontObject` Name Type Description **name** `**string**` Font that will be initialized **size** `**number**` Size of the font **flags** `**string**` `a` for anti-aliasing, `i` for cursive text, and `b` for bold text, `o` for outlined text, `d` for the drop shadow effect. `render.load_font(name: string, size: vector[, flags: string]):` `FontObject` Name Type Description **name** `**string**` Font that will be initialized **size** `**vector**` A vector object containing `width`, `height`, and `spacing`. **flags** `**string**` `a` for anti-aliasing, `i` for cursive text, and `b` for bold text, `o` for outlined text, `d` for the drop shadow effect, `u` to enable extra symbol support. Returns the `FontObject` struct or nil on failure. ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#load_image) load\_image 📌 Render any image via the [`:texture`](https://docs-csgo.neverlose.cc/documentation/variables/render#texture) function. `render.load_image(contents: string, size: vector):` `ImgObject` Name Type Description **contents** `**string**` Raw image file contents **size** `**vector**` Size of the image Returns the `ImgObject` struct or nil on failure. Supports JPG, PNG, BMP, SVG, and GIF formats. ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#load_image_rgba) load\_image\_rgba 📌 Render any image via the [`:texture`](https://docs-csgo.neverlose.cc/documentation/variables/render#texture) function. `render.load_image_rgba(contents: string, size: vector):` `ImgObject` Name Type Description **contents** `**string**` `RGBA` buffer (`HEX` encoded) **size** `**vector**` Size of the image Returns the `ImgObject` struct or nil on failure. ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#load_image_from_file) load\_image\_from\_file 📌 Render any image via the [`:texture`](https://docs-csgo.neverlose.cc/documentation/variables/render#texture) function. `render.load_image_from_file(path: string, size: vector):` `ImgObject` Name Type Description **path** `**string**` Path to the image **size** `**vector**` Size of the image > ℹ️ Loading images from game resources is supported. > > Example: `render.load_image_from_file 'materials/panorama/images/icons/ui/warning.svg'` Returns the `ImgObject` struct or nil on failure. Supports JPG, PNG, BMP, SVG, and GIF formats. ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#measure_text) measure\_text `render.measure_text(font: FontObject[, flags: string], text: string):` `vector` Name Type Description **font** `**FontObject**` Font object or `1` for `Default` font, `2` for `Small` font, or `3` for `Console` font **flags** `**string**` Optional. `s` for DPI scaled text **text** `**string**` Text that will be measured Returns the measured size of the text. ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#highlight_hitbox) highlight\_hitbox `render.highlight_hitbox(entity: entity, hitbox: number, color: color)` Name Type Description **entity** `**entity**` The player whose hitbox(es) are to be highlighted. **hitbox** `**number**` Hitbox index (an integer between 0 and 18). A table with hitbox indices can also be used to highlight multiple hitboxes. Pass 19 to highlight every hitbox. **color** `**color**` The color with which you want to highlight the hitbox(es). Highlights the specified hitbox / hitboxes. ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#get_scale) get\_scale `render.get_scale(type: number):` `number` Name Type Description **type** `**number**` The type of DPI scale to return. `1` - Menu Scale, `2` - ESP Scale. Returns the DPI scale value. [](https://docs-csgo.neverlose.cc/documentation/variables/render#structs) Structs -------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#imgobject) 🔗 `ImgObject` #### [](https://docs-csgo.neverlose.cc/documentation/variables/render#width) width `img.width` `:` `number` #### [](https://docs-csgo.neverlose.cc/documentation/variables/render#height) height `img.height` `:` `number` #### [](https://docs-csgo.neverlose.cc/documentation/variables/render#resolution) resolution `img.resolution` `:` `number` ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#fontobject) 🔗 `FontObject` #### [](https://docs-csgo.neverlose.cc/documentation/variables/render#width-1) width `font.width` `:` `number` #### [](https://docs-csgo.neverlose.cc/documentation/variables/render#height-1) height `font.height` `:` `number` #### [](https://docs-csgo.neverlose.cc/documentation/variables/render#spacing) spacing `font.spacing` `:` `number` #### [](https://docs-csgo.neverlose.cc/documentation/variables/render#set_size) :set\_size Size as a number Size as a vector `font:set_size(size: number)` Name Type Description **size** `**number**` New size of the font `font:set_size(size: vector)` Name Type Description **size** `**vector**` A vector object containing `width`, `height`, and `spacing`. Sets the new font size. [](https://docs-csgo.neverlose.cc/documentation/variables/render#draw-functions) Draw functions ---------------------------------------------------------------------------------------------------- ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#blur) blur `render.blur(position_a: vector, position_b: vector, strength: number, alpha: number[, rounding: number])` Name Type Description **position\_a** `**vector**` Start position **position\_b** `**vector**` End position **strength** `**number**` Blur strength **alpha** `**number**` Alpha percentage in the range \[0.0, 1.0\] **rounding** `**number**` Optional. Rounding of the blur rectangle in pixels ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#line) line `render.line(position_a: vector, position_b: vector, color: color)` Name Type Description **position\_a** `**vector**` Start position **position\_b** `**vector**` End position **color** `**color**` Color of the line ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#poly) poly `render.poly(color: color, positions: vector[, ...])` Name Type Description **color** `**color**` Color of the polyline **positions** `**vector**` Screen positions **...** Comma-separated vectors to concatenate with `positions` ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#poly_blur) poly\_blur `render.poly_blur(opacity: number, strength: number, positions: vector[, ...])` Name Type Description **opacity** `**number**` Opacity percentage in the range \[0.0, 1.0\] **strength** `**number**` Blur strength **positions** `**vector**` Screen positions **...** Comma-separated vectors to concatenate with `positions` ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#poly_line) poly\_line `render.poly_line(color: color, positions: vector[, ...])` Name Type Description **color** `**color**` Color of the polyline **positions** `**vector**` Screen positions **...** Comma-separated vectors to concatenate with `positions` ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#rect) rect `render.rect(position_a: vector, position_b: vector, color: color[, rounding: number, no_clamp: boolean])` Name Type Description **position\_a** `**vector**` Start position **position\_b** `**vector**` End position **color** `**color**` Color of the rectangle **rounding** `**number**` Optional. Rounding of the rectangle in pixels **no\_clamp** `**boolean**` Optional. If `true`, negative sizes will be allowed ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#rect_outline) rect\_outline `render.rect_outline(position_a: vector, position_b: vector, color: color[, thickness: number, rounding: number, no_clamp: boolean])` Name Type Description **position\_a** `**vector**` Start position **position\_b** `**vector**` End position **color** `**color**` Color of the rectangle **thickness** `**number**` Optional. Thickness of the rectangle in pixels **rounding** `**number**` Optional. Rounding of the rectangle in pixels **no\_clamp** `**boolean**` Optional. If `true`, `position_a < position_b` will be allowed ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#gradient) gradient `render.gradient(position_a: vector, position_b: vector, top_left: color, top_right: color, bottom_left: color, bottom_right: color[, rounding: number])` Name Type Description **position\_a** `**vector**` Start position **position\_b** `**vector**` End position **top\_left** `**color**` Color of the top left rectangle position **top\_right** `**color**` Color of the top right rectangle position **bottom\_left** `**color**` Color of the bottom left rectangle position **bottom\_right** `**color**` Color of the bottom right rectangle position **rounding** `**number**` Optional. Rounding of the gradient in pixels ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#circle) circle `render.circle(position: vector, color: color, radius: number, start_deg: number, pct: number)` Name Type Description **position** `**type**` Screen position **color** `**color**` Color of the circle **radius** `**number**` Radius of the circle in pixels **start\_deg** `**number**` `0` is the right side, `90` is the bottom, `180` is the left, `270` is the top **pct** `**number**` Percentage in the range \[0.0-1.0\] determining how full the circle is ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#circle_outline) circle\_outline `render.circle_outline(position: vector, color: color, radius: number, start_deg: number, pct: number[, thickness: number])` Name Type Description **position** `**vector**` Screen position **color** `**color**` Color of the circle **radius** `**number**` Radius of the circle in pixels **start\_deg** `**number**` `0` is the right side, `90` is the bottom, `180` is the left, `270` is the top **pct** `**number**` Percentage in the range \[0.0-1.0\] determining how full the circle is **thickness** `**number**` Optional. Thickness of the outline in pixels ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#circle_gradient) circle\_gradient `render.circle_gradient(position: vector, color_outer: color, color_inner: color, radius: number, start_deg: number, pct: number)` Name Type Description **position** `**vector**` Screen position **color\_outer** `**color**` Outer color of the circle **color\_inner** `**color**` Inner color of the circle **radius** `**number**` Radius of the circle in pixels **start\_deg** `**number**` `0` is the right side, `90` is the bottom, `180` is the left, `270` is the top **pct** `**number**` Percentage in the range \[0.0-1.0\] determining how full the circle is ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#circle_3d) circle\_3d `render.circle_3d(position: vector, color: color, radius: number, start_deg: number, pct: number[, outline: boolean])` Name Type Description **position** `**vector**` Screen position **color** `**color**` Color of the circle **radius** `**number**` Radius of the circle in pixels **start\_deg** `**number**` `0` is the right side, `90` is the bottom, `180` is the left, `270` is the top **pct** `**number**` Percentage in the range \[0.0-1.0\] determining how full the circle is **outline** `**boolean**` Optional. Render the circle outline ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#circle_3d_outline) circle\_3d\_outline `render.circle_3d_outline(position: vector, color: color, radius: number, start_deg: number, pct: number[, thickness: number])` Name Type Description **position** `**vector**` Screen position **color** `**color**` Color of the circle **radius** `**number**` Radius of the circle in pixels **start\_deg** `**number**` `0` is the right side, `90` is the bottom, `180` is the left, `270` is the top **pct** `**number**` Percentage in the range \[0.0-1.0\] determining how full the circle is **thickness** `**number**` Thickness of the outline in pixels ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#circle_3d_gradient) circle\_3d\_gradient `render.circle_3d_gradient(position: vector, color_outer: color, color_inner: color, radius: number, start_deg: number, pct: number)` Name Type Description **position** `**vector**` Screen position **color\_outer** `**color**` Outer color of the circle **color\_inner** `**color**` Inner color of the circle **radius** `**number**` Radius of the circle in pixels **start\_deg** `**number**` `0` is the right side, `90` is the bottom, `180` is the left, `270` is the top **pct** `**number**` Percentage in the range \[0.0-1.0\] determining how full the circle is ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#text) text 📌 Render any text via the [`:load_font`](https://docs-csgo.neverlose.cc/documentation/variables/render#load_font) function. `render.text(font: FontObject, position: vector, color: color, flags: string, text:any[, ...])` Name Type Description **font** `**FontObject**` Font object or `1` for `Default` font, `2` for `Small` font, `3` for `Console` font, or `4` for `Bold` font **position** `**vector**` Screen position **color** `**color**` Color of the text **flags** `**string**` `c` for centered text, `r` for right-aligned text, `s` for DPI scaled text. `nil` can be specified for normal uncentered text. **text** `**any**` Text that will be drawn **...** Comma-separated vectors to concatenate with `text` Draws the specified text. ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#texture) texture 📌 Create the texture via the [`:load_image`](https://docs-csgo.neverlose.cc/documentation/variables/render#load_image) function. `render.texture(texture: ImgObject, position: vector[, size: vector, color: color, mode: string, rounding: number])` Name Type Description **texture** `**ImgObject**` Image object **position** `**vector**` Screen position **size** `**vector**` Optional. Size of the texture **color** `**color**` Optional. Color of the texture **mode** `**string**` Optional. `f` for fill, `r` for repeat **rounding** `**number**` Optional. Roundness of the texture ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#push_rotation) push\_rotation `render.push_rotation(degrees: number)` Name Type Description **degrees** `**number**` Rotation degrees (0 - 360) Applies the rotation for all subsequent elements. ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#pop_rotation) pop\_rotation `render.pop_rotation()` Discards an early set rotation. ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#push_clip_rect) push\_clip\_rect `render.push_clip_rect(pos_a: vector, pos_b: vector[, intersect: boolean])` Name Type Description **pos\_a** `**vector**` Screen position of point A **pos\_b** `**vector**` Screen position of point B **intersect** `**boolean**` Optional. Allow intersections with other clip regions Applies the clip region to the given rectangle for all subsequent elements. ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#pop_clip_rect) pop\_clip\_rect `render.pop_clip_rect()` Discards an early set rectangle clipping region. ### [](https://docs-csgo.neverlose.cc/documentation/variables/render#shadow) shadow `render.shadow(pos_a: vector, pos_b: vector, clr: color[, thickness: number, offset: number, rounding: number])` Name Type Description **pos\_a** `**vector**` Screen position of point A **pos\_b** `**vector**` Screen position of point B **clr** `**color**` The color of the shadow **thickness** `**number**` The thickness of the shadow **offset** `**number**` Shadow offset **rounding** `**number**` The rounding of the shadow rectangle Draws a shadow rectangle. [Previousrage](https://docs-csgo.neverlose.cc/documentation/variables/rage) [Nextutils](https://docs-csgo.neverlose.cc/documentation/variables/utils) Last updated 2 years ago * [Functions:](https://docs-csgo.neverlose.cc/documentation/variables/render#functions) * [screen\_size](https://docs-csgo.neverlose.cc/documentation/variables/render#screen_size) * [camera\_position](https://docs-csgo.neverlose.cc/documentation/variables/render#camera_position) * [camera\_angles](https://docs-csgo.neverlose.cc/documentation/variables/render#camera_angles) * [world\_to\_screen](https://docs-csgo.neverlose.cc/documentation/variables/render#world_to_screen) * [get\_offscreen](https://docs-csgo.neverlose.cc/documentation/variables/render#get_offscreen) * [get\_pixel](https://docs-csgo.neverlose.cc/documentation/variables/render#get_pixel) * [load\_font](https://docs-csgo.neverlose.cc/documentation/variables/render#load_font) * [load\_image](https://docs-csgo.neverlose.cc/documentation/variables/render#load_image) * [load\_image\_rgba](https://docs-csgo.neverlose.cc/documentation/variables/render#load_image_rgba) * [load\_image\_from\_file](https://docs-csgo.neverlose.cc/documentation/variables/render#load_image_from_file) * [measure\_text](https://docs-csgo.neverlose.cc/documentation/variables/render#measure_text) * [highlight\_hitbox](https://docs-csgo.neverlose.cc/documentation/variables/render#highlight_hitbox) * [get\_scale](https://docs-csgo.neverlose.cc/documentation/variables/render#get_scale) * [Structs](https://docs-csgo.neverlose.cc/documentation/variables/render#structs) * [🔗 ImgObject](https://docs-csgo.neverlose.cc/documentation/variables/render#imgobject) * [🔗 FontObject](https://docs-csgo.neverlose.cc/documentation/variables/render#fontobject) * [Draw functions](https://docs-csgo.neverlose.cc/documentation/variables/render#draw-functions) * [blur](https://docs-csgo.neverlose.cc/documentation/variables/render#blur) * [line](https://docs-csgo.neverlose.cc/documentation/variables/render#line) * [poly](https://docs-csgo.neverlose.cc/documentation/variables/render#poly) * [poly\_blur](https://docs-csgo.neverlose.cc/documentation/variables/render#poly_blur) * [poly\_line](https://docs-csgo.neverlose.cc/documentation/variables/render#poly_line) * [rect](https://docs-csgo.neverlose.cc/documentation/variables/render#rect) * [rect\_outline](https://docs-csgo.neverlose.cc/documentation/variables/render#rect_outline) * [gradient](https://docs-csgo.neverlose.cc/documentation/variables/render#gradient) * [circle](https://docs-csgo.neverlose.cc/documentation/variables/render#circle) * [circle\_outline](https://docs-csgo.neverlose.cc/documentation/variables/render#circle_outline) * [circle\_gradient](https://docs-csgo.neverlose.cc/documentation/variables/render#circle_gradient) * [circle\_3d](https://docs-csgo.neverlose.cc/documentation/variables/render#circle_3d) * [circle\_3d\_outline](https://docs-csgo.neverlose.cc/documentation/variables/render#circle_3d_outline) * [circle\_3d\_gradient](https://docs-csgo.neverlose.cc/documentation/variables/render#circle_3d_gradient) * [text](https://docs-csgo.neverlose.cc/documentation/variables/render#text) * [texture](https://docs-csgo.neverlose.cc/documentation/variables/render#texture) * [push\_rotation](https://docs-csgo.neverlose.cc/documentation/variables/render#push_rotation) * [pop\_rotation](https://docs-csgo.neverlose.cc/documentation/variables/render#pop_rotation) * [push\_clip\_rect](https://docs-csgo.neverlose.cc/documentation/variables/render#push_clip_rect) * [pop\_clip\_rect](https://docs-csgo.neverlose.cc/documentation/variables/render#pop_clip_rect) * [shadow](https://docs-csgo.neverlose.cc/documentation/variables/render#shadow) --- # Unknown \# Neverlose ## Neverlose API - \[Welcome\](https://docs-csgo.neverlose.cc/readme.md): Welcome to the official Neverlose wiki! - \[Quick start\](https://docs-csgo.neverlose.cc/useful-information/quick-start.md): Guide to writing lua scripts for Neverlose - \[Common knowledge\](https://docs-csgo.neverlose.cc/useful-information/common-knowledge.md) - \[Examples\](https://docs-csgo.neverlose.cc/useful-information/script-examples.md): Overview of the different script examples available to use - \[Materials\](https://docs-csgo.neverlose.cc/useful-information/script-examples/materials.md) - \[Color\](https://docs-csgo.neverlose.cc/useful-information/script-examples/color.md) - \[Vector\](https://docs-csgo.neverlose.cc/useful-information/script-examples/vector.md) - \[ESP\](https://docs-csgo.neverlose.cc/useful-information/script-examples/esp.md) - \[ConVars\](https://docs-csgo.neverlose.cc/useful-information/script-examples/convars.md) - \[UI\](https://docs-csgo.neverlose.cc/useful-information/script-examples/ui.md) - \[Events\](https://docs-csgo.neverlose.cc/documentation/events.md): List of cheat events that you can listen to using :set - \[Variables\](https://docs-csgo.neverlose.cc/documentation/variables.md) - \[\\\_G\](https://docs-csgo.neverlose.cc/documentation/variables/\_g.md) - \[bit\](https://docs-csgo.neverlose.cc/documentation/variables/bit.md) - \[color\](https://docs-csgo.neverlose.cc/documentation/variables/color.md) - \[common\](https://docs-csgo.neverlose.cc/documentation/variables/common.md) - \[cvar\](https://docs-csgo.neverlose.cc/documentation/variables/cvar.md) - \[db\](https://docs-csgo.neverlose.cc/documentation/variables/db.md) - \[entity\](https://docs-csgo.neverlose.cc/documentation/variables/entity.md) - \[esp\](https://docs-csgo.neverlose.cc/documentation/variables/esp.md) - \[events\](https://docs-csgo.neverlose.cc/documentation/variables/events.md) - \[files\](https://docs-csgo.neverlose.cc/documentation/variables/files.md) - \[globals\](https://docs-csgo.neverlose.cc/documentation/variables/globals.md) - \[json\](https://docs-csgo.neverlose.cc/documentation/variables/json.md) - \[materials\](https://docs-csgo.neverlose.cc/documentation/variables/materials.md) - \[math\](https://docs-csgo.neverlose.cc/documentation/variables/math.md) - \[ui\](https://docs-csgo.neverlose.cc/documentation/variables/ui.md) - \[network\](https://docs-csgo.neverlose.cc/documentation/variables/network.md) - \[panorama\](https://docs-csgo.neverlose.cc/documentation/variables/panorama.md) - \[rage\](https://docs-csgo.neverlose.cc/documentation/variables/rage.md) - \[render\](https://docs-csgo.neverlose.cc/documentation/variables/render.md) - \[utils\](https://docs-csgo.neverlose.cc/documentation/variables/utils.md) - \[vector\](https://docs-csgo.neverlose.cc/documentation/variables/vector.md) --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on a page URL with the \`ask\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/readme.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/readme.md). # Welcome !\[\](/files/ciQiDJejBj8yCl7zoANU) ## About Neverlose is a unique software providing huge functionality and easy setup, with a fast and friendly support team. ## Getting Started For information on how to get started with lua scripting, check out the link below. {% content-ref url="/pages/PKLMRpPzfIQJaidn6e7j" %} \[Quick start\](/useful-information/quick-start.md) {% endcontent-ref %} ## Current features | Library | Description | | ------------------------------------------------ | --------------------------------------------------------------------------------------------------- | | \[LuaJIT 2.1.0\](https://github.com/LuaJIT/LuaJIT) | LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language. | | \[FFI\](https://luajit.org/ext\_ffi.html) | The FFI library allows calling external C functions and using C data structures from pure Lua code. | | \[BIT\](https://bitop.luajit.org/api.html) | BitOp is a C extension module for Lua which adds bitwise operations on numbers. | ## Disclaimer Arguments in square brackets are optional. ## Documentation errors This documentation was made by Salvatore and Serene. Please report any errors in the documentation either to us in a private message on the forum or to Serene#1337 on Discord. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/readme.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/useful-information/common-knowledge.md). # Common knowledge ### Script location Neverlose scripts are located in the \`Counter-Strike Global Offensive\\nl\` directory. {% hint style="info" %} There's no need to back up your scripts - they are automatically synchronized and stored on the Neverlose servers. {% endhint %} ### Script environment Each script runs in it's own separate environment. This means that global variables can not be reused between scripts. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/useful-information/common-knowledge.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/useful-information/quick-start.md). # Quick start ## :clipboard: Text editor The best text editors make it simple and easy to code without formatting issues corrupting it.
Text editorLink
🥇 Visual Studio Codecode.visualstudio.com
🥈 Sublime Textsublimetext.com
🥉 Notepad++notepad-plus-plus.org
## :beginner: Beginner's guide If you're new to Lua scripting, we'd recommend to take a look at the «\[Lua in 5 minutes\](https://learnxinyminutes.com/docs/lua/)» guide ## :blue\\\_book: Learn more {% content-ref url="/pages/Neumn9dJ9DNgWD7F3mNu" %} \[Common knowledge\](/useful-information/common-knowledge.md) {% endcontent-ref %} {% content-ref url="/pages/PIbzOa0ZHFuQquOMnl4P" %} \[Examples\](/useful-information/script-examples.md) {% endcontent-ref %} --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/useful-information/quick-start.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/useful-information/script-examples.md). # Examples - \[Materials\](https://docs-csgo.neverlose.cc/useful-information/script-examples/materials.md) - \[Color\](https://docs-csgo.neverlose.cc/useful-information/script-examples/color.md) - \[Vector\](https://docs-csgo.neverlose.cc/useful-information/script-examples/vector.md) - \[ESP\](https://docs-csgo.neverlose.cc/useful-information/script-examples/esp.md) - \[ConVars\](https://docs-csgo.neverlose.cc/useful-information/script-examples/convars.md) - \[UI\](https://docs-csgo.neverlose.cc/useful-information/script-examples/ui.md) --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/useful-information/script-examples.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/useful-information/script-examples/vector.md). # Vector ### Closest Enemy To Crosshair \`\`\`lua -- You can create your own vector objects -- All vectors are 3D local vec = vector(1, 2, 3) -- There are 3 fields you can access: "x", "y", and "z" print(string.format("x: %.2f, y: %.2f, z: %.2f", vec.x, vec.y, vec.z)) -- You can also set them vec.x, vec.y, vec.z = 0, 0, 0 events.render:set(function() -- All vectors are 3D, even the ones you'd expect to be 2D local screen\_center = render.screen\_size() \* 0.5 local local\_player = entity.get\_local\_player() if not local\_player or not local\_player:is\_alive() then return end local camera\_position = render.camera\_position() -- Even angles are 3D vectors -- x is pitch, y is yaw, z is roll local camera\_angles = render.camera\_angles() -- Let's convert it to a forward vector though local direction = vector():angles(camera\_angles) local closest\_distance, closest\_enemy = math.huge for \_, enemy in ipairs(entity.get\_players(true)) do local head\_position = enemy:get\_hitbox\_position(1) local ray\_distance = head\_position:dist\_to\_ray( camera\_position, direction ) if ray\_distance < closest\_distance then closest\_distance = ray\_distance closest\_enemy = enemy end end if not closest\_enemy then return end render.text( 1, vector(screen\_center.x, screen\_center.y + 20), color(), "cd", string.format( "Closest enemy to crosshair: %s", closest\_enemy:get\_name() ) ) end) \`\`\`

Preview

--- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/useful-information/script-examples/vector.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/useful-information/script-examples/color.md). # Color ### Color Pseudocode \`\`\`lua -- Colors have a flexible constructor local foo = color(255, 0, 0, 255) local bar = color("#00FF00FF") -- There are 4 fields you can access: "r", "g", "b", and "a" print(string.format("r: %d, g: %d, b: %d, a: %d", foo.r, foo.g, foo.b, foo.a)) -- You can also set them by manually indexing them like so foo.r, foo.g, foo.b, foo.a = 0, 0, 255, 200 -- or by initializing it with several functions that our API has to offer foo:as\_fraction(1, 0, 1, 1) -- There are a lot of built-in ways to interpret colors print(bar) --> color(0, 255, 0, 255) print(foo:to\_hex()) --> FF0000FF print(string.format("r: %d, g: %d, b: %d, a: %d", foo:unpack())) -- Learn more at Variables -> color \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/useful-information/script-examples/color.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/useful-information/script-examples/esp.md). # ESP ### Text Example \`\`\`lua local low\_health = 20 local text\_example = esp.enemy:new\_text("Text Example", "LOW HP", function(player) local health = player.m\_iHealth if health > low\_health then return end return "LOW HP" end) local group\_ref = text\_example:create() local slider\_ref = group\_ref:slider("Low Health", 0, 50, low\_health) slider\_ref:set\_callback(function(slider\_ref) low\_health = slider\_ref:get() end, true) \`\`\`
### Bar Example \`\`\`lua local bar\_example = esp.enemy:new\_bar("Bar Example", function(player) local velocity = player.m\_vecVelocity local speed = velocity:length() if speed < 2 then return end local max\_speed = 260 local weapon = player:get\_player\_weapon() if weapon then max\_speed = weapon:get\_max\_speed() end return speed / max\_speed \* 100 end) \`\`\` ### Item Example \`\`\`lua local item\_example = esp.enemy:new\_item("Item Example") local item\_example\_group\_ref = item\_example:create() local switch\_ref = item\_example\_group\_ref:switch("Switch") events.render:set(function() print(string.format("Item Example Selected: %s", item\_example:get())) print(string.format("Switch Enabled: %s", switch\_ref:get())) end) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/useful-information/script-examples/esp.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/useful-information/script-examples/materials.md). # Materials \`\`\`lua local var\_flags = { \["DEBUG"\] = 0, \["NO\_DEBUG\_OVERRIDE"\] = 1, \["NO\_DRAW"\] = 2, \["USE\_IN\_FILLRATE\_MODE"\] = 3, \["VERTEXCOLOR"\] = 4, \["VERTEXALPHA"\] = 5, \["SELFILLUM"\] = 6, \["ADDITIVE"\] = 7, \["ALPHATEST"\] = 8, \["MULTIPASS"\] = 9, \["ZNEARER"\] = 10, \["MODEL"\] = 11, \["FLAT"\] = 12, \["NOCULL"\] = 13, \["NOFOG"\] = 14, \["IGNOREZ"\] = 15, \["DECAL"\] = 16, \["ENVMAPSPHERE"\] = 17, \["NOALPHAMOD"\] = 18, \["ENVMAPCAMERASPACE"\] = 19, \["BASEALPHAENVMAPMASK"\] = 20, \["TRANSLUCENT"\] = 21, \["NORMALMAPALPHAENVMAPMASK"\] = 22, \["NEEDS\_SOFTWARE\_SKINNING"\] = 23, \["OPAQUETEXTURE"\] = 24, \["ENVMAPMODE"\] = 25, \["SUPPRESS\_DECALS"\] = 26, \["HALFLAMBERT"\] = 27, \["WIREFRAME"\] = 28, \["ALLOWALPHATOCOVERAGE"\] = 29, \["IGNORE\_ALPHA\_MODULATION"\] = 30, \["VERTEXFOG"\] = 31 } local var\_flags\_names = {} for var\_flag\_name in pairs(var\_flags) do var\_flags\_names\[#var\_flags\_names + 1\] = var\_flag\_name end table.sort(var\_flags\_names) local group\_ref = ui.find("Visuals", "Players", "Self", "Chams", "Weapon"):create() local var\_flags\_ref = group\_ref:listable("Var Flags", var\_flags\_names) var\_flags\_ref:set\_callback(function(var\_flags\_ref) local selected\_var\_flags = {} for \_, selected\_index in ipairs(var\_flags\_ref:get()) do local var\_flag\_name = var\_flags\_names\[selected\_index\] local var\_flag = var\_flags\[var\_flag\_name\] selected\_var\_flags\[#selected\_var\_flags + 1\] = var\_flag end for \_, mat in ipairs(materials.get\_materials("neverlose/self/weapon")) do for \_, var\_flag in pairs(var\_flags) do mat:var\_flag(var\_flag, false) end for \_, var\_flag in ipairs(selected\_var\_flags) do mat:var\_flag(var\_flag, true) end end end, true) events.shutdown:set(function() for \_, mat in ipairs(materials.get\_materials("neverlose/self/weapon")) do mat:reset() end end) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/useful-information/script-examples/materials.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/useful-information/script-examples/convars.md). # ConVars ### Execute > :information\\\_source: Force full-update > > :information\\\_source: Turn up player footstep volume \`\`\`lua -- Initialize the cvar objects local cl\_fullupdate = cvar.cl\_fullupdate local snd\_setmixer = cvar.snd\_setmixer -- Invoke the callback cl\_fullupdate:call() -- Adjust players’ step volume by setting the mixer volume to 1.2 snd\_setmixer:call('GlobalFootsteps', 'vol', 1.2) \`\`\` ### Getting / Setting values > :information\\\_source: Override maximum fake-lag limit \`\`\`lua -- Initialize the cvar objects local process\_ticks = cvar.sv\_maxusrcmdprocessticks -- \[60\]: New value | \[true\]: Sets the raw value process\_ticks:int(60, true) \`\`\` ### Callbacks > :information\\\_source: Instantly crash the server if someones changes the \`sv\_cheats\` cvar to 1 > > :information\\\_source: Refuse the connection to the server if the IP is blacklisted \`\`\`lua cvar.sv\_cheats:set\_callback(function(cvar\_obj, old\_value, new\_value) if tonumber(old\_value) == 0 and tonumber(new\_value) == 1 then -- invoke ent\_create convar callback with "weapon\_ak47" argument -- cvar.ent\_create:call 'weapon\_ak47' cvar.clear:call() print '\\aFF697Asv\_cheats was updated. Crashing the server.' utils.console\_exec 'ent\_create weapon\_ak47' end end) cvar.connect:set\_callback(function(cvar\_obj, args) if args\[1\] == '127.0.0.1' then return false end end) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/useful-information/script-examples/convars.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/useful-information/script-examples/ui.md). # UI ### UI Pseudocode \`\`\`lua -- Pseudocode that shows most of the ui functions and how to use them -- If you want to get a reference to an existing group or item, call .find local double\_tap\_ref = ui.find("aimbot", "ragebot", "main", "double tap") -- "ui.create" creates a group -- in which you can add items such as switches, sliders, combos, etc. local group\_ref = ui.create("Group") -- Some arguments can be optional, like the 2nd one in this function, -- it will make its default value true local switch\_ref = group\_ref:switch("Switch", true) -- You can change its value switch\_ref:set(false) -- Or you can "override" its value -- This will allow you to change the value of the item -- without changing its value in the menu or in the cheat's configuration switch\_ref:override(true) -- Reset the previous override switch\_ref:override() -- You can register a function that will be executed -- every time the value of the item changes -- The reference can be accessed from the arguments of the callback switch\_ref:set\_callback(function(ref) -- You can access the value of the item by calling :get -- To access the value it's overriden to with :override, call :get\_override print(string.format("New value: %s", ref:get())) end) -- If you want to what type of object the item is, you can call :get\_type -- print(switch\_ref:type()) --> switch -- You can attach other items to some types of items by calling :create -- This will create and return a reference to the item group, -- to which you can add other items local switch\_group\_ref = switch\_ref:create() -- Our API offers a lot of overloads, you can either just provide a bunch of strings -- or you can provide a table of strings local combo\_ref = switch\_group\_ref:combo("Combo", "Option A", "Option B", "Option C") -- You can update the contents of combos, selectables, list, and listables with :update combo\_ref:update({"Option A"}) -- You can attach color pickers to some types of items, -- but keep in mind that you won't be able to attach a group at the same time local combo\_color\_picker\_ref = combo\_ref:color\_picker(color(255, 0, 0, 255)) -- If you want to see what group the item belongs to, call :parent -- print(group\_ref == switch\_ref:parent()) --> true -- print(switch\_group\_ref == combo\_ref:parent()) --> true -- If you want to describe an item, you can call :tooltip, -- which will display a text when you move the cursor over the item switch\_ref:tooltip("Some useful information.") -- Further reading: -- https://lua.neverlose.cc/documentation/variables/ui -- DM Serene#1337 for any documentation errors \`\`\` ### Multi-Color Picker \`\`\`lua -- create a group local group\_ref = ui.create("Example Group") -- create a color picker in the group local color\_picker\_ref = group\_ref:color\_picker("Example Color Picker", { \["Simple"\] = { color(255, 255, 255) }, \["Double"\] = { color(255, 255, 255), color(0, 0, 0) }, \["Multiple"\] = { color(255, 0, 0), color(0, 255, 0), color(0, 0, 255), color(255, 0, 255) }, }) -- print the available modes for \_, v in ipairs(color\_picker\_ref:list()) do print(v) -- \[neverlose\] Simple -- \[neverlose\] Multiple -- \[neverlose\] Double end events.render(function() -- get the currently selected mode and color(s) -- (the second returned value can be a table) local mode, colors = color\_picker\_ref:get() print(mode) -- get colors from a specific mode local top\_left, top\_right, bottom\_left, bottom\_right = unpack(color\_picker\_ref:get("Multiple")) render.gradient( vector(20, 20), vector(120, 120), top\_left, top\_right, bottom\_left, bottom\_right ) end) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/useful-information/script-examples/ui.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables.md). # Variables - \[\\\_G\](https://docs-csgo.neverlose.cc/documentation/variables/\_g.md) - \[bit\](https://docs-csgo.neverlose.cc/documentation/variables/bit.md) - \[color\](https://docs-csgo.neverlose.cc/documentation/variables/color.md) - \[common\](https://docs-csgo.neverlose.cc/documentation/variables/common.md) - \[cvar\](https://docs-csgo.neverlose.cc/documentation/variables/cvar.md) - \[db\](https://docs-csgo.neverlose.cc/documentation/variables/db.md) - \[entity\](https://docs-csgo.neverlose.cc/documentation/variables/entity.md) - \[esp\](https://docs-csgo.neverlose.cc/documentation/variables/esp.md) - \[events\](https://docs-csgo.neverlose.cc/documentation/variables/events.md) - \[files\](https://docs-csgo.neverlose.cc/documentation/variables/files.md) - \[globals\](https://docs-csgo.neverlose.cc/documentation/variables/globals.md) - \[json\](https://docs-csgo.neverlose.cc/documentation/variables/json.md) - \[materials\](https://docs-csgo.neverlose.cc/documentation/variables/materials.md) - \[math\](https://docs-csgo.neverlose.cc/documentation/variables/math.md) - \[ui\](https://docs-csgo.neverlose.cc/documentation/variables/ui.md) - \[network\](https://docs-csgo.neverlose.cc/documentation/variables/network.md) - \[panorama\](https://docs-csgo.neverlose.cc/documentation/variables/panorama.md) - \[rage\](https://docs-csgo.neverlose.cc/documentation/variables/rage.md) - \[render\](https://docs-csgo.neverlose.cc/documentation/variables/render.md) - \[utils\](https://docs-csgo.neverlose.cc/documentation/variables/utils.md) - \[vector\](https://docs-csgo.neverlose.cc/documentation/variables/vector.md) --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/cvar.md). # cvar ### Example \`\`\`lua cvar.mp\_teammates\_are\_enemies:int(1) cvar.clear:call() \`\`\` ## Functions: ### :call \`cvar\_object:call(...)\`
NameTypeDescription
...Arguments passed to the callback
Executes a ConCommand or cvar callback, passing its arguments to it. ### :int {% tabs %} {% tab title="Get value" %} \`cvar\_object:int():\` \`number\` {% endtab %} {% tab title="Set value" %} \`cvar\_object:int(value: number\[, raw: boolean \])\`
NameTypeDescription
valuenumberNew int value
rawbooleanOptional. If true then the raw value will be set
{% endtab %} {% endtabs %} Gets or sets the ConVar int value. ### :float {% tabs %} {% tab title="Get value" %} \`cvar\_object:float():\` \`number\` {% endtab %} {% tab title="Set value" %} \`cvar\_object:float(value: number\[, raw: boolean \])\`
NameTypeDescription
valuenumberNew float value
rawbooleanOptional. If true then the raw value will be set
{% endtab %} {% endtabs %} Gets or sets the ConVar float value. ### :string \`cvar\_object:string(\[ value: any \]):\` \`string\`
NameTypeDescription
valueanyNew string value. If not specified then returns the string value of the ConVar
Gets or sets the ConVar string value. ### :set\\\_callback {% tabs %} {% tab title="ConVar" %} You can access the \`cvar\_object\`, \`old\_value\` and \`new\_value\` by adding them to the function arguments. {% endtab %} {% tab title="Command" %} You can access the \`cvar\_object\` and \`args\` by adding them to the function arguments. Inside the callback, return false to prevent the command from being executed. {% endtab %} {% endtabs %} \`cvar\_object:set\_callback(callback: function)\`
NameTypeDescription
callbackfunctionLua function to call
Registers the callback to the specified ConVar/Command. The registered function will be called every time the specified convar value is updated. ### :unset\\\_callback \`cvar\_object:unset\_callback(callback: function)\`
NameTypeDescription
callbackfunctionLua function that was passed to the :set\_callback function
Unregisters the callback that was set via the \`:set\_callback\` function from the specified ConVar/Command. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/cvar.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/vector.md). # vector ## Example available! {% content-ref url="/pages/nlQEeTdmW3KQXC19SkLL" %} \[Vector\](/useful-information/script-examples/vector.md) {% endcontent-ref %} ## Functions: ### :angles {% tabs %} {% tab title="Initialize from" %} \`vec\_object:angles(pitch: number, yaw: number):\` \`vector\`
NameTypeDescription
pitchnumberPitch component of the angle
yawnumberYaw component of the angle
Converts the angle into a forward vector overwriting the vector's coordinates. Returns itself. {% endtab %} {% tab title="Initialize from \\\[2\]" %} \`vec\_object:angles(vector: angle):\` \`vector\`
NameTypeDescription
anglevectorAngle vector component
Converts the angle into a forward vector overwriting the vector's coordinates. Returns itself. {% endtab %} {% tab title="Convert to" %} \`vec\_object:angles():\` \`vector\` Returns the angle vector representing the normal of the vector. {% endtab %} {% endtabs %} ### :ceil \`vec\_object:ceil():\` \`vector\` Ceils & overwrites the x, y, and z coordinates of a vector. Returns itself. ### :clone \`vec\_object:clone():\` \`vector\` Creates and returns a copy of the vector. ### :closest\\\_ray\\\_point \`vec\_object:closest\_ray\_point(ray\_start: vector, ray\_end: vector):\` \`vector\`
NameTypeDescription
ray\_startvectorRay start position
ray\_endvectorRay end position
Returns the vector of the closest point along a ray. ### :cross \`vec\_object:cross(other: vector):\` \`vector\`
NameTypeDescription
othervectorThe vector to calculate the cross product with
Returns the cross product of two given vectors. ### :dist \`vec\_object:dist(other: vector):\` \`number\`
NameTypeDescription
othervectorThe vector to get the distance to
Returns the Euclidean distance between the two given vectors. ### :dist2d \`vec\_object:dist2d(other: vector):\` \`number\`
NameTypeDescription
othervectorThe vector to get the distance to
Returns the 2D distance to another vector. ### :dist2dsqr \`vec\_object:dist2dsqr(other: vector):\` \`number\`
NameTypeDescription
othervectorThe vector to get the squared distance to
Returns the squared 2D distance to another vector. ### :distsqr \`vec\_object:distsqr(other: vector):\` \`number\`
NameTypeDescription
othervectorThe vector to get the squared distance to
Returns the squared Euclidean distance to another vector. ### :dist\\\_to\\\_ray \`vec\_object:dist\_to\_ray(ray\_start: vector, ray\_direction: vector):\` \`number\`
NameTypeDescription
ray\_startvectorRay start position
ray\_directionvectorRay direction
Returns the distance to a ray. ### :dot \`vec\_object:dot(other: vector):\` \`number\`
NameTypeDescription
othervectorThe vector to calculate the dot product with
Returns the dot product of the two given vectors. ### :floor \`vec\_object:floor():\` \`vector\` Rounds the x, y, and z coordinates of the vector down to the largest integer that is less than or equal. Returns itself. ### :in\\\_range \`vec\_object:in\_range(other: vector, range: number):\` \`boolean\`
NameTypeDescription
othervectorThe vector to calculate the distance to
rangenumberThe distance
Returns true if the vector is within the given distance to another vector. ### :init \`vec\_object:init(x: number, y: number, z: number):\` \`vector\`
NameTypeDescription
xnumberNew X coordinate
ynumberNew Y coordinate
znumberNew Z coordinate
Overwrites the vector's coordinates. Returns itself. ### :length \`vec\_object:length():\` \`number\` Returns the Euclidean length of the vector. ### :length2d \`vec\_object:length2d():\` \`number\` Returns the length of the vector in two dimensions, without the Z axis. ### :length2dsqr \`vec\_object:length2dsqr():\` \`number\` Returns the squared length of the vectors x and y value. ### :lengthsqr \`vec\_object:lengthsqr():\` \`number\` Returns the squared length of the vector. ### :lerp \`vec\_object:lerp(other: vector, weight: number):\` \`vector\`
NameTypeDescription
othervectorThe vector to interpolate to
weightnumberA value between 0 and 1 that indicates the weight of other
Returns the linearly interpolated vector between two vectors by the specified weight. ### :normalize \`vec\_object:normalize():\` \`number\` Normalizes the vector and returns the length of the vector. ### :normalized \`vec\_object:normalized():\` \`vector\` Returns a vector with the same direction as the specified vector, but with a length of one. ### :scale \`vec\_object:scale(scalar: number):\` \`vector\`
NameTypeDescription
scalarnumberThe scalar value
Multiplies the vector by the specified scalar. ### :scaled \`vec\_object:scaled(scalar: number):\` \`vector\`
NameTypeDescription
scalarnumberThe scalar value.
Returns a copy of the vector multiplied by the specified scalar. ### :to \`vec\_object:to(other: vector):\` \`vector\`
NameTypeDescription
othervectorThe vector to get the direction to.
Returns the forward vector from itself to another vector. ### :to\\\_screen \`vec\_object:to\_screen():\` \`vector\` Returns a vector containing the coordinates where the specified position vector appears on the screen. ### :unpack \`vec\_object:unpack():\` \`number\`, \`number\`, \`number\` Returns the x, y, and z coordinates of the vector. Note that these fields can be accessed by indexing x, y, and z. ### :vectors \`vec\_object:vectors():\` \`vector\`, \`vector\` Returns the right and up vector of a forward vector. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/vector.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/events.md). # Events ## List of game events: {% hint style="info" %} In order to reference an event, index the \`events\` namespace with an event name {% endhint %} {% embed url="" %} Official CS:GO events {% endembed %} \`\`\`lua local hitgroup\_str = { \[0\] = 'generic', 'head', 'chest', 'stomach', 'left arm', 'right arm', 'left leg', 'right leg', 'neck', 'generic', 'gear' } events.player\_hurt:set(function(e) local me = entity.get\_local\_player() local attacker = entity.get(e.attacker, true) if me == attacker then local user = entity.get(e.userid, true) local hitgroup = hitgroup\_str\[e.hitgroup\] print(('Hit %s in the %s for %d damage (%d health remaining)'):format( user:get\_name(), hitgroup, e.dmg\_health, e.health )) end end) \`\`\` ## List of events: ### render Fired every frame. Most functions from the \[\`render\`\](/documentation/variables/render.md) namespace can only be used here. \`\`\`lua events.render:set(function(ctx) render.rect(vector(0, 0), vector(1920, 1080), color(230, 150)) end) \`\`\` ### render\\\_glow Fired every time the game prepares glow object manager. This event gives you the ability to render glow lines. Access the function by adding an argument to the callback. \`ctx:render(from: vector, to: vector, thickness: number, flags: string, color: color)\`
NameTypeDescription
fromvectorStart position in world space
tovectorFinal position in world space
thicknessnumberLine thickness as a number in the range \[0.0, ∞\]
flagsstringGlow flags. l to draw line, g to draw glow outline, or w to make it fully visible behind walls
colorcolorColor of the line
🧷 Anti-aim direction glow lines \`\`\`lua local real\_yaw, abs\_yaw = 0, 0 events.createmove:set(function(cmd) local me = entity.get\_local\_player() local anim\_state = me:get\_anim\_state() if not anim\_state or cmd.choked\_commands > 0 then return end real\_yaw = anim\_state.eye\_yaw abs\_yaw = anim\_state.abs\_yaw end) events.render\_glow:set(function(ctx) local me = entity.get\_local\_player() if not me or not me:is\_alive() then return end local origin = me:get\_origin() local real\_yaw\_dir = origin + (vector():angles(0, real\_yaw) \* 20) local abs\_yaw\_dir = origin + (vector():angles(0, abs\_yaw) \* 25) ctx:render(origin, real\_yaw\_dir, 0.15, 'lg', color(255, 0, 0)) -- Real yaw ctx:render(origin, abs\_yaw\_dir, 0.15, 'g', color(35, 215, 235)) -- Body yaw end) \`\`\`
### override\\\_view Fired every time the game prepares camera view.
NameTypeDescription
fovnumberField of View
viewvectorCamera view angles
cameravectorWorld position of the camera
### createmove Fired every time the game prepares a move command. Use this to modify something before the aimbot or movement features. Use the parameter passed by the callback to access the \[\`UserCmd\`\](#struct-usercmd). \`\`\`lua -- Sets the Roll angle when Shift (+speed) is being held events.createmove:set(function(cmd) if cmd.in\_speed then cmd.view\_angles.z = 50 -- you are now unhittable end end) \`\`\` #### 🔗 struct \`UserCmd\`
NameTypeDescription
block\_movementnumberSet to 1 to make the cheat slowdown you to the weapon's minimal speed or set to 2 to fully stop you. Defaults to 0
no\_chokebooleanSet to true to force the cheat to not choke the current command
send\_packetbooleanSet to false to force the cheat to choke the current command
force\_defensivebooleanSet to true to trigger 'defensive' exploit (Double tap is required to be fully charged)
jitter\_movebooleanSet to false to disable jitter move
choked\_commandsnumberAmount of choked commands
command\_numbernumberCurrent command number
tickcountnumberCurrent command tickcount
random\_seednumberCurrent command random seed
view\_anglesvectorPlayer view angles
move\_yawnumberMovement yaw angle
forwardmovenumberForward / backward speed
sidemovenumberLeft / right speed
upmovenumberUp / down speed
🧷 Available cmd buttons \`\`\`lua local on\_createmove = function(cmd) cmd.in\_attack -- +attack cmd.in\_attack2 -- +attack2 cmd.in\_use -- +use cmd.in\_jump -- +jump cmd.in\_duck -- +duck cmd.in\_walk -- +walk cmd.in\_speed -- +speed cmd.in\_reload -- +reload cmd.in\_moveleft cmd.in\_moveright cmd.in\_forward cmd.in\_back cmd.in\_left cmd.in\_right cmd.in\_bullrush end events.createmove:set(on\_createmove) \`\`\`
### createmove\\\_run Fired every time the game runs a move command. Use the parameter passed by the callback to access the \[\`RunCommand\`\](#struct-usercmd-1). #### 🔗 struct \`RunCommand\`
NameTypeDescription
choked\_commandsnumberAmount of choked commands
command\_numbernumberCurrent command number
tick\_countnumberCurrent command tick count
move\_yawnumberMovement yaw angle
forwardmovenumberForward / backward speed
sidemovenumberLeft / right speed
upmovenumberUp / down speed
### aim\\\_fire Fired every time the aimbot shoots at a player.
NameTypeDescription
idnumberShot ID
targetentityTarget entity
damagenumberEstimated damage
hitchancenumberEstimated hit chance
hitgroupnumberTargeted hitgroup
backtracknumberAmount of ticks the player was backtracked
aimvectorWorld position of the aim point
anglevectorAimbot shoot angles
### aim\\\_ack
NameTypeDescription
idnumberShot ID
targetentityTarget entity
damagenumberActual shot damage
spreadnumberBullet spread angle if available
hitchancenumberActual shot hit chance
hitgroupnumberHitgroup that was hit
backtracknumberAmount of ticks the player was backtracked
aimvectorWorld position of the aim point
wanted\_damagenumberTargeted damage
wanted\_hitgroupnumberTargeted hitgroup
statestringReason the shot was missed or nil if the shot was hit. Available miss reasons: spread, correction, misprediction, prediction error, backtrack failure, damage rejection, unregistered shot, player death, death.
### bullet\\\_fire Fired every time someone fires a bullet.
NameTypeDescription
entityentityEntity that did the shot
originvectorEntity world position
anglesvectorAim angle based on entity rotation
soundnumberSound type
spreadnumberWeapon spread
inaccuracynumberWeapon inaccuracy
recoil\_indexnumberWeapon recoil index
random\_seednumberSpread seed of the shot
weapon\_idnumberWeapon definition index
weapon\_modenumberWeapon fire mode
### console\\\_input Fired every time the user runs a console command. Use the parameter passed by the callback to access the input string. \`\`\`lua local last\_random\_int events.console\_input:set(function(text) if text == '/roll' then local random\_int = utils.random\_int(1, 6) local str = common.get\_username() .. ' rolled a ' .. random\_int if random\_int == 1 and random\_int == last\_random\_int then str = str .. '... snake eyes!' end print(str) last\_random\_int = random\_int return false end end) \`\`\` This can be used to implement custom console commands. Return \`false\` to prevent the game from processing the command. ### draw\\\_model Fired before a model is rendered. Use the parameter passed by the callback to access the model context. Return \`false\` to prevent the game from rendering the original model.
NameTypeDescription
namestringName of the model. (e.g: weapons\\v\_knife\_cord.mdl)
entityentityEntity that belongs to the model.
drawfunctionDraws the model with the specified material. Pass nil to the first argument to draw the model with the default material.
🧷 Draw model example {% code lineNumbers="true" %} \`\`\`lua local ct\_fbi\_glass = materials.get('models/player/ct\_fbi/ct\_fbi\_glass', true) events.draw\_model:set(function(ctx) local me = entity.get\_local\_player() if ctx.entity == me then -- Override local player model with the new material ctx:draw(ct\_fbi\_glass) -- Prevent the game from drawing the original model return false end end) \`\`\` {% endcode %}
### level\\\_init Fired after fully connected to the server (first non-delta packet received). (\`SIGNONSTATE:FULL\`) ### pre\\\_render Fired before a frame is rendered. (\`FrameStageNotify:FRAME\_RENDER\_START\`) ### post\\\_render Fired after a frame is rendered. (\`FrameStageNotify:FRAME\_RENDER\_END\`) ### net\\\_update\\\_start Fired before the game processes entity updates from the server. (\`FrameStageNotify:FRAME\_NET\_UPDATE\_START\`) ### net\\\_update\\\_end Fired after an entity update packet is received from the server. (\`FrameStageNotify:FRAME\_NET\_UPDATE\_END\`) ### config\\\_state Fired every time config state is updated. The current state is accessible from the callback arguments as one of these strings: \`pre\_save\`, \`post\_save\`, \`pre\_load\`, \`post\_load\`. {% code overflow="wrap" lineNumbers="true" %} \`\`\`lua events.config\_state(function(state) print(state == "pre\_save") end) \`\`\` {% endcode %} ### mouse\\\_input Fired every time the mouse input occurs. Return \`false\` to lock the mouse input. ### shutdown Fired when the script is about to unload. ### pre\\\_update\\\_clientside\\\_animation Fired before C\\\_CSPlayer::UpdateClientSideAnimation is called.
NameTypeDescription
playerentity...
### post\\\_update\\\_clientside\\\_animation Fired after C\\\_CSPlayer::UpdateClientSideAnimation is called.
NameTypeDescription
playerentity...
### grenade\\\_override\\\_view Invoked to override the input values for the grenade prediction. Contains detailed view parameters associated with the grenade trajectory prediction.
NameTypeDescription
anglesvectorInput view angles
srcvectorInput starting position or origin
velocityvectorInput velocity
view\_offsetvectorInput view offset
### grenade\\\_warning Fired when the "Grenade Proximity Warning" is being rendered. Return \`false\` to it from being rendered.
NameTypeDescription
entityentityThe game entity representing the grenade in proximity.
originvectorThe current position of the grenade.
closest\_pointvectorRepresents the nearest point to the player where the grenade will cause damage. For example, in the case of a molotov, this point indicates where the flames would be most harmful.
typestringSpecifies the type of the grenade, "Frag" or "Molly".
damagenumberPredicts the potential damage that would be inflicted upon the local player if they remain at their current position when the grenade detonates.
expire\_timenumberSpecifies the time when the grenade detonates or is no longer a threat.
iconImgObjectA reference to the texture used in the warning.
pathtableTable of 3D vectors representing the complete trajectory path of the grenade.
### grenade\\\_prediction Fired when the cheat is drawing the predicted grenade trajectory. Contains detailed information about the grenade's trajectory and impact.
NameTypeDescription
typestringIdentifies the type of the grenade, e.g., "Smoke", "Flash", "Frag".
damagenumberRepresents the amount of damage inflicted upon the target due to the grenade's effect.
fatalbooleanIndicates whether the grenade's effect resulted in a lethal outcome for the target.
pathtableTable of 3D vectors representing the complete trajectory path of the grenade.
collisionstableTable of 3D vectors containing all the collision points where the grenade interacts with an obstacle or wall.
targetentityThe game entity that the grenade directly impacts or affects.
### localplayer\\\_transparency Invoked to override the opacity of the local player's model. You can override it by returning a custom alpha value.
NameTypeDescription
current\_alphanumberThe current alpha. Ranges from 0 (completely transparent) to 255 (completely opaque).
## List of complicated events: ### voice\\\_message Fired every time the game receives a voice packet.
NameTypeDescription
entityentityEntity that belongs to the voice packet.
audible\_masknumberAudible mask
xuidnumberXuid
proximitynumberProximity
formatnumberFormat
sequence\_bytesnumberSequence bytes
section\_numbernumberSection number
uncompressed\_sample\_offsetnumberUncompressed sample offset
bufferbf\_readVoice packet buffer
is\_nlbooleanPacket was sent by the Neverlose
#### 🔗 struct \`bf\_read\`
NameTypeDescription
read\_bitsfunctionReads a number value from the buffer :read\_bits(num\_bits)
read\_coordfunctionReads a floating number value from the buffer :read\_coord() (4 bytes)
resetfunctionResets the pointer of the buffer to its original offset
cryptfunctionEncrypts/decrypts buffer :crypt(key)
#### 🔗 struct \`bf\_write\`
NameTypeDescription
write\_bitsfunctionWrites a number value to the buffer :write\_bits(value, num\_bits)
write\_coordfunctionWrites a floating number value to the buffer :write\_coord(value) (4 bytes)
is\_overflowedfunctionReturns true if the buffer is overflowed
cryptfunctionEncrypts/decrypts buffer :crypt(key)
> 📌 Firing this event from the Lua will send a voice packet > > \`events.voice\_message(function: buffer)\` \`\`\`lua events.voice\_message(function(ctx) local buffer = ctx.buffer local code = buffer:read\_bits(16) if code ~= 0x1337 then return end local tickcount = buffer:read\_bits(32) print(string.format( 'received voice packet from %s | pct\_tickcount: %d', ctx.entity:get\_name(), tickcount )) end) -- Note that you wont be able to receive your own voice packet -- unless voice\_loopback convar is set to 1 events.voice\_message:call(function(buffer) buffer:write\_bits(0x1337, 16) buffer:write\_bits(globals.tickcount, 32) end) \`\`\` > \`\[neverlose\] received voice packet from Salvatore | pct\_tickcount: 1200\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/events.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/math.md). # math ## Functions: ### abs \`math.abs(x: number):\` \`number\`
NameTypeDescription
xnumberNumber
Returns the absolute value of x. ### acos \`math.acos(x: number):\` \`number\`
NameTypeDescription
xnumberNumber
Returns the arc cosine of x (in radians). ### asin \`math.asin(x: number):\` \`number\`
NameTypeDescription
xnumberNumber
Returns the arc sine of x (in radians). ### atan \`math.atan(x: number):\` \`number\`
NameTypeDescription
xnumberNumber
Returns the arc tangent of x (in radians). ### atan2 \`math.atan2(x: number, y: number):\` \`number\`
NameTypeDescription
xnumberNumber
ynumberNumber
Returns the arc tangent of y/x (in radians), but uses the signs of both parameters to find the quadrant of the result. (It also handles correctly the case of x being zero.) ### ceil \`math.ceil(x: number):\` \`number\`
NameTypeDescription
xnumberNumber
Returns the smallest integer larger than or equal to x. ### clamp \`math.clamp(value: number\[, min: number, max: number\]):\` \`number\`
NameTypeDescription
valuenumberThe value to clamp
minnumberThe minimum value
maxnumberThe maximum value
Returns the clamped value. ### cos \`math.cos(x: number):\` \`number\`
NameTypeDescription
xnumberNumber
Returns the cosine of x (assumed to be in radians). ### cosh \`math.cosh(x: number):\` \`number\`
NameTypeDescription
xnumberNumber
Returns the hyperbolic cosine of x. ### deg \`math.deg(x: number):\` \`number\`
NameTypeDescription
xnumberNumber
Returns the angle x (given in radians) in degrees. ### exp \`math.exp(x: number):\` \`number\`
NameTypeDescription
xnumberNumber
Returns the value e power x. ### floor \`math.floor(x: number):\` \`number\`
NameTypeDescription
xnumberNumber
Returns the largest integer smaller than or equal to x. ### fmod \`math.fmod(x: number, y: number):\` \`number\`
NameTypeDescription
xnumberNumber
ynumberNumber
Returns the remainder of the division of x by y that rounds the quotient towards zero. ### frexp \`math.frexp(x: number):\` \`number\`, \`number\`
NameTypeDescription
xnumberNumber
$$ x = m2^e $$ 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).\ \ ### huge\ \ \`math.huge\` \`:\` \`number\`\ \ The value HUGE\\\_VAL, a value larger than or equal to any other numerical value.\ \ ### \*\*ldexp\*\*\ \ \`math.ldexp(x: number, e: number):\` \`number\`\ \
NameTypeDescription
xnumberNumber
enumberNumber
\ \ $$\ output = m2^e\ $$\ \ Returns \`m2e\` (e should be an integer).\ \ ### log\ \ \`math.log(x: number):\` \`number\`\ \
NameTypeDescription
xnumberNumber
\ \ Returns the natural logarithm of x.\ \ ### log10\ \ \`math.log10(x: number):\` \`number\`\ \
NameTypeDescription
xnumberNumber
\ \ Returns the base-10 logarithm of x.\ \ ### map\ \ \`math.map(value: number, in\_from: number, in\_to: number, out\_from: number, out\_to: number\[, should\_clamp: boolean\]):\` \`number\`\ \
NameTypeDescription
valuenumberThe value to map
in\_fromnumberIn minimum value
in\_tonumberIn maximum value
out\_fromnumberOut minimum value
out\_tonumberOut maximum value
should\_clampbooleanClamp In range
\ \ Linearly maps two number ranges and returns the mapped value.\ \ ### max\ \ \`math.max(x: number\[, ...\]):\` \`number\`\ \
NameTypeDescription
xnumberNumber
...Comma-separated numbers to concatenate with x
\ \ Returns the maximum value among its arguments.\ \ ### min\ \ \`math.min(x: number\[, ...\]):\` \`number\`\ \
NameTypeDescription
xnumberNumber
...Comma-separated numbers to concatenate with x
\ \ Returns the minimum value among its arguments.\ \ ### modf\ \ \`math.modf(x: number):\` \`number\`\ \
NameTypeDescription
xnumberNumber
\ \ Returns two numbers, the integral part of x and the fractional part of x.\ \ ### normalize\\\_yaw\ \ \`math.normalize\_yaw(x: number):\` \`number\`\ \
NameTypeDescription
xnumberNumber
\ \ Returns the normalized yaw angle value.\ \ ### pi\ \ \`math.pi\` \`:\` \`number\`\ \ The value of pi.\ \ ### pow\ \ \`math.pow(x: number, y: number):\` \`number\`\ \
NameTypeDescription
xnumberNumber
ynumberNumber
\ \ Returns x^y. (You can also use the expression x^y to compute this value.)\ \ ### rad\ \ \`math.rad(x: number):\` \`number\`\ \
NameTypeDescription
xnumberNumber
\ \ Returns the angle x (given in degrees) in radians.\ \ ### random\ \ \`math.random(\[m \[, n\]\]):\` \`number\`\ \
NameTypeDescription
mnumberNumber
nnumberNumber
\ \ 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\].\ \ ### randomseed\ \ \`math.randomseed(x: number):\` \`number\`\ \
NameTypeDescription
xnumberNumber
\ \ Sets x as the "seed" for the pseudo-random generator: equal seeds produce equal sequences of numbers.\ \ ### sin\ \ \`math.sin(x: number):\` \`number\`\ \
NameTypeDescription
xnumberNumber
\ \ Returns the sine of x (assumed to be in radians).\ \ ### sinh\ \ \`math.sinh(x: number):\` \`number\`\ \
NameTypeDescription
xnumberNumber
\ \ Returns the hyperbolic sine of x.\ \ ### sqrt\ \ \`math.sqrt(x: number):\` \`number\`\ \
NameTypeDescription
xnumberNumber
\ \ Returns the square root of x. (You can also use the expression x^0.5 to compute this value.)\ \ ### tan\ \ \`math.tan(x: number):\` \`number\`\ \
NameTypeDescription
xnumberNumber
\ \ Returns the tangent of x (assumed to be in radians).\ \ ### tanh\ \ \`math.tanh(x: number):\` \`number\`\ \
NameTypeDescription
xnumberNumber
\ \ Returns the hyperbolic tangent of x.\ \ \ ---\ \ # Agent Instructions\ This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.\ \ ## Querying This Documentation\ If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.\ \ Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter:\ \ \`\`\`\ GET https://docs-csgo.neverlose.cc/documentation/variables/math.md?ask=&goal=\ \`\`\`\ \ \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language.\ \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.\ \ The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.\ \ Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/db.md). # db ### Utilizing database \`db.key\_name:\` \`any\` \`db.key\_name = value\`
NameTypeDescription
key\_nameanyName of the key
valueanyValue the key should be set to. This can be anything that can be sanitized (no functions, userdata)
{% hint style="warning" %} Indexing database keys is a heavy process. Do not do it inside callbacks that are called a lot of times per second. {% endhint %} \`\`\`lua -- look up for database key named "test" -- returns the new table if database returned nil local data = db.test or { } data.name = 'Salvatore' data.project = 'Spirthack Innovations LLC' events.shutdown:set(function() -- replace "test" key with the new value db.test = data end) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/db.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/esp.md). # esp ## Example available! {% content-ref url="/pages/z7xi2JlDIiuW4Re07FT5" %} \[ESP\](/useful-information/script-examples/esp.md) {% endcontent-ref %} ## Class names Available ESP classes: \`enemy\`, \`team\`, \`self\` ## Functions: ### :new\\\_text \`esp.esp\_class:new\_text(name: string, preview: string, callback: function):\` \`ESPGroup\`
NameTypeDescription
namestringESP element picker text
previewstringESP preview text
callbackfunctionFunction that will be called for each entity while drawing the ESP
Registers ESP text to the specified class. The callback function is called every frame. It is passed an entity pointer. Return a string in order to manage the output. ### :new\\\_bar \`esp.esp\_class:new\_bar(name: string, callback: function):\` \`ESPGroup\`
NameTypeDescription
namestringESP element picker text
callbackfunctionFunction that will be called for each entity while drawing the ESP
Registers an ESP bar to the specified class. The callback function is called every frame. Access the entity pointer using the arguments of the specified callback. Return a boolean followed by the number in the range \\\[0.0, 1.0\]. ### :new\\\_item \`esp.esp\_class:new\_item(name: string):\` \`ESPGroup\`
NameTypeDescription
namestringESP element picker text
Registers an ESP item that is neither text nor a bar. #### 🔗 struct \`ESPGroup\`
NameTypeDescription
getfunctionReturns the value of the item.
setfunctionSets the value of the item.
namefunctionReturns the name of the item. If the argument is present, the name is set to the new value.
createfunctionAttaches a group to the current item.
--- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/esp.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/utils.md). # utils ## Functions: ### console\\\_exec \`utils.console\_exec(cmd: string\[, ...\])\`
NameTypeDescription
cmdstringThe console command(s) to execute
...Comma-separated arguments to concatenate with cmd
Executes a console command. Multiple commands can be combined with ';'. Be careful when passing user input (including usernames) to it. ### execute\\\_after \`utils.execute\_after(delay: number, callback: function\[, ...\])\`
NameTypeDescription
delaynumberTime in seconds to wait before calling callback
callbackfunctionThe Lua function that will be called after the delay
...Arguments that will be passed to the callback
Executes the callback after delay seconds, passing the arguments to it. ### net\\\_channel \`utils.net\_channel():\` \`NetChannel\` Returns the \[\`NetChannel\`\](#netchannel) struct. ### trace\\\_line {% embed url="" %} \`utils.trace\_line(from: vector, to: vector\[, skip: entity/table/function, mask: number, type: number\]):\` \`trace\`
NameTypeDescription
fromvectorVector to start tracing from
tovectorVector to trace to
skipentity, table, functionOptional. Entity skipping options
masknumberOptional. Trace mask
typenumberOptional. Trace type \[0-3\]
0: Trace everything \[Default\]
1: Trace world only
2: Trace entities only
3: Trace everything filter props
> 📌 The \`skip\` argument can either be an \`entity\` object, a table with \`entity\` objects, or a function, like the ShouldHitEntity callback. If you use it as a callback, you can access the \`entity\` and \`contents\_mask\` by adding them to the function arguments. Inside the callback, return true if tracing should not skip the entity, otherwise return false. Returns a \[\`trace\`\](#struct-trace) struct containing all the information. ### trace\\\_hull \`utils.trace\_hull(from: vector, to: vector, mins: vector, maxs: vector\[, skip: entity/table/function, mask: number, type: number\]):\` \`trace\`
NameTypeDescription
fromvectorVector to start tracing from
tovectorVector to trace to
minsvectorHull mins
maxsvectorHull maxs
skipentity, table, functionOptional. Entity skipping options
masknumberOptional. Trace mask
typenumberOptional. Trace type \[0-3\]
0: Trace everything \[Default\]
1: Trace world only
2: Trace entities only
3: Trace everything filter props
> 📌 The \`skip\` argument can either be an \`entity\` object, a table with \`entity\` objects, or a function, like the ShouldHitEntity callback. If you use it as a callback, you can access the \`entity\` and \`contents\_mask\` by adding them to the function arguments. Inside the callback, return true if tracing should not skip the entity, otherwise return false. Returns a \[\`trace\`\](#struct-trace) struct containing all the information. ### trace\\\_bullet \`utils.trace\_bullet(from\_entity: entity, from: vector, to: vector\[, skip: entity/table/function\]):\` \`number\`, \`trace\`
NameTypeDescription
from\_entityentityPlayer whose weapon will be used for this trace
fromvectorVector to start tracing from
tovectorVector to trace to
skipentity, table, functionOptional. Entity skipping options. If not passed, the skip entity will be from\_entity
> 📌 The \`skip\` argument can either be an \`entity\` object, a table with \`entity\` objects, or a function, like the ShouldHitEntity callback. If you use it as a callback, you can access the \`entity\` and \`contents\_mask\` by adding them to the function arguments. Inside the callback, return true if tracing should not skip the entity, otherwise return false. Returns the \`damage\`, \[\`trace\`\](#struct-trace) arguments. #### 🔗 struct \`trace\`
NameTypeDescription
start\_posvectorStart position
end\_posvectorFinal position
planetableSurface normal at impact. Contains normal, dist, type, and signbits values
fractionnumberPercentage in the range \[0.0, 1.0\]. How far the trace went before hitting something. 1.0 - didn't hit anything
contentsnumberContents on other side of surface hit
disp\_flagsnumberDisplacement flags for marking surfaces with data
all\_solidbooleanReturns true if the plane is invalid
start\_solidbooleanReturns true if the initial point was in a solid area
fraction\_left\_solidnumberPercentage in the range \[0.0, 1.0\]. How far the trace went before leaving solid. Only valid if we started in solid
surfacetableSurface hit (impact surface). Contains name, props, and flags values
hitgroupnumber0 - generic, non-zero is specific body part
physics\_bonenumberPhysics bone that was hit by the trace
world\_surface\_indexnumberIndex of the msurface2\_t, if applicable
entityentityEntity that was hit by the trace
hitboxnumberBox that was hit by the trace
did\_hitfunctionReturns true if there was any kind of impact at all
did\_hit\_worldfunctionReturns true if the entity points at the world entity
did\_hit\_non\_worldfunctionReturns true if the trace hit something and it wasn't the world
is\_visiblefunctionReturns true if the final position is visible
### opcode\\\_scan \`utils.opcode\_scan(module: string, signature: string\[, offset: number\]):\` \`userdata\`
NameTypeDescription
modulestringModule name, in which the signature will be scanned.
signaturestringIDA style signature, the wildcard is "?"
offsetnumberOptional offset to apply to the pointer address.
Returns a pointer to the specified pattern if it was found. Otherwise returns \`nil\`. ### create\\\_interface \`utils.create\_interface(module: string, interface: string):\` \`userdata\`
NameTypeDescription
modulestringModule name containing the interface.
interfacestringInterface name.
Returns a pointer to the specified interface if it was found. Otherwise returns \`nil\`. ### get\\\_netvar\\\_offset \`utils.get\_netvar\_offset(table: string, prop: string):\` \`number\`
NameTypeDescription
tablestringDatatable name
propstringProp name
Returns the offset of the specified prop. Can be used to manually navigate to the net prop. ### get\\\_vfunc \`utils.get\_vfunc(index: number, ...):\` \`function\`
NameTypeDescription
indexnumberVirtual table index of the function.
...FFI C Type definition.
Creates and returns a wrapper function that calls a virtual table function on the specified index. ### get\\\_vfunc \`utils.get\_vfunc(module: string, interface: string, index: number, ...):\` \`function\`
NameTypeDescription
modulestringModule name containing the interface.
interfacestringInterface name.
indexnumberVirtual table index of the function.
...FFI C Type definition.
Creates and returns a wrapper function that calls a virtual table function from the specified interface on the specified index. ### random\\\_int \`utils.random\_int(min: number, max: number):\` \`number\`
NameTypeDescription
minnumberMinimum boundary for the random value, included
maxnumberMaximum boundary for the random value, included
Returns a random integer value. ### random\\\_float \`utils.random\_float(min: number, max: number):\` \`number\`
NameTypeDescription
minnumberMinimum boundary for the random value, included
maxnumberMaximum boundary for the random value, included
Returns a random float value. ### random\\\_seed \`utils.random\_seed(seed: number)\`
NameTypeDescription
seednumberNew random seed value
Sets the new random seed. ## 🔗 \`NetChannel\` {% hint style="info" %} Access the struct via \[\`.net\_channel\`\](#net\_channel)function \* \`FLOW:\`\`OUTGOING\`\` \`\`= 0\` \* \`FLOW:\`\`INCOMING\`\` \`\`= 1\` {% endhint %} ### time \`net.time\` \`:\` \`number\` Current network time. ### time\\\_connected \`net.time\_connected\` \`:\` \`number\` Connection time in seconds. ### time\\\_since\\\_last\\\_received \`net.time\_since\_last\_received\` \`:\` \`number\` Time since last received packet in seconds. ### is\\\_loopback \`net.is\_loopback\` \`:\` \`boolean\` Returns \`true\` if server is a loopback (local server). ### is\\\_playback \`net.is\_playback\` \`:\` \`boolean\` Returns \`true\` if demo is being played. ### is\\\_timing\\\_out \`net.is\_timing\_out\` \`:\` \`boolean\` Returns \`true\` if client is timing out. ### sequence\\\_nr\\\[\`flow\`\] \`net.sequence\_nr\[0\]\` \`:\` \`number\`\\ \`net.sequence\_nr\[1\]\` \`:\` \`number\` Last sent sequence number. ### latency\\\[\`flow\`\] \`net.latency\[0\]\` \`:\` \`number\`\\ \`net.latency\[1\]\` \`:\` \`number\` Current latency (RTT), more accurate but jittering. ### avg\\\_latency\\\[\`flow\`\] \`net.avg\_latency\[0\]\` \`:\` \`number\`\\ \`net.avg\_latency\[1\]\` \`:\` \`number\` Average latency in seconds. ### loss\\\[\`flow\`\] \`net.loss\[0\]\` \`:\` \`number\`\\ \`net.loss\[1\]\` \`:\` \`number\` Percentage in the range \\\[0.0, 1.0\] of the current packet loss. ### choke\\\[\`flow\`\] \`net.choke\[0\]\` \`:\` \`number\`\\ \`net.choke\[1\]\` \`:\` \`number\` Percentage in the range \\\[0.0, 1.0\] of the current packet choke. ### packets\\\[\`flow\`\] \`net.packets\[0\]\` \`:\` \`number\`\\ \`net.packets\[1\]\` \`:\` \`number\` Average amount of packets/sec. ### data\\\[\`flow\`\] \`net.data\[0\]\` \`:\` \`number\`\\ \`net.data\[1\]\` \`:\` \`number\` Data flow in bytes/sec. ### total\\\_packets\\\[\`flow\`\] \`net.total\_packets\[0\]\` \`:\` \`number\`\\ \`net.total\_packets\[1\]\` \`:\` \`number\` Total amount of packets/sec. ### total\\\_data\\\[\`flow\`\] \`net.total\_data\[0\]\` \`:\` \`number\`\\ \`net.total\_data\[1\]\` \`:\` \`number\` Total data flow in bytes/sec. ### :get\\\_server\\\_info \`net:get\_server\_info():\` \`table\` Returns a table containing \`rate\`, \`name\`, \`address\`, \`frame\_time\`, and \`deviation\` (or nil on failure). ### :is\\\_valid\\\_packet \`net:is\_valid\_packet(flow: number, frame: number):\` \`number\`
NameTypeDescription
flownumberChannel (Flow)
framenumberSequence number
Returns \`true\` if the packet is valid. ### :get\\\_packet\\\_time \`net:get\_packet\_time(flow: number, frame: number):\` \`number\`
NameTypeDescription
flownumberChannel (Flow)
framenumberSequence number
Returns the time when the packet was sent. ### :get\\\_packet\\\_bytes \`net:get\_packet\_bytes(flow: number, frame: number, group: number):\` \`number\`
NameTypeDescription
flownumberChannel (Flow)
framenumberSequence number
groupnumberGroup of this packet
Returns the group size of this packet. ### :get\\\_packet\\\_response\\\_latency \`net:get\_packet\_response\_latency(flow: number, frame: number):\` \`number\`, \`number\`
NameTypeDescription
flownumberChannel (Flow)
framenumberSequence number
Returns \`latency\_msecs\`, \`choke\` of this packet. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/utils.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/json.md). # json ## Functions: ### parse \`json.parse(json\_text: string):\` \`any\` | Argument | Type | Description | | -------------- | ------------ | --------------- | | \*\*json\\\_text\*\* | \*\*\`string\`\*\* | UTF-8 JSON text | Will deserialize any UTF-8 JSON string into a Lua value or table. ### stringify \`json.stringify(value: any):\` \`string\` | Argument | Type | Description | | --------- | --------- | ------------------------------------------- | | \*\*value\*\* | \*\*\`any\`\*\* | A lua boolean, number, string, table or nil | Will serialize a Lua value into a string containing the JSON representation. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/json.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/bit.md). # bit ## Functions: ### arshift \`bit.arshift(x: number, n: number):\` \`number\`
NameTypeDescription
xnumberNumber
nnumberNumber of bits
Returns the bitwise arithmetic right-shift of its first argument by the number of bits given by the second argument. Arithmetic right-shift treats the most-significant bit as a sign bit and replicates it. Only the lower 5 bits of the shift count are used (reduces to the range \\\[0..31\]). ### band \`bit.band(x1: number, x2: number\[, ...\]):\` \`number\`
NameTypeDescription
x1numberNumber
x2numberNumber
...Number(s)
Returns the bitwise and of all of its arguments. Note that more than two arguments are allowed. ### bnot \`bit.bnot(x: number)\`: number
NameTypeDescription
xnumberNumber
Returns the bitwise not of its argument. ### bor \`bit.bor(x1: number, x2: number\[, ...\]):\` \`number\`
NameTypeDescription
x1numberNumber
x2numberNumber
...Number(s)
Returns the bitwise or of all of its arguments. Note that more than two arguments are allowed. ### bswap \`bit.bswap(x: number):\` number
NameTypeDescription
xnumberNumber
Swaps the bytes of its argument and returns it. This can be used to convert little-endian 32 bit numbers to big-endian 32 bit numbers or vice versa. ### bxor \`bit.bxor(x1: number, \[x2...\]: number):\` \`number\`
NameTypeDescription
x1numberNumber
\[x2...\]numberNumber(s)
Returns the bitwise xor of all of its arguments. Note that more than two arguments are allowed. ### lshift \`bit.lshift(x: number, n: number):\` \`number\`
NameTypeDescription
xnumberNumber
nnumberNumber of bits
Returns the bitwise logical left-shift of its first argument by the number of bits given by the second argument. Logical shifts treat the first argument as an unsigned number and shift in 0-bits. Only the lower 5 bits of the shift count are used (reduces to the range \\\[0..31\]). ### rol \`bit.rol(x: number, n: number):\` \`number\`
NameTypeDescription
xnumberNumber
nnumberNumber of bits
Returns the bitwise left rotation of its first argument by the number of bits given by the second argument. Bits shifted out on one side are shifted back in on the other side. Only the lower 5 bits of the rotate count are used (reduces to the range \\\[0..31\]). ### ror \`bit.ror(x: number, n: number):\` \`number\`
NameTypeDescription
xnumberNumber
nnumberNumber of bits
Returns the bitwise right rotation of its first argument by the number of bits given by the second argument. Bits shifted out on one side are shifted back in on the other side. Only the lower 5 bits of the rotate count are used (reduces to the range \\\[0..31\]). ### rshift \`bit.rshift(x: number, n: number):\` \`number\`
NameTypeDescription
xnumberNumber
nnumberNumber of bits
Returns the bitwise logical right-shift of its first argument by the number of bits given by the second argument. Logical shifts treat the first argument as an unsigned number and shift in 0-bits. Only the lower 5 bits of the shift count are used (reduces to the range \\\[0..31\]). ### tobit \`bit.tobit(x: number):\` \`number\`
NameTypeDescription
xnumberNumber to normalize
Normalizes a number to the numeric range for bit operations and returns it. This function is usually not needed since all bit operations already normalize all of their input arguments. ### tohex \`bit.tohex(x: number, n: number):\` \`number\`
NameTypeDescription
xnumberNumber to convert
nnumberNumber of hex digits to return
Converts its first argument to a hex string. The number of hex digits is given by the absolute value of the optional second argument. Positive numbers between 1 and 8 generate lowercase hex digits. Negative numbers generate uppercase hex digits. Only the least-significant 4\\\*|n| bits are used. The default is to generate 8 lowercase hex digits. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/bit.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/entity.md). # entity ## Functions: ### get \`entity.get(idx: number\[, by\_userid: boolean\]):\` \`entity\`
NameTypeDescription
idxnumberIndex of the entity
by\_useridbooleanIf true then idx will be perceived as a userid
Returns a pointer to the specified entity. ### get\\\_local\\\_player \`entity.get\_local\_player():\` \`entity\` Returns a pointer to the local player. ### get\\\_players \`entity.get\_players(\[enemies\_only: boolean, include\_dormant: boolean, callback: function\]):\`\`table\`
NameTypeDescription
enemies\_onlybooleanIf true then only enemies will be included
include\_dormantbooleanIf true then dormant players will be included
callbackfunctionA callback with an entity pointer as the argument
If the callback is nil, it returns the table of pointers to player entities. Otherwise the callback will be called. Access the player pointer using the arguments of the specified callback. ### get\\\_entities \`entity.get\_entities(\[class: number/string, include\_dormant: boolean, callback: function\]):\` \`table\`
NameTypeDescription
classnumber/stringEither a name or an ID of the needed class. Pass nil to get every entity.
include\_dormantbooleanIf true then dormant players will be included
callbackfunctionA callback with an entity pointer as the argument
If the callback is nil, it returns the table of pointers to entities. Otherwise the callback will be called. Access the entity pointer using the arguments of the specified callback. ### get\\\_threat \`entity.get\_threat(\[ hittable: boolean \]):\` \`entity\`
NameTypeDescription
hittablebooleanIf true then returns a pointer to the player that can hit you
Returns a pointer to the current threat. ### get\\\_game\\\_rules \`entity.get\_game\_rules():\` \`entity\` Returns the pointer to the CCSGameRulesProxy instance, or nil if none exists. ### get\\\_player\\\_resource \`entity.get\_player\_resource():\` \`entity\` Returns the pointer to the CCSPlayerResource instance, or nil if none exists. ## Netprops ### Getting FFI pointer \`ent\[0\]\` \`:\` \`userdata\` Returns the \`ffi\` pointer to the entity. ### Getting netprop values \`ent.prop\_name:\` \`any\` \`ent.prop\_name\[index\]:\` \`any\` \`ent\["prop\_name"\]:\` \`any\`
NameTypeDescription
prop\_namestringName of the networked property
indexnumberOptional. If prop\_name is an array, the value at this array index will be returned
\`\`\`lua local on\_createmove = function(cmd) local localplayer = entity.get\_local\_player() if localplayer == nil then return end -- example 1 local health = localplayer.m\_iHealth -- example 2 \[array netprops\] local pitch = localplayer.m\_flPoseParameter\[12\] -- example 3 local stamina = localplayer\['m\_flStamina'\] print(('my health is: %d | pitch: %.1f | stamina: %d%%'):format( health, pitch, 100 - (80 / 100 \* stamina) )) end events.createmove:set(on\_createmove) \`\`\` ### Setting netprop values \`ent.prop\_name = value\` \`ent.prop\_name\[index\] = value\` \`ent\["prop\_name"\] = value\`
NameTypeDescription
prop\_namestringName of the networked property
valueanyThe property will be set to this value
indexnumberOptional. If prop\_name is an array, the value at this array index will be set
\`\`\`lua for \_, player in ipairs(entity.get\_players(true)) do -- example 1 player.m\_bSpotted = true -- example 2 \[array netprops\] player.m\_flPoseParameter\[12\] = 0.5 -- example 3 player\['m\_nSkin'\] = 2 end \`\`\` ## Common ### :is\\\_player \`ent:is\_player():\` \`boolean\` Returns \`true\` if the entity is a player entity. ### :is\\\_weapon \`ent:is\_weapon():\` \`boolean\` Returns \`true\` if the entity is a weapon entity. ### :is\\\_dormant \`ent:is\_dormant():\` \`boolean\` Returns \`true\` if the entity is dormant. ### :is\\\_bot \`ent:is\_bot():\` \`boolean\` Returns \`true\` if the entity is a bot. ### :is\\\_alive \`ent:is\_alive():\` \`boolean\` Returns \`true\` if the entity is alive. ### :is\\\_enemy \`ent:is\_enemy():\` \`boolean\` Returns \`true\` if the entity is an enemy. ### :is\\\_visible \`ent:is\_visible():\` \`boolean\` Returns \`true\` if the entity is visible. ### :is\\\_occluded \`ent:is\_occluded(\[ to\_entity: entity \]):\` \`boolean\`
NameTypeDescription
to\_entityentityOptional. The entity that will be checked for occlusion
If the \`to\_entity\` is nil, the local player is checked. Returns \`true\` if the entity is completely occluded for the current entity. ### :get\\\_index \`ent:get\_index():\` \`number\` Returns the index of the entity. ### :get\\\_name \`ent:get\_name():\` \`string\` Returns the player name, weapon name or class name if the entity is neither of those. ### :get\\\_origin \`ent:get\_origin():\` \`vector\` Returns the position vector of the entity. ### :get\\\_angles \`ent:get\_angles():\` \`vector\` Returns the absolute angles of the entity. ### :get\\\_simulation\\\_time \`ent:get\_simulation\_time():\` \`table\` Returns a table containing \`current\` and \`old\` simulation time values. ### :get\\\_classname \`ent:get\_classname():\` \`string\` Returns the name of the entity's class. ### :get\\\_classid \`ent:get\_classid():\` \`number\` Returns the ID of the entity's class. ### :get\\\_materials \`ent:get\_materials():\` \`table\` Returns a table containing all materials used by the entity. ### :get\\\_model\\\_name \`ent:get\_model\_name():\` \`string\` Returns the model name of the entity. ## Players ### :get\\\_network\\\_state \`ent:get\_network\_state():\` \`number\` Returns the network state of the player.
IDDescription
0The entity is not dormant
1The entity is dormant but the cheat has 100% info where the player is
2The entity is dormant (updated by Shared ESP)
3The entity is dormant (updated by Sounds)
4The entity is dormant (not updated)
5The entity is dormant (data is unavailable or too old)
### :get\\\_bbox \`ent:get\_bbox():\` \`table\` Returns a table containing \`pos1\`, \`pos2\`, and \`alpha\` values. ### :get\\\_player\\\_info \`ent:get\_player\_info():\` \`table\` Returns a table containing information from the \`player\_info\_t\` structure of the entity. Table values: \`is\_hltv\`, \`is\_fake\_player\`, \`steamid\`, \`steamid64\`, \`userid\`, and \`files\_downloaded\` ### :get\\\_player\\\_weapon \`ent:get\_player\_weapon(\[all\_weapons: boolean\]):\` \`entity / table\`
NameTypeDescription
all\_weaponsbooleanIf true then all weapons will be included
Returns a pointer to the player's weapon entity. If \`all\_weapons\` is \`true\`, returns a table containing pointers to every weapon entity the player is currently carrying. ### :get\\\_anim\\\_state \`ent:get\_anim\_state():\` \`table\` Returns a table containing information about the animation state of the player.
🧷 Animation state keys \* \\\[number\] abs\\\_yaw \* \\\[number\] abs\\\_yaw\\\_last \* \\\[vector\] acceleration \* \\\[number\] acceleration\\\_weight \* \\\[number\] action\\\_weight\\\_bias\\\_remainder \* \\\[boolean\] adjust\\\_started \* \\\[number\] aim\\\_matrix\\\_transition \* \\\[number\] aim\\\_matrix\\\_transition\\\_delay \* \\\[number\] aim\\\_pitch\\\_max \* \\\[number\] aim\\\_pitch\\\_min \* \\\[number\] aim\\\_yaw\\\_max \* \\\[number\] aim\\\_yaw\\\_min \* \\\[number\] anim\\\_duck\\\_amount \* \\\[number\] animstate\\\_model\\\_version \* \\\[number\] cached\\\_model\\\_index \* \\\[number\] camera\\\_smooth\\\_height \* \\\[userdata\] crouch\\\_walk\\\_aim \* \\\[boolean\] defuse\\\_started \* \\\[number\] duck\\\_additional \* \\\[number\] duration\\\_in\\\_air \* \\\[number\] duration\\\_move\\\_weight\\\_is\\\_too\\\_high \* \\\[number\] duration\\\_moving \* \\\[number\] duration\\\_still \* \\\[number\] duration\\\_strafing \* \\\[number\] eye\\\_pitch \* \\\[number\] eye\\\_position\\\_smooth\\\_lerp \* \\\[number\] eye\\\_yaw \* \\\[boolean\] feet\\\_crossed \* \\\[boolean\] first\\\_foot\\\_plant\\\_since\\\_init \* \\\[boolean\] first\\\_run\\\_since\\\_init \* \\\[boolean\] flashed \* \\\[userdata\] foot\\\_left \* \\\[number\] foot\\\_lerp \* \\\[userdata\] foot\\\_right \* \\\[number\] in\\\_air\\\_smooth\\\_value \* \\\[number\] jump\\\_to\\\_fall \* \\\[number\] ladder\\\_speed \* \\\[number\] ladder\\\_weight \* \\\[number\] land\\\_anim\\\_multiplier \* \\\[boolean\] landed\\\_on\\\_ground\\\_this\\\_frame \* \\\[boolean\] landing \* \\\[number\] last\\\_foot\\\_plant\\\_update \* \\\[number\] last\\\_rendered\\\_eye\\\_z \* \\\[number\] last\\\_time\\\_velocity\\\_over\\\_ten \* \\\[number\] last\\\_update\\\_frame \* \\\[number\] last\\\_update\\\_increment \* \\\[number\] last\\\_update\\\_time \* \\\[number\] last\\\_velocity\\\_test\\\_time \* \\\[userdata\] layer\\\_order\\\_preset \* \\\[number\] left\\\_ground\\\_height \* \\\[boolean\] left\\\_the\\\_ground\\\_this\\\_frame \* \\\[number\] move\\\_weight \* \\\[number\] move\\\_weight\\\_smoothed \* \\\[number\] move\\\_yaw \* \\\[number\] move\\\_yaw\\\_current\\\_to\\\_ideal \* \\\[number\] move\\\_yaw\\\_ideal \* \\\[number\] next\\\_twitch\\\_time \* \\\[boolean\] on\\\_ground \* \\\[boolean\] on\\\_ladder \* \\\[boolean\] plant\\\_anim\\\_started \* \\\[entity\] player \* \\\[boolean\] player\\\_is\\\_accelerating \* \\\[userdata\] pose\\\_param\\\_mappings \* \\\[vector\] position\\\_current \* \\\[vector\] position\\\_last \* \\\[number\] previous\\\_move\\\_state \* \\\[number\] primary\\\_cycle \* \\\[number\] recrouch\\\_weight \* \\\[boolean\] smooth\\\_height\\\_valid \* \\\[number\] speed\\\_as\\\_portion\\\_of\\\_crouch\\\_top\\\_speed \* \\\[number\] speed\\\_as\\\_portion\\\_of\\\_run\\\_top\\\_speed \* \\\[number\] speed\\\_as\\\_portion\\\_of\\\_walk\\\_top\\\_speed \* \\\[userdata\] stand\\\_run\\\_aim \* \\\[userdata\] stand\\\_walk\\\_aim \* \\\[number\] static\\\_approach\\\_speed \* \\\[number\] step\\\_height\\\_left \* \\\[number\] step\\\_height\\\_right \* \\\[number\] strafe\\\_change\\\_cycle \* \\\[number\] strafe\\\_change\\\_target\\\_weight \* \\\[number\] strafe\\\_change\\\_weight \* \\\[number\] strafe\\\_change\\\_weight\\\_smooth\\\_fall\\\_off \* \\\[boolean\] strafe\\\_changing \* \\\[number\] strafe\\\_sequence \* \\\[number\] stutter\\\_step \* \\\[vector\] target\\\_acceleration \* \\\[number\] time\\\_of\\\_last\\\_known\\\_injury \* \\\[number\] time\\\_to\\\_align\\\_lower\\\_body \* \\\[boolean\] twitch\\\_anim\\\_started \* \\\[vector\] velocity \* \\\[vector\] velocity\\\_last \* \\\[number\] velocity\\\_length\\\_xy \* \\\[number\] velocity\\\_length\\\_z \* \\\[vector\] velocity\\\_normalized \* \\\[vector\] velocity\\\_normalized\\\_non\\\_zero \* \\\[number\] walk\\\_run\\\_transition \* \\\[boolean\] walk\\\_to\\\_run\\\_transition\\\_state \* \\\[entity\] weapon \* \\\[entity\] weapon\\\_last \* \\\[entity\] weapon\\\_last\\\_bone\\\_setup
### :get\\\_anim\\\_overlay \`ent:get\_anim\_overlay(\[idx: number\]):\` \`table\`
NameTypeDescription
idxnumberIndex of the animation layer
Returns a table containing information about the specified animation layer. Pass \`nil\` to get every animation layer.
🧷 Animation overlay keys \* \\\[number\] activity \* \\\[number\] cycle \* \\\[number\] dispatched\\\_dst \* \\\[number\] dispatched\\\_src \* \\\[userdata\] dispatched\\\_studio\\\_hdr \* \\\[number\] invalidate\\\_physics\\\_bits \* \\\[number\] layer\\\_animtime \* \\\[number\] layer\\\_fade\\\_outtime \* \\\[number\] order \* \\\[entity\] owner \* \\\[number\] playback\\\_rate \* \\\[number\] prev\\\_cycle \* \\\[number\] sequence \* \\\[number\] weight \* \\\[number\] weight\\\_delta\\\_rate
### :get\\\_eye\\\_position \`ent:get\_eye\_position():\` \`vector\` Returns the eye position of the player. ### :get\\\_bone\\\_position \`ent:get\_bone\_position(idx: number):\` \`vector\`
NameTypeDescription
idxnumberIndex of the bone
Returns the position of the specified bone. ### :get\\\_hitbox\\\_position \`ent:get\_hitbox\_position(idx: number):\` \`vector\`
NameTypeDescription
idxnumberIndex of the hitbox
Returns the position of the specified hitbox. ### :get\\\_steam\\\_avatar \`ent:get\_steam\_avatar():\` \`ImgObject\` Returns a pointer to the Steam avatar image object of the specified entity. ### :get\\\_xuid \`ent:get\_xuid():\` \`string\` Returns the Steam ID of the player. ### :get\\\_resource \`ent:get\_resource():\` \`entity\` Returns the pointer to the CCSPlayerResource instance attached to the player, or nil if none exists. ### :get\\\_spectators \`ent:get\_spectators():\` \`table\` Returns a table of pointers to the players that are currently spectating the specified player. ### :set\\\_icon \`ent:set\_icon(\[icon: string\])\`
NameTypeDescription
iconstringOptional. URL to the icon or a panorama path.
Sets an icon in the scoreboard next to the specified player's avatar. The icon will be removed if no icon was provided. ### :simulate\\\_movement \`ent:simulate\_movement(\[origin: vector, velocity: vector, flags: number\]):\` \`sim\_ctx\`
NameTypeDescription
originvectorSpecifies the origin from which the movement should be simulated. If not provided, it uses the player's current origin.
velocityvectorSpecifies the velocity vector for the simulated movement. If not provided, the function will use the player's current velocity as the default for the simulation.
flagsnumberSpecifies the m\_fFlags 32-bit mask for prediction. If not provided, it uses the player's current m\_fFlags value.
This function allows you to simulate players' movement by optionally providing an origin, velocity, and flags. Returns an instance of the \`sim\_ctx\` class containing details and tools for the movement simulation. ## Simulation Context {% hint style="info" %} This class encapsulates the context and results of a movement simulation initiated by \`:simmulate\_movement\`. {% endhint %} ### :think \`sim:think(\[ticks: number\])\` Simulates the player's movement for a specified number of ticks. If not specified, it defaults to simulating for 1 tick.
NameTypeDescription
originvectorPosition of the player after simulation.
velocityvectorVelocity of the player after simulation.
view\_offsetnumberZ axis view offset. Used to calculate the eye position.
duck\_amountnumberm\_flDuckAmount value of the player after simulation.
did\_hit\_collisionbooleanFlags whether the player hit a collision during the simulation.
obb\_minsvectorPlayer's bounding box's minimum points.
obb\_maxsvectorPlayer's bounding box's maximum points.
movevector
simulation\_ticksnumberThe number of ticks over which the simulation was conducted.
gravity\_per\_applynumberIndicates the applied gravitational force during the simulation.
original\_max\_speednumberThe player's maximum speed before the simulation.
max\_speednumberThe maximum speed achieved by the player during the simulation.
is\_speed\_croppedboolean
velocity\_modifiernumberm\_flVelocityModifier value of the player after simulation.
duck\_speednumberThe simulated speed at which the player can be crouching.
staminanumberm\_flStaminavalue of the player after simulation.
surface\_frictionnumberm\_surfaceFriction value of the player after simulation.
tracetracePost-simulation trace object.
## Weapons {% hint style="info" %} Access functions listed below via \[\`:get\_player\_weapon\`\](#get\_player\_weapon) function {% endhint %} ### :get\\\_weapon\\\_index \`ent:get\_weapon\_index():\` \`number\` Returns the index of the weapon. ### :get\\\_weapon\\\_icon \`ent:get\_weapon\_icon():\` \`ImgObject\` Returns the icon of the weapon. ### :get\\\_weapon\\\_info \`ent:get\_weapon\_info():\` \`userdata\` Returns a pointer to the \`CCSWeaponInfo\` struct of the weapon.
🧷 Weapon Info keys \* \\\[number\] max\\\_player\\\_speed \* \\\[number\] max\\\_player\\\_speed\\\_alt \* \\\[number\] attack\\\_move\\\_speed\\\_factor \* \\\[number\] spread \* \\\[number\] spread\\\_alt \* \\\[number\] inaccuracy\\\_crouch \* \\\[number\] inaccuracy\\\_crouch\\\_alt \* \\\[number\] inaccuracy\\\_stand \* \\\[number\] inaccuracy\\\_stand\\\_alt \* \\\[number\] inaccuracy\\\_jump\\\_initial \* \\\[number\] inaccuracy\\\_jump\\\_apex \* \\\[number\] inaccuracy\\\_jump \* \\\[number\] inaccuracy\\\_jump\\\_alt \* \\\[number\] inaccuracy\\\_land \* \\\[number\] inaccuracy\\\_land\\\_alt \* \\\[number\] inaccuracy\\\_ladder \* \\\[number\] inaccuracy\\\_ladder\\\_alt \* \\\[number\] inaccuracy\\\_fire \* \\\[number\] inaccuracy\\\_fire\\\_alt \* \\\[number\] inaccuracy\\\_move \* \\\[number\] inaccuracy\\\_move\\\_alt \* \\\[number\] inaccuracy\\\_reload \* \\\[number\] recoil\\\_seed \* \\\[number\] recoil\\\_angle \* \\\[number\] recoil\\\_angle\\\_alt \* \\\[number\] recoil\\\_angle\\\_variance \* \\\[number\] recoil\\\_angle\\\_variance\\\_alt \* \\\[number\] recoil\\\_magnitude \* \\\[number\] recoil\\\_magnitude\\\_alt \* \\\[number\] recoil\\\_magnitude\\\_variance\\\_alt \* \\\[number\] spread\\\_seed \* \\\[number\] recovery\\\_time\\\_crouch \* \\\[number\] recovery\\\_time\\\_stand \* \\\[number\] recovery\\\_time\\\_crouch\\\_final \* \\\[number\] recovery\\\_time\\\_stand\\\_final \* \\\[number\] recovery\\\_transition\\\_start\\\_bullet \* \\\[number\] recovery\\\_transition\\\_end\\\_bullet \* \\\[boolean\] unzoom\\\_after\\\_shot \* \\\[boolean\] hide\\\_view\\\_model\\\_zoomed \* \\\[number\] zoom\\\_level \* \\\[userdata\] zoom\\\_fov \* \\\[userdata\] zoom\\\_time \* \\\[string\] weapon\\\_class \* \\\[boolean\] has\\\_burst\\\_mode \* \\\[boolean\] is\\\_revolver \* \\\[number\] recoil\\\_magnitude\\\_variance \* \\\[string\] weapon\\\_name \* \\\[number\] weapon\\\_type \* \\\[number\] weapon\\\_price \* \\\[string\] console\\\_name \* \\\[number\] max\\\_clip1 \* \\\[number\] max\\\_clip2 \* \\\[string\] world\\\_model \* \\\[string\] view\\\_model \* \\\[string\] dropped\\\_model \* \\\[string\] hud\\\_name \* \\\[number\] kill\\\_award \* \\\[number\] cycle\\\_time \* \\\[number\] cycle\\\_time\\\_alt \* \\\[number\] time\\\_to\\\_idle \* \\\[boolean\] full\\\_auto \* \\\[number\] damage \* \\\[number\] headshot\\\_multiplier \* \\\[number\] armor\\\_ratio \* \\\[number\] bullets \* \\\[number\] penetration \* \\\[number\] range \* \\\[number\] range\\\_modifier \* \\\[number\] throw\\\_velocity \* \\\[boolean\] has\\\_silencer
### :get\\\_weapon\\\_owner \`ent:get\_weapon\_owner():\` \`entity\` Returns a pointer to the weapon owner's entity. ### :get\\\_weapon\\\_reload \`ent:get\_weapon\_reload():\` \`number\` Returns the weapon reload percentage (0.0-1.0), -1 if not reloading. ### :get\\\_max\\\_speed \`ent:get\_max\_speed():\` \`number\` Returns the maximum speed the player can move with the weapon. ### :get\\\_spread \`ent:get\_spread():\` \`number\` Returns the spread of the weapon in radians. ### :get\\\_inaccuracy \`ent:get\_inaccuracy():\` \`number\` Returns the inaccuracy of the weapon in radians. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/entity.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/files.md). # files ## Example available! {% content-ref url="/pages/H5xK7zW7ItbXSGBNCSGj" %} \[Broken mention\](broken://pages/H5xK7zW7ItbXSGBNCSGj) {% endcontent-ref %} ## Functions: ### create\\\_folder \`files.create\_folder(path: string)\`
NameTypeDescription
pathstringNew folder path
### read \`files.read(path: string):\` \`any\`
NameTypeDescription
pathstringPath to the file
Returns contents of the specified file. ### write \`files.write(path: string, contents: string\[, is\_binary: boolean\]):\` \`boolean\`
NameTypeDescription
pathstringPath to the file
contentsanyContents the file should be set to
is\_binarybooleanIs contents a binary
Replaces contents of the specified file. Returns \`false\` on failure. ### get\\\_crc32 \`files.get\_crc32(path: string):\` \`number\`
NameTypeDescription
pathstringPath to the file
Returns the crc32 checksum of the file. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/files.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/events.md). # events ## Functions: {% hint style="info" %} Available cheat events can be found \[here\](/documentation/events.md). {% endhint %} ### :set \`events.event\_name:set(callback: function)\`
NameTypeDescription
callbackfunctionLua function to call
Sets the callback for the specified event. The registered function will be called every time the specified event occurs. ### :unset \`events.event\_name:unset(callback: function)\`
NameTypeDescription
callbackfunctionLua function that was passed to the :set function
Unsets the callback that was set via the \`:set\` function from the specified event. ### :call \`events.event\_name:call(...)\`
NameTypeDescription
...Arguments to be passed by the callback
Fires the specified event. ### Alternative behavior: ### :\\\_\\\_call \`events.event\_name(callback: function\[, state: boolean\])\`
NameTypeDescription
callbackfunctionLua function to call
statebooleanOptional. Callback state. If not specified then toggles the callback state for the specified function.
Sets / unsets the callback for the specified event. {% tabs %} {% tab title="Toggle Behavior" %} {% code overflow="wrap" lineNumbers="true" %} \`\`\`lua local function function\_callback() print(globals.tickcount) end -- Sets the createmove callback for the specified function events.createmove(function\_callback) -- Execute after 0.5 secs utils.execute\_after(0.5, function() -- Toggles the createmove callback for the specified function events.createmove(function\_callback) end) \`\`\` {% endcode %} {% endtab %} {% tab title="State Behavior" %} {% code overflow="wrap" lineNumbers="true" %} \`\`\`lua local function function\_callback() print(globals.tickcount) end events.createmove(function\_callback, true) -- Sets the callback events.createmove(function\_callback, false) -- Unsets the callback \`\`\` {% endcode %} {% endtab %} {% endtabs %} --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/events.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/globals.md). # globals ## Variables: ### curtime \`globals.curtime\` \`:\` \`number\` Server time in seconds. ### realtime \`globals.realtime\` \`:\` \`number\` Local time in seconds. ### frametime \`globals.frametime\` \`:\` \`number\` Duration of the last game frame in seconds. ### framecount \`globals.framecount\` \`:\` \`number\` Amount of frames since the game started. ### absoluteframetime \`globals.absoluteframetime\` \`:\` \`number\` Duration of the last game frame in seconds. ### tickcount \`globals.tickcount\` \`:\` \`number\` Number of ticks elapsed on the server. ### tickinterval \`globals.tickinterval\` \`:\` \`number\` Duration of a tick in seconds. ### max\\\_players \`globals.max\_players\` \`:\` \`number\` Maximum number of players on the server. ### is\\\_connected \`globals.is\_connected\` \`:\` \`boolean\` Returns \`true\` if the player is connected, but not necessarily active in game (could still be loading). ### is\\\_in\\\_game \`globals.is\_in\_game\` \`:\` \`boolean\` Returns \`true\` if the player is currently connected to a game server. ### choked\\\_commands \`globals.choked\_commands\` \`:\` \`number\` Number of choked commands. ### commandack \`globals.commandack\` \`:\` \`number\` Current command number acknowledged by server. ### commandack\\\_prev \`globals.commandack\_prev\` \`:\` \`number\` Sequence number of last outgoing command. ### last\\\_outgoing\\\_command \`globals.last\_outgoing\_command\` \`:\` \`number\` Number of last command sequence number acknowledged by server. ### server\\\_tick \`globals.server\_tick\` \`:\` \`number\` Last-received tick from the server. ### client\\\_tick \`globals.client\_tick\` \`:\` \`number\` The client's own tick count. ### delta\\\_tick \`globals.delta\_tick\` \`:\` \`number\` Last-valid received snapshot (server) tick. ### clock\\\_offset \`globals.clock\_offset\` \`:\` \`number\` Difference between the server and client tick counts, used to predict the current server tick count. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/globals.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/ui.md). # ui ## Example available! {% content-ref url="/pages/ngLNzKOcgz2hb1UIyqdj" %} \[UI\](/useful-information/script-examples/ui.md) {% endcontent-ref %} ## Functions: ### get\\\_alpha \`ui.get\_alpha():\` \`number\` Returns the menu opacity as a unit interval (value in the range \\\[0, 1\]). ### get\\\_size \`ui.get\_size():\` \`vector\` Returns the current menu size. ### get\\\_position \`ui.get\_position():\` \`vector\` Returns the current menu position. ### get\\\_mouse\\\_position \`ui.get\_mouse\_position():\` \`vector\` Returns the current mouse position. ### get\\\_binds \`ui.get\_binds():\` \`table\` Returns a table of pointers to hotkeys. #### struct \`Hotkey\`
NameTypeDescription
namestringHotkey name
modenumberHotkey mode (1: Hold, 2: Toggle)
valueanyHotkey value
activebooleanHotkey state
referenceMenuItemPointer to the menu item
### get\\\_style \`ui.get\_style(\[ name: string \]):\` \`color\` / \`table\` Returns the color of the Style Option. Pass \`nil\` to return a table with the style options. ### get\\\_icon \`ui.get\_icon(name: string):\` \`string\` Returns the unicode converted string corresponding the fontawesome icon. ### create {% tabs %} {% tab title="Group" %} \`ui.create(group: string):\` \`MenuGroup\`
NameTypeDescription
groupstringGroup name
\\ Creates and returns a menu group object.
{% endtab %} {% tab title="Tab" %} \`ui.create(tab: string, group: string\[, column: number\]):\` \`MenuGroup\`
NameTypeDescription
tabstringTab name
groupstringGroup name
columnnumberOptional. Column ID (1: Left 2: Right or nil for automatic alignment.)
\\ Creates and returns a menu group object.
{% endtab %} {% endtabs %} ### find {% tabs %} {% tab title="Item example" %} \`ui.find(category: string, tab: string, group: string, item: string):\` \`MenuItem\`
NameTypeDescription
categorystringCategory name, e.g. "Aimbot" or "Visuals".
tabstringTab name that belongs to the category.
groupstringName of group with the item.
itemstringThe needed item.
Returns the \`MenuItem\` object that corresponds to the specified path. \`ui.find(category: string, tab: string, sub\_tab: string, group: string, item: string):\` \`MenuItem\`
NameTypeDescription
categorystringCategory name, e.g. "Aimbot" or "Visuals".
tabstringTab name that belongs to the category.
sub\_tabstringSub-tab name.
groupstringName of group with the item.
itemstringThe needed item.
Returns the \`MenuItem\` object that corresponds to the specified path. {% endtab %} {% tab title="Sub-item example" %} \`ui.find(category: string, tab: string, group: string, item: string, sub\_item):\` \`MenuItem\`
NameTypeDescription
categorystringCategory name, e.g. "Aimbot" or "Visuals".
tabstringTab name that belongs to the category.
groupstringName of group with the item.
itemstringThe item with a group (gear) attached.
sub\_itemstringThe sub-item in the item group.
Returns the \`MenuItem\` object that corresponds to the specified path. \`ui.find(category: string, tab: string, sub\_tab: string, group: string, item: string, sub\_item):\` \`MenuItem\`
NameTypeDescription
categorystringCategory name, e.g. "Aimbot" or "Visuals".
tabstringTab name that belongs to the category.
sub\_tabstringSub-tab name.
groupstringName of group with the item.
itemstringThe item with a group (gear) attached.
sub\_itemstringThe sub-item in the item group.
Returns the \`MenuItem\` object that corresponds to the specified path. {% endtab %} {% tab title="Group example" %} \`ui.find(category: string, tab: string, group: string):\` \`MenuGroup\`
NameTypeDescription
categorystringCategory name, e.g. "Aimbot" or "Visuals".
tabstringTab name that belongs to the category.
groupstringName of the needed group.
Returns the \`MenuGroup\` object that corresponds to the specified path. \`ui.find(category: string, tab: string, sub\_tab\_name: string, group: string):\` \`MenuGroup\`
NameTypeDescription
categorystringCategory name, e.g. "Aimbot" or "Visuals".
tabstringTab name that belongs to the category.
sub\_tabstringSub-tab name.
groupstringName of the needed group.
{% endtab %} {% tab title="Global item example " %} \`ui.find(group\_name: string, item\_name: string):\` \`MenuItem\`
NameTypeDescription
group\_namestringGlobal group name, e.g. "Settings".
item\_namestringItem name, e.g. "Dpi Scale".
Returns the \`MenuItem\` object that corresponds to the specified path. {% endtab %} {% tab title="ESP Item Example" %} \`ui.find(category: string, tab: string, sub\_tab: string, group: string, item\_category: string, item: string):\` \`ESPGroup\`
NameTypeDescription
categorystring
tabstring
sub\_tabstring
groupstring
item\_categorystring
itemstring
Returns the \`ESPGroup\` object that corresponds to the specified path. {% endtab %} {% endtabs %} This can return multiple items or \`nil\` on failure. ### sidebar {% embed url="" %} \`ui.sidebar(\[name: string, icon\_name: string\]):\` \`string\`, \`string\`
NameTypeDescription
namestringOptional. Sidebar tab name
icon\_namestringOptional. Icon name (Brand icons are currently not supported)
Gets or sets the sidebar tab name and an icon. ### localize \`ui.localize(lang: string, str: string\[, localized: string\]):\` \`string\` / \`nil\`
NameTypeDescription
langstringLanguage code.
strstringString to localize or to get the localized string from.
localizedstringOptional. The localized variant.
Returns the localized string for the specified language code. If \`localized\` is present, the \`str\` will be localized accordingly. ## 🔗 \`MenuGroup\` ### :switch \`group:switch(name: string\[, init: boolean\]):\` \`MenuItem\`
NameTypeDescription
namestringItem name
initbooleanDefault value
Creates and returns a menu item object, or throws an error on failure. ### :slider \`group:slider(name: string, min: number, max: number\[, init: number, scale: number, tooltip: function\]):\` \`MenuItem\`
NameTypeDescription
namestringItem name
minnumberMinimum allowed value
maxnumberMaximum allowed value
initnumberDefault value
scalenumberDisplay value multiplier. Can be used for decimal places.
tooltipstring / functionA string appends itself to the display value. A function allows you to access the raw display value and displays anything it returns.
Creates and returns a menu item object, or throws an error on failure. ### :combo \`group:combo(name: string, items: any\[, ...\]):\` \`MenuItem\`
NameTypeDescription
namestringItem name
itemsanyOne or more comma separated values that will be added to the combo. Alternatively, a table of strings that will be added
...
Creates and returns a menu item object, or throws an error on failure. ### :selectable \`group:selectable(name: string, items: any\[, ...\]):\` \`MenuItem\`
NameTypeDescription
namestringItem name
itemsanyOne or more comma separated values that will be added to the combo. Alternatively, a table of strings that will be added
...
Creates and returns a menu item object, or throws an error on failure. ### :color\\\_picker {% tabs %} {% tab title="Simple" %} \`group:color\_picker(name: string\[, color: color\]):\` \`MenuItem\`
NameTypeDescription
namestringItem name
colorcolorOptional. Initial color value
{% endtab %} {% tab title="Multi-Color " %} \`group:color\_picker(name: string, colors: table):\` \`MenuItem\`
NameTypeDescription
namestringItem name
colorstableTable containing tables with a string index, and those tables should contain one or multiple color objects. Check UI examples.
{% endtab %} {% endtabs %} Creates and returns a menu item object, or throws an error on failure. ### :button \`group:button(name: string\[, callback: function, alt\_style: boolean\]):\` \`MenuItem\`
NameTypeDescription
namestringItem name
callbackfunctionOptional. Function that will be called when the button is clicked
alt\_stylebooleanOptional. Pass true to enable the alternative style for the specified button
Creates and returns a menu item object, or throws an error on failure. ### :hotkey {% embed url="" %} \`group:hotkey(name: string\[, default\_key: number):\` \`MenuItem\`\ \
NameTypeDescription
namestringItem name
default\_keynumberOptional. Default key
\ \ Creates and returns a menu item object, or throws an error on failure.\ \ ### :input\ \ \`group:input(name: string\[, text: string\]):\` \`MenuItem\`\ \
NameTypeDescription
namestringItem name
textstringOptional. Default value
\ \ Creates and returns a menu item object, or throws an error on failure.\ \ ### :list\ \ \`group:list(name: string, items: any\[, ...\]):\` \`MenuItem\`\ \
NameTypeDescription
namestringItem name
itemsanyOne or more comma separated values that will be added to the combo. Alternatively, a table of strings that will be added
...
\ \ Creates and returns a menu item object, or throws an error on failure.\ \ ### :listable \ \ \`group:listable(name: string, items: any\[, ...\]):\` \`MenuItem\`\ \
NameTypeDescription
namestringItem name
itemsanyOne or more comma separated values that will be added to the combo. Alternatively, a table of strings that will be added
...
\ \ Creates and returns a menu item object, or throws an error on failure.\ \ ### :label\ \ \`group:label(text: string):\` \`MenuItem\`\ \
NameTypeDescription
textstringLabel text
\ \ Creates and returns a menu item object, or throws an error on failure.\ \ ### :texture\ \ 📌 Create the texture via the \[\`:load\_image\`\](https://docs-csgo.neverlose.cc/documentation/variables/pages/nxusgjs91kVUpigQuS6d#render.line-7) function.\ \ \`group:texture(texture: ImgObject\[, size: vector, color: color, mode: string, rounding: number\]):\` \`MenuItem\`\ \
NameTypeDescription
textureImgObjectImage object
sizevectorOptional. Size of the image
colorcolorOptional. Color of the texture
modestringOptional. f for fill, r for repeat
roundingnumberOptional. Image border rounding
\ \ Creates and returns a menu item object, or throws an error on failure.\ \ ## 🔗 \`MenuItem\`\ \ ### :get\ \ \`item:get():\` \`any\`\ \ Returns the value of the menu item.\ \ ### :id\ \ \`item:id():\` \`number\`\ \ Returns the unique id of the menu item.\ \ ### :list\ \ \`item:list():\` \`table\`\ \ Returns the list of items. \`combo\` / \`selectable\` menu item objects only.\ \ ### :type\ \ \`item:type():\` \`string\`\ \ Returns the type of the menu item.\ \ ### :override\ \ \`item:override(value: any\[, ...\])\`\ \
NameTypeDescription
valueanyThe value to which the menu item will be set
...
\ \ Overrides the item value without changing the menu / config values. If the \`value\` argument is \`nil\` or missing, the override is undone.\ \ ### :get\\\_override\ \ \`item:get\_override():\` \`any\`\ \ Returns the value of the menu item it's overriden to.\ \ ### :update\ \ \`item:update(...)\`\ \
NameTypeDescription
...any
\ \ Updates the values of the menu item.\ \ ### :reset\ \ \`item:reset()\`\ \ Resets the menu item to it's original value.\ \ ### :set\ \ \`item:set(value: any\[, ...\])\`\ \
NameTypeDescription
valueanyThe value to which the menu item will be set
...
\ \ Sets the value of the menu item.\ \ ### :name\ \ \`item:name(\[value: any\])\`\ \
NameTypeDescription
valueanyNew name
\ \ Gets or sets the name of the menu item.\ \ ### :tooltip\ \ \`item:tooltip(\[value: any\])\`\ \
NameTypeDescription
valueanyNew tooltip text
\ \ Gets or sets the tooltip of the menu item (depending on the presence of the \`value\` parameter).\ \ ### :visibility\ \ \`item:visibility(\[state: boolean\])\`\ \
NameTypeDescription
statebooleanNew visibility state
\ \ Gets or sets the menu item visibility depending on the value of \`state\`.\ \ ### :disabled\ \ \`item:disabled(\[state: boolean\])\`\ \
NameTypeDescription
statebooleanNew disabled state
\ \ Gets or sets the menu item disabled state depending on the value of \`state\`.\ \ ### :set\\\_callback\ \ \`item:set\_callback(callback: function\[, force\_call: boolean\])\`\ \
NameTypeDescription
callbackfunctionFunction that will be called when the menu item is interacted with
force\_callbooleanPass true to call the callback function after setup
\ \ Sets the callback to the specified menu item.\ \ ### :unset\\\_callback\ \ \`item:unset\_callback(callback: function)\`\ \
NameTypeDescription
callbackfunctionLua function that was passed to the :set\_callback function
\ \ Unsets the callback that was set via the \`:set\_callback\` function.\ \ ### :color\\\_picker \ \ {% tabs %}\ {% tab title="Simple" %}\ \`item:color\_picker(\[color: color\]):\` \`MenuItem\`\ \
NameTypeDescription
colorcolorOptional. Initial color value
\ {% endtab %}\ \ {% tab title="Multi-Color" %}\ \`item:color\_picker(\[colors: table\]):\` \`MenuItem\`\ \
NameTypeDescription
colorstableTable containing tables with a string index, and those tables should contain one or multiple color objects. Check UI examples.
\ {% endtab %}\ {% endtabs %}\ \ Attaches a color picker to the current menu item object.\ \ ### :create\ \ \`item:create():\` \`MenuGroup\`\ \ Attaches a group (gear) to the current menu item object.\ \ ### :parent\ \ \`item:parent():\` \`MenuItem\` / \`MenuGroup\`\ \ Returns the parent object of the menu item.\ \ \ ---\ \ # Agent Instructions\ This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.\ \ ## Querying This Documentation\ If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.\ \ Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter:\ \ \`\`\`\ GET https://docs-csgo.neverlose.cc/documentation/variables/ui.md?ask=&goal=\ \`\`\`\ \ \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language.\ \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.\ \ The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.\ \ Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/network.md). # network ## Functions: ### get \`network.get(url: string\[, headers: table, callback: function\]):\` \`string\`
NameTypeDescription
urlstringURL
headerstableHeaders
callbackfunctionCallback
Sends a GET request to the URL. ### post \`network.post(url: string\[, data: table, headers: table, callback: function\]):\` \`string\`
NameTypeDescription
urlstringURL
datatablePost data
headerstableHeaders
callbackfunctionCallback
Sends a POST request to the URL. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/network.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/panorama.md). # panorama ## Functions: ### loadstring \`panorama.loadstring(js\_code: string\[, panel: string\]):\` \`any\`
NameTypeDescription
js\_codestringString containing JavaScript code
panelstring (panorama root panel)Optional. Panel name
## Accessing API's \`panorama\[api\]:\` \`table\`
NameTypeDescription
apistringAPI name, e.g. GameStateAPI
\`panorama\[panel\]\[api\]:\` \`table\`
NameTypeDescription
panelstring (panorama root panel)Panel name
apistringAPI name, e.g. GameStateAPI
\`\`\`lua -- Access an API from the default root panel local MyPersonaAPI = panorama.MyPersonaAPI print(MyPersonaAPI.GetXuid()) -- Access an API from a specific root panel local UiToolkitAPI = panorama.CSGOMainMenu.UiToolkitAPI UiToolkitAPI.CloseAllVisiblePopups() \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/panorama.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/common.md). # common ## Functions: ### get\\\_date {% embed url="" %} \`common.get\_date(format: string\[, unix\_time: number\]):\` \`string\`
NameTypeDescription
formatstringDate format (strftime)
unix\_timenumberOptional. Unix-format time
Returns the formatted date. ### get\\\_unixtime \`common.get\_unixtime():\` \`number\` Returns the number of seconds that have elapsed since the unix epoch (1 January 1970 00:00:00) ### get\\\_timestamp \`common.get\_timestamp():\` \`number\` Returns high precision timestamp in milliseconds. ### get\\\_system\\\_time \`common.get\_system\_time():\` \`table\` Returns the windows time as a table containing the \`year\`, \`month\`, \`day\`, \`hours\`, \`minutes\`, and \`seconds\` values. ### get\\\_product\\\_version \`common.get\_product\_version():\` \`number\` Returns the product version of the game client. ### get\\\_game\\\_directory \`common.get\_game\_directory():\` \`string\` Returns the path to the game client folder. ### get\\\_map\\\_data \`common.get\_map\_data():\` \`table\` Returns a table containing the \`name\`, \`shortname\`, and \`group\` values. ### get\\\_username \`common.get\_username():\` \`string\` Returns your Neverlose username. ### get\\\_config\\\_name \`common.get\_config\_name():\` \`string\` Returns the name of the currently loaded config. ### get\\\_active\\\_scripts \`common.get\_active\_scripts():\` \`table\` Returns a table of strings containing the names of the loaded scripts. ### get\\\_mouse\\\_wheel\\\_delta \`common.get\_mouse\_wheel\_delta():\` \`number\` Returns a value that indicates the amount that the mouse wheel has changed. ### is\\\_in\\\_thirdperson \`common.is\_in\_thirdperson():\` \`boolean\` Returns \`true\` if the camera is in thirdperson. ### reload\\\_script \`common.reload\_script()\` Reloads current script. ### unload\\\_script \`common.unload\_script()\` Unloads current script. ### force\\\_full\\\_update \`common.force\_full\_update()\` Forces the server to send a full update packet. ### set\\\_clan\\\_tag \`common.set\_clan\_tag(text: string)\`
NameTypeDescription
textstringNew clan tag
Sets your in-game clan tag. ### set\\\_name \`common.set\_name(text: string)\`
NameTypeDescription
textstringNew name
Sets your in-game name. ### add\\\_event \`common.add\_event(text: string\[, icon\_name: string\])\`
NameTypeDescription
textstringText to print to into the upper-left panel.
icon\_namestringOptional. Fontawesome icon name.
Prints the text into the upper-left neverlose event panel. ### add\\\_notify \`common.add\_notify(title: string, text: string)\`
NameTypeDescription
titlestringText to print to into the title.
bodystringText to print to into the body of the notification.
Draws the notification. ### is\\\_button\\\_down {% embed url="" %} \`common.is\_button\_down(key: number):\` \`boolean\`
NameTypeDescription
keynumberKey to check
Returns \`true\` if the button is down, or nil on failure. ### is\\\_button\\\_released \`common.is\_button\_released(key: number):\` \`boolean\`
NameTypeDescription
keynumberKey to check
Returns \`true\` if the button is released, or nil on failure. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/common.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/materials.md). # materials ## Example available! {% content-ref url="/pages/03NGFcMa3nAJ77FO26kS" %} \[Materials\](/useful-information/script-examples/materials.md) {% endcontent-ref %} ## Functions: ### get \`materials.get(path: string\[, force\_load: boolean\]):\` \`Material\`
NameTypeDescription
pathstringDirectory to the specified material
force\_loadforce\_loadLoads the material if not loaded
Returns the material object in the specified path. ### get\\\_materials \`materials.get\_materials(partial\_path: string\[, force\_load: boolean, callback: function\]):\` \`table\`
NameTypeDescription
partial\_pathstringDirectory to the specified materials
force\_loadforce\_loadLoads each material if not loaded
callbackfunctionA callback with a pointer to the material object as the argument
If the callback is nil, it returns the table of material objects along the specified path. Otherwise the callback will be called. Access the material object using the arguments of the specified callback. ### create \`materials.create(name: strings, key\_values: string):\` \`Material\`
NameTypeDescription
namestringNew material name
key\_valuesstringNew material values
Creates and returns a new material object ## 🔗 struct \`Material\` ### :get\\\_name \`material:get\_name():\` \`string\` Returns the name of the material. ### :get\\\_texture\\\_group\\\_name() \`material:get\_texture\_group\_name():\` \`string\` Returns the texture group name of the material. ### :var\\\_flag \`material:var\_flag(flag: number\[, value: boolean\]):\` \`boolean\`
NameTypeDescription
flagnumberMaterial var flag
valuebooleanNew material var flag value
Gets or sets the value of the material var flag. ### :shader\\\_param \`material:shader\_param(name: string\[, value: any\]):\` \`any\`
NameTypeDescription
namestringShader parameter name
valueanyNew shader parameter value
Gets or sets the value of the material shader parameter. ### :color\\\_modulate \`material:color\_modulate(\[color: color\])\`
NameTypeDescription
colorcolorNew color modulation value
Gets or sets the material color modulation value. ### :alpha\\\_modulate \`material:alpha\_modulate(\[alpha: number\])\`
NameTypeDescription
alphanumberNew alpha modulation value
Gets or sets the material alpha modulation value. ### :is\\\_valid \`material:is\_valid():\` \`boolean\` Returns \`true\` if the material is valid. ### :reset \`material:reset()\` Resets the material properties to its original values along with discarding the override. ### :override \`material:override(mat: Material)\`
NameTypeDescription
matMaterialMaterial object with the needed properties
Overrides material properties to properties from another material without setting them. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/materials.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/color.md). # color ## Example available! {% content-ref url="/pages/QT7Qd1VML9Wg3yHGNrMz" %} \[Color\](/useful-information/script-examples/color.md) {% endcontent-ref %} ## Functions: ### :clone \`color\_object:clone():\` \`color\` Creates and returns a copy of the color object. ### :init {% tabs %} {% tab title="RGBA" %} \`color\_object:init(r: number, g: number, b: number, a: number):\` \`color\` > 📌 Available overloads (\`RGBA\`):\\ > color() -> \`255\`, \`255\`, \`255\`, \`255\`\\ > color(\`200\`) -> \`200\`, \`200\`, \`200\`, \`255\`\\ > color(\`255\`, \`160\`) -> \`255\`, \`255\`, \`255\`, \`160\`\\ > color(\`255\`, \`195\`, \`25\`) -> \`255\`, \`195\`, \`25\`, \`255\`\\ > color(\`255\`, \`195\`, \`25\`, \`200\`) -> \`255\`, \`195\`, \`25\`, \`200\`
NameTypeDescription
rnumberNew R color range
gnumberNew G color range
bnumberNew B color range
anumberNew A color range
{% endtab %} {% tab title="HEX" %} \`color\_object:init(value: string):\` \`color\` > 📌 Available overloads (\`HEX\` -> \`RGBA\`):\\ > color '\`C8\`' -> \`200\`, \`200\`, \`200\`, \`255\`\\ > color '\`FF\`\`A0\`' -> \`255\`, \`255\`, \`255\`, \`160\`\\ > color '\`FFC319\`' -> \`255\`, \`195\`, \`25\`, \`255\`\\ > color '\`AABBCCDD\`' -> \`170\`, \`187\`, \`204\`, \`221\`
NameTypeDescription
valuestringHEX string value (Format: AABBCCDD including all available overloads)
{% endtab %} {% endtabs %} Overwrites the color's ranges. Returns itself. ### :as\\\_fraction \`color\_object:as\_fraction(r: number, g: number, b: number, a: number):\` \`color\`
NameTypeDescription
rnumberNew R color range as a percentage in the range \[0.0, 1.0\]
gnumberNew G color range as a percentage in the range \[0.0, 1.0\]
bnumberNew B color range as a percentage in the range \[0.0, 1.0\]
anumberNew A color range as a percentage in the range \[0.0, 1.0\]
Overwrites the color's ranges using the fraction values. Returns itself. ### :as\\\_int32 \`color\_object:as\_int32(value: number):\` \`color\`
NameTypeDescription
valuenumberint32 color value
Overwrites the color's ranges converting the int32 value to RGBA values. Returns itself. ### :as\\\_hsv \`color\_object:as\_hsv(h: number, s: number, v: number, a: number):\` \`color\`
NameTypeDescription
hnumberHue color range \[0.0, 1.0\]
snumberSaturation color range \[0.0, 1.0\]
vnumberValue color range \[0.0, 1.0\]
anumberAlpha color range \[0.0, 1.0\]
Overwrites the color's ranges converting the HSV to RGBA values. Returns itself. ### :as\\\_hsl \`color\_object:as\_hsl(h: number, s: number, l: number, a: number):\` \`color\`
NameTypeDescription
hnumberHue color range \[0.0, 1.0\]
snumberSaturation color range \[0.0, 1.0\]
lnumberLightness color range \[0.0, 1.0\]
anumberAlpha color range \[0.0, 1.0\]
Overwrites the color's ranges converting the HSL to RGBA values. Returns itself. ### :to\\\_fraction \`color\_object:to\_fraction():\` \`number\`, \`number\`, \`number\`, \`number\` Returns the r, g, b, and a ranges of the color as a percentage in the range of \\\[0.0, 1.0\]. ### :to\\\_hex \`color\_object:to\_hex():\` \`string\` Returns the HEX string representing the color. ### :to\\\_int32 \`color\_object:to\_int32():\` \`number\` Returns the int32 value representing the color. ### :to\\\_hsv \`color\_object:to\_hsv():\` \`number\`, \`number\`, \`number\` Returns the HSV representation of the color. ### :to\\\_hsl \`color\_object:to\_hsl():\` \`number\`, \`number\`, \`number\` Returns the HSL representation of the color. ### :lerp \`color\_object:lerp(other: color, weight: number):\` \`color\`
NameTypeDescription
othercolorThe color to interpolate to
weightnumberA value between 0 and 1 that indicates the weight of other
Returns the linearly interpolated color between two colors by the specified weight. ### :grayscale \`color\_object:grayscale(\[ weight: number \]):\` \`color\`
NameTypeDescription
weightnumberOptional. A value between 0 and 1 that indicates the weight of grayscale
Returns the grayscaled color. ### :alpha\\\_modulate \`color\_object:alpha\_modulate(alpha: number):\` \`color\`
NameTypeDescription
alphanumberAlpha color range \[0, 255\]
Returns the current color with an overridden Alpha color range. ### :unpack \`color\_object:unpack():\` \`number\`, \`number\`, \`number\`, \`number\` Returns the r, g, b, and a values of the color. Note that these fields can be accessed by indexing r, g, b, and a. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/color.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/\_g.md). # \\\_G ### assert \`assert(expression: any\[, text: string, ...\]): any\`
NameTypeDescription
expressionanyThe expression to assert.
texttextThe error message to throw when assertion fails. This is only type-checked if the assertion fails.
...anyAny arguments past the error message will be returned by a successful assert.
If the result of the first argument is false or nil, an error is thrown with the second argument as the message. ### error \`error(text: any\[, level: number\])\`
NameTypeDescription
textstringThe error message to throw.
levelnumberThe level to throw the error at.
Throws a Lua error and breaks out of the current call stack. ### getmetatable \`getmetatable(object: any): any\`
NameTypeDescription
objectanyThe value to return the metatable of.
Returns the metatable of an object. This function obeys the metatable's \\\_\\\_metatable field, and will return that field if the metatable has it set. ### ipairs \`ipairs(tbl: table): function, table, number\`
NameTypeDescription
tbltableThe table to iterate over.
Returns an iterator function for a for loop, to return ordered key-value pairs from a table. ### print \`print(text: string\[, ...\])\`
NameTypeDescription
textstringText to print into the console.
...anyOptional arguments to concatenate with text.
Prints the text to the console. ### print\\\_error \`print\_error(text: string\[, ...\])\`
NameTypeDescription
textstringText to print into the console.
...anyOptional arguments to concatenate with text.
Prints an error to the console and plays a sound. ### print\\\_chat \`print\_chat(text: string\[, ...\])\`
NameTypeDescription
textstringText to print into the in-game chat.
...anyOptional arguments to concatenate with text.
Prints the text to the in-game chat. ### print\\\_raw \`print\_raw(text: string\[, ...\])\`
NameTypeDescription
textstringText to print into the console.
...anyOptional arguments to concatenate with text.
Prints the text that can be changed in color by prepending it with \`"\\a"\` followed by the color in the hexadecimal "RRGGBB" format. For example, \`"\\aFF0000Hi"\` will print \`"Hi"\` in red. ### print\\\_dev \`print\_dev(text: string\[, ...\])\`
NameTypeDescription
textstringText to print to into the upper-left console panel.
...anyOptional arguments to concatenate with text.
Prints the text into the upper-left console panel. ### tonumber \`tonumber(value: any\[, base: number\]):\` \`number\`
NameTypeDescription
valueanyThe value to convert. Can be a number or string.
basenumberOptional. The base used in the string. Can be any integer between 2 and 36, inclusive.
Returns the numeric representation of the value with the given base, or \`nil\` if the conversion failed. ### tostring \`tostring(var: any):\` \`string\`
NameTypeDescription
varanyThe object to be converted to a string.
Returns the string representation of the value. ### type \`type(var: any):\` \`string\`
NameTypeDescription
varanyThe object to get the type of.
Returns the name of the object's type. ### unpack \`unpack(tbl: table, start\_index: number, end\_index: number):\` \`...\`
NameTypeDescription
tbltableThe table to generate the vararg from.
start\_indexnumberWhich index to start from. Optional.
end\_indexnumberWhich index to end at. Optional, even if you set start\_index.
### xpcall \`xpcall(func: function, err\_callback: function\[, ...\]):\` \`boolean\`, \`...\`
NameTypeDescription
funcfunctionThe function to call initially.
err\_callbackfunctionThe function to be called if execution of the first fails. The error message is passed as a string.
...anyArguments to pass to the initial function.
Attempts to call the first function. If the execution succeeds, this returns \`true\` followed by the returns of the function. If execution fails, this returns \`false\` and the second function is called with the error message. ### to\\\_ticks \`to\_ticks(time: number):\` \`number\`
NameTypeDescription
timenumberThe seconds to convert to ticks.
Converts time (seconds) to ticks. ### to\\\_time \`to\_time(ticks: number):\` \`number\`
NameTypeDescription
ticksnumberThe number of ticks to convert to time.
Converts ticks to time (seconds). ### new\\\_class > ℹ️ This class system makes it easier to structure code in complex projects. \`new\_class():\` \`metatable\` Creates the new class. {% tabs %} {% tab title="Example1" %} {% code overflow="wrap" %} \`\`\`lua local ctx = new\_class() :struct 'struct\_one' { variable1 = 'test', some\_function = function(self, arg1) print(arg1) print(string.format('Hello World (%s)', self.variable1)) end } ctx.struct\_one:some\_function('test') \`\`\` {% endcode %} {% endtab %} {% tab title="Example2" %} > You can also create multiple structs and access one from another. \`\`\`lua local ctx = new\_class() :struct 'struct\_one' { variable = 1, some\_function = function(self) print(string.format( 'variable from struct\_two: %d', self.struct\_two.variable )) end } :struct 'struct\_two' { variable = 2, some\_function = function(self) print(string.format( 'variable from struct\_one: %d', self.struct\_one.variable )) end } ctx.struct\_two:some\_function() ctx.struct\_one:some\_function() print(ctx.struct\_one.variable) \`\`\` {% endtab %} {% endtabs %} --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/\_g.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/render.md). # render ## Functions: ### screen\\\_size \`render.screen\_size():\` \`vector\` ### camera\\\_position \`render.camera\_position():\` \`vector\` Returns the camera position vector. ### camera\\\_angles \`render.camera\_angles(\[angles: vector\]):\` \`vector\`
NameTypeDescription
anglesvectorNew camera angles
Returns or sets the camera angles. ### world\\\_to\\\_screen \`render.world\_to\_screen(position: vector):\` \`vector\`
NameTypeDescription
positionvectorPosition in world space
📌 Note that there is a cleaner alternative, the \[\`:to\_screen\`\](https://docs-csgo.neverlose.cc/documentation/variables/pages/SCvYOqxhw0Zri5gtCIPa#render.line-22) vector function. Returns the screen position vector, or nil if the world position is not visible on your screen. This can only be called from the render callback. ### get\\\_offscreen \`render.get\_offscreen(position: vector, radius: number\[, accurate: boolean\]):\` \`vector\`, \`number\`, \`boolean\`
NameTypeDescription
positionvectorPosition in world space
radiusnumberDistance from the center of the screen as a percentage in the range \[0.0, ∞\]
accuratebooleanOptional. If true then accurate calculations will be used
Returns the \`position\`, \`rotation\`, and \`is\_out\_of\_fov\` arguments or nil on failure. \`position\`: Screen coordinates (Returns ellipse-based position if the world position is out of FOV)\\ \`rotation\`: Yaw axis that can be used to rotate drawing stuff\\ \`is\_out\_of\_fov\`: Returns \`true\` if the world position is out of FOV. ### get\\\_pixel \`render.get\_pixel(position: vector)\` {% hint style="warning" %} Getting the color of the pixel is a heavy process. Do not do it inside callbacks that are called a lot of times per second. {% endhint %}
NameTypeDescription
positionvectorScreen position
Returns the color of the specified pixel on the screen. ### load\\\_font 📌 Render any text via the \[\`draw:text\`\](#text) function. {% tabs %} {% tab title="Size as a number" %} \`render.load\_font(name: string, size: number\[, flags: string\]):\` \`FontObject\`
NameTypeDescription
namestringFont that will be initialized
sizenumberSize of the font
flagsstringa for anti-aliasing, i for cursive text, and b for bold text, o for outlined text, d for the drop shadow effect.
{% endtab %} {% tab title="Size as a vector" %} \`render.load\_font(name: string, size: vector\[, flags: string\]):\` \`FontObject\`
NameTypeDescription
namestringFont that will be initialized
sizevectorA vector object containing width, height, and spacing.
flagsstringa for anti-aliasing, i for cursive text, and b for bold text, o for outlined text, d for the drop shadow effect, u to enable extra symbol support.
{% endtab %} {% endtabs %} Returns the \`FontObject\` struct or nil on failure. ### load\\\_image 📌 Render any image via the \[\`:texture\`\](#texture) function. \`render.load\_image(contents: string, size: vector):\` \`ImgObject\`
NameTypeDescription
contentsstringRaw image file contents
sizevectorSize of the image
Returns the \`ImgObject\` struct or nil on failure. Supports JPG, PNG, BMP, SVG, and GIF formats. ### load\\\_image\\\_rgba 📌 Render any image via the \[\`:texture\`\](#texture) function. \`render.load\_image\_rgba(contents: string, size: vector):\` \`ImgObject\`
NameTypeDescription
contentsstringRGBA buffer (HEX encoded)
sizevectorSize of the image
Returns the \`ImgObject\` struct or nil on failure. ### load\\\_image\\\_from\\\_file 📌 Render any image via the \[\`:texture\`\](#texture) function. \`render.load\_image\_from\_file(path: string, size: vector):\` \`ImgObject\`
NameTypeDescription
pathstringPath to the image
sizevectorSize of the image
> ℹ️ Loading images from game resources is supported. > > Example: \`render.load\_image\_from\_file 'materials/panorama/images/icons/ui/warning.svg'\` Returns the \`ImgObject\` struct or nil on failure. Supports JPG, PNG, BMP, SVG, and GIF formats. ### measure\\\_text \`render.measure\_text(font: FontObject\[, flags: string\], text: string):\` \`vector\`
NameTypeDescription
fontFontObjectFont object or 1 for Default font,
2 for Small font, or 3 for Console font
flagsstringOptional. s for DPI scaled text
textstringText that will be measured
Returns the measured size of the text. ### highlight\\\_hitbox \`render.highlight\_hitbox(entity: entity, hitbox: number, color: color)\`
NameTypeDescription
entityentityThe player whose hitbox(es) are to be highlighted.
hitboxnumberHitbox index (an integer between 0 and 18). A table with hitbox indices can also be used to highlight multiple hitboxes. Pass 19 to highlight every hitbox.
colorcolorThe color with which you want to highlight the hitbox(es).
Highlights the specified hitbox / hitboxes. ### get\\\_scale \`render.get\_scale(type: number):\` \`number\`
NameTypeDescription
typenumber

The type of DPI scale to return.

1 - Menu Scale, 2 - ESP Scale.

Returns the DPI scale value. ## Structs ### 🔗 \`ImgObject\` #### width \`img.width\` \`:\` \`number\` #### height \`img.height\` \`:\` \`number\` #### resolution \`img.resolution\` \`:\` \`number\` ### 🔗 \`FontObject\` #### width \`font.width\` \`:\` \`number\` #### height \`font.height\` \`:\` \`number\` #### spacing \`font.spacing\` \`:\` \`number\` #### :set\\\_size {% tabs %} {% tab title="Size as a number" %} \`font:set\_size(size: number)\`
NameTypeDescription
sizenumberNew size of the font
{% endtab %} {% tab title="Size as a vector" %} \`font:set\_size(size: vector)\`
NameTypeDescription
sizevectorA vector object containing width, height, and spacing.
{% endtab %} {% endtabs %} Sets the new font size. ## Draw functions ### blur \`render.blur(position\_a: vector, position\_b: vector, strength: number, alpha: number\[, rounding: number\])\`
NameTypeDescription
position\_avectorStart position
position\_bvectorEnd position
strengthnumberBlur strength
alphanumberAlpha percentage in the range \[0.0, 1.0\]
roundingnumberOptional. Rounding of the blur rectangle in pixels
### line \`render.line(position\_a: vector, position\_b: vector, color: color)\`
NameTypeDescription
position\_avectorStart position
position\_bvectorEnd position
colorcolorColor of the line
### poly \`render.poly(color: color, positions: vector\[, ...\])\`
NameTypeDescription
colorcolorColor of the polyline
positionsvectorScreen positions
...Comma-separated vectors to concatenate with positions
### poly\\\_blur \`render.poly\_blur(opacity: number, strength: number, positions: vector\[, ...\])\`
NameTypeDescription
opacitynumberOpacity percentage in the range \[0.0, 1.0\]
strengthnumberBlur strength
positionsvectorScreen positions
...Comma-separated vectors to concatenate with positions
### poly\\\_line \`render.poly\_line(color: color, positions: vector\[, ...\])\`
NameTypeDescription
colorcolorColor of the polyline
positionsvectorScreen positions
...Comma-separated vectors to concatenate with positions
### rect \`render.rect(position\_a: vector, position\_b: vector, color: color\[, rounding: number, no\_clamp: boolean\])\`
NameTypeDescription
position\_avectorStart position
position\_bvectorEnd position
colorcolorColor of the rectangle
roundingnumberOptional. Rounding of the rectangle in pixels
no\_clampbooleanOptional. If true, negative sizes will be allowed
### rect\\\_outline \`render.rect\_outline(position\_a: vector, position\_b: vector, color: color\[, thickness: number, rounding: number, no\_clamp: boolean\])\`
NameTypeDescription
position\_avectorStart position
position\_bvectorEnd position
colorcolorColor of the rectangle
thicknessnumberOptional. Thickness of the rectangle in pixels
roundingnumberOptional. Rounding of the rectangle in pixels
no\_clampbooleanOptional. If true, position\_a < position\_b will be allowed
### gradient \`render.gradient(position\_a: vector, position\_b: vector, top\_left: color, top\_right: color, bottom\_left: color, bottom\_right: color\[, rounding: number\])\`
NameTypeDescription
position\_avectorStart position
position\_bvectorEnd position
top\_leftcolorColor of the top left rectangle position
top\_rightcolorColor of the top right rectangle position
bottom\_leftcolorColor of the bottom left rectangle position
bottom\_rightcolorColor of the bottom right rectangle position
roundingnumberOptional. Rounding of the gradient in pixels
### circle \`render.circle(position: vector, color: color, radius: number, start\_deg: number, pct: number)\`
NameTypeDescription
positiontypeScreen position
colorcolorColor of the circle
radiusnumberRadius of the circle in pixels
start\_degnumber0 is the right side, 90 is the bottom, 180 is the left, 270 is the top
pctnumberPercentage in the range \[0.0-1.0\] determining how full the circle is
### circle\\\_outline \`render.circle\_outline(position: vector, color: color, radius: number, start\_deg: number, pct: number\[, thickness: number\])\`
NameTypeDescription
positionvectorScreen position
colorcolorColor of the circle
radiusnumberRadius of the circle in pixels
start\_degnumber0 is the right side, 90 is the bottom, 180 is the left, 270 is the top
pctnumberPercentage in the range \[0.0-1.0\] determining how full the circle is
thicknessnumberOptional. Thickness of the outline in pixels
### circle\\\_gradient \`render.circle\_gradient(position: vector, color\_outer: color, color\_inner: color, radius: number, start\_deg: number, pct: number)\`
NameTypeDescription
positionvectorScreen position
color\_outercolorOuter color of the circle
color\_innercolorInner color of the circle
radiusnumberRadius of the circle in pixels
start\_degnumber0 is the right side, 90 is the bottom, 180 is the left, 270 is the top
pctnumberPercentage in the range \[0.0-1.0\] determining how full the circle is
### circle\\\_3d \`render.circle\_3d(position: vector, color: color, radius: number, start\_deg: number, pct: number\[, outline: boolean\])\`
NameTypeDescription
positionvectorScreen position
colorcolorColor of the circle
radiusnumberRadius of the circle in pixels
start\_degnumber0 is the right side, 90 is the bottom, 180 is the left, 270 is the top
pctnumberPercentage in the range \[0.0-1.0\] determining how full the circle is
outlinebooleanOptional. Render the circle outline
### circle\\\_3d\\\_outline \`render.circle\_3d\_outline(position: vector, color: color, radius: number, start\_deg: number, pct: number\[, thickness: number\])\`
NameTypeDescription
positionvectorScreen position
colorcolorColor of the circle
radiusnumberRadius of the circle in pixels
start\_degnumber0 is the right side, 90 is the bottom, 180 is the left, 270 is the top
pctnumberPercentage in the range \[0.0-1.0\] determining how full the circle is
thicknessnumberThickness of the outline in pixels
### circle\\\_3d\\\_gradient \`render.circle\_3d\_gradient(position: vector, color\_outer: color, color\_inner: color, radius: number, start\_deg: number, pct: number)\`
NameTypeDescription
positionvectorScreen position
color\_outercolorOuter color of the circle
color\_innercolorInner color of the circle
radiusnumberRadius of the circle in pixels
start\_degnumber0 is the right side, 90 is the bottom, 180 is the left, 270 is the top
pctnumberPercentage in the range \[0.0-1.0\] determining how full the circle is
### text 📌 Render any text via the \[\`:load\_font\`\](#load\_font) function. \`render.text(font: FontObject, position: vector, color: color, flags: string, text:any\[, ...\])\`
NameTypeDescription
fontFontObjectFont object or 1 for Default font,
2 for Small font, 3 for Console font, or 4 for Bold font
positionvectorScreen position
colorcolorColor of the text
flagsstring

c for centered text, r for right-aligned text, s for DPI scaled text.

nil can be specified for normal uncentered text.

textanyText that will be drawn
...Comma-separated vectors to concatenate with text
Draws the specified text. ### texture 📌 Create the texture via the \[\`:load\_image\`\](#load\_image) function. \`render.texture(texture: ImgObject, position: vector\[, size: vector, color: color, mode: string, rounding: number\])\`
NameTypeDescription
textureImgObjectImage object
positionvectorScreen position
sizevectorOptional. Size of the texture
colorcolorOptional. Color of the texture
modestringOptional. f for fill, r for repeat
roundingnumberOptional. Roundness of the texture
### push\\\_rotation \`render.push\_rotation(degrees: number)\`
NameTypeDescription
degreesnumberRotation degrees (0 - 360)
Applies the rotation for all subsequent elements. ### pop\\\_rotation \`render.pop\_rotation()\` Discards an early set rotation. ### push\\\_clip\\\_rect \`render.push\_clip\_rect(pos\_a: vector, pos\_b: vector\[, intersect: boolean\])\`
NameTypeDescription
pos\_avectorScreen position of point A
pos\_bvectorScreen position of point B
intersectbooleanOptional. Allow intersections with other clip regions
Applies the clip region to the given rectangle for all subsequent elements. ### pop\\\_clip\\\_rect \`render.pop\_clip\_rect()\` Discards an early set rectangle clipping region. ### shadow \`render.shadow(pos\_a: vector, pos\_b: vector, clr: color\[, thickness: number, offset: number, rounding: number\])\`
NameTypeDescription
pos\_avectorScreen position of point A
pos\_bvectorScreen position of point B
clrcolorThe color of the shadow
thicknessnumberThe thickness of the shadow
offsetnumberShadow offset
roundingnumberThe rounding of the shadow rectangle
Draws a shadow rectangle. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/render.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://docs-csgo.neverlose.cc/documentation/variables/rage.md). # rage ## Structs: ## 🔗 \`antiaim\` ### :get\\\_max\\\_desync \`rage.antiaim:get\_max\_desync():\` \`number\` Returns the maximum amount of desync. ### :get\\\_rotation \`rage.antiaim:get\_rotation(\[value: boolean\]):\` \`number\`
NameTypeDescription
valuebooleanOptional. If true, fake rotation will be returned.
Returns the current anti-aim rotation. ### :get\\\_target \`rage.antiaim:get\_target(\[return\_fr: boolean\]):\` \`number\`
NameTypeDescription
return\_frbooleanOptional. If true, freestanding yaw will be returned.
Returns the at target yaw rotation or nil if not available. ### :inverter \`rage.antiaim:inverter(\[value: boolean\]):\` \`boolean\`
NameTypeDescription
valuebooleanOptional. Inverter state.
Gets or sets the state of the anti-aim inverter. ### :override\\\_hidden\\\_pitch \`rage.antiaim:override\_hidden\_pitch(value: number):\` \`number\`
NameTypeDescription
valuenumberHidden pitch value.
Overrides the hidden pitch to the desired value. ### :override\\\_hidden\\\_yaw\\\_offset \`rage.antiaim:override\_hidden\_yaw\_offset(value: number):\` \`number\`
NameTypeDescription
valuenumberHidden yaw offset value.
Overrides the hidden yaw offset to the desired value. ## 🔗 \`exploit\` ### :get \`rage.exploit:get():\` \`number\` Returns the exploit charge as a unit interval (value in the range \\\[0, 1\]). ### :allow\\\_charge \`rage.exploit:allow\_charge(\[value: boolean\])\`
NameTypeDescription
valuebooleanOptional. If true, allows exploit charge. If false, blocks exploit charge. Defaults to true
Allows/blocks exploit charge. ### :allow\\\_defensive \`rage.exploit:allow\_defensive(\[value: boolean\])\`
NameTypeDescription
valuebooleanOptional. If true, allows the cheat to discharge defensive exploit. If false, blocks defensive exploit discharge. Defaults to true
Allows/blocks defensive exploit discharge. ### :force\\\_teleport \`rage.exploit:force\_teleport()\` ### :force\\\_charge \`rage.exploit:force\_charge()\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://docs-csgo.neverlose.cc/documentation/variables/rage.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Quick start | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/useful-information/quick-start.md) . [](https://docs-csgo.neverlose.cc/useful-information#text-editor) 📋 Text editor ------------------------------------------------------------------------------------- The best text editors make it simple and easy to code without formatting issues corrupting it. Text editor Link 🥇 Visual Studio Code [code.visualstudio.com](https://code.visualstudio.com/) 🥈 Sublime Text [sublimetext.com](https://www.sublimetext.com/) 🥉 Notepad++ [notepad-plus-plus.org](https://notepad-plus-plus.org/) [](https://docs-csgo.neverlose.cc/useful-information#beginners-guide) 🔰 Beginner's guide ---------------------------------------------------------------------------------------------- If you're new to Lua scripting, we'd recommend to take a look at the «[Lua in 5 minutes](https://learnxinyminutes.com/docs/lua/) » guide [](https://docs-csgo.neverlose.cc/useful-information#learn-more) 📘 Learn more ----------------------------------------------------------------------------------- [⛩️Common knowledge](https://docs-csgo.neverlose.cc/useful-information/common-knowledge) [🧠Examples](https://docs-csgo.neverlose.cc/useful-information/script-examples) [PreviousWelcome](https://docs-csgo.neverlose.cc/) [NextCommon knowledge](https://docs-csgo.neverlose.cc/useful-information/common-knowledge) Last updated 4 years ago --- # Events | Neverlose For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt) . This page is also available as [Markdown](https://docs-csgo.neverlose.cc/documentation/events.md) . [](https://docs-csgo.neverlose.cc/documentation#list-of-game-events) List of game events: ---------------------------------------------------------------------------------------------- In order to reference an event, index the `events` namespace with an event name [![Logo](https://docs-csgo.neverlose.cc/~gitbook/image?url=https%3A%2F%2Fwiki.alliedmods.net%2Ffavicon.ico&width=20&dpr=3&quality=100&sign=600f77c0&sv=2)Counter-Strike: Global Offensive Events - AlliedModders Wikiwiki.alliedmods.net](https://wiki.alliedmods.net/Counter-Strike:_Global_Offensive_Events) Official CS:GO events Copy local hitgroup_str = { [0] = 'generic', 'head', 'chest', 'stomach', 'left arm', 'right arm', 'left leg', 'right leg', 'neck', 'generic', 'gear' } events.player_hurt:set(function(e) local me = entity.get_local_player() local attacker = entity.get(e.attacker, true) if me == attacker then local user = entity.get(e.userid, true) local hitgroup = hitgroup_str[e.hitgroup] print(('Hit %s in the %s for %d damage (%d health remaining)'):format( user:get_name(), hitgroup, e.dmg_health, e.health )) end end) [](https://docs-csgo.neverlose.cc/documentation#list-of-events) List of events: ------------------------------------------------------------------------------------ ### [](https://docs-csgo.neverlose.cc/documentation#render) render Fired every frame. Most functions from the [`render`](https://docs-csgo.neverlose.cc/documentation/variables/render) namespace can only be used here. Copy events.render:set(function(ctx) render.rect(vector(0, 0), vector(1920, 1080), color(230, 150)) end) ### [](https://docs-csgo.neverlose.cc/documentation#render_glow) render\_glow Fired every time the game prepares glow object manager. This event gives you the ability to render glow lines. Access the function by adding an argument to the callback. `ctx:render(from: vector, to: vector, thickness: number, flags: string, color: color)` Name Type Description **from** `**vector**` Start position in world space **to** `**vector**` Final position in world space **thickness** `**number**` Line thickness as a number in the range \[0.0, ∞\] **flags** `**string**` Glow flags. `l` to draw line, `g` to draw `glow` outline, or `w` to make it fully visible behind walls **color** `**color**` Color of the line 🧷 Anti-aim direction glow lines[](https://docs-csgo.neverlose.cc/documentation#anti-aim-direction-glow-lines) ![](https://docs-csgo.neverlose.cc/~gitbook/image?url=https%3A%2F%2F3594665820-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F37PG3extaxoGL9yvcP52%252Fuploads%252Ft95EElmDcmCyhBDlXM7z%252Fimage.png%3Falt%3Dmedia%26token%3De3e05f2d-2cf1-4af1-b964-535d2c0033e9&width=300&dpr=3&quality=100&sign=a438ac17&sv=2) Copy local real_yaw, abs_yaw = 0, 0 events.createmove:set(function(cmd) local me = entity.get_local_player() local anim_state = me:get_anim_state() if not anim_state or cmd.choked_commands > 0 then return end real_yaw = anim_state.eye_yaw abs_yaw = anim_state.abs_yaw end) events.render_glow:set(function(ctx) local me = entity.get_local_player() if not me or not me:is_alive() then return end local origin = me:get_origin() local real_yaw_dir = origin + (vector():angles(0, real_yaw) * 20) local abs_yaw_dir = origin + (vector():angles(0, abs_yaw) * 25) ctx:render(origin, real_yaw_dir, 0.15, 'lg', color(255, 0, 0)) -- Real yaw ctx:render(origin, abs_yaw_dir, 0.15, 'g', color(35, 215, 235)) -- Body yaw end) ### [](https://docs-csgo.neverlose.cc/documentation#override_view) override\_view Fired every time the game prepares camera view. Name Type Description **fov** `**number**` Field of View **view** `**vector**` Camera view angles **camera** `**vector**` World position of the camera ### [](https://docs-csgo.neverlose.cc/documentation#createmove) createmove Fired every time the game prepares a move command. Use this to modify something before the aimbot or movement features. Use the parameter passed by the callback to access the [`UserCmd`](https://docs-csgo.neverlose.cc/documentation/events#struct-usercmd) . Copy -- Sets the Roll angle when Shift (+speed) is being held events.createmove:set(function(cmd) if cmd.in_speed then cmd.view_angles.z = 50 -- you are now unhittable end end) #### [](https://docs-csgo.neverlose.cc/documentation#struct-usercmd) 🔗 struct `UserCmd` Name Type Description **block\_movement** `**number**` Set to `1` to make the cheat slowdown you to the weapon's minimal speed or set to `2` to fully stop you. Defaults to `0` **no\_choke** `**boolean**` Set to `true` to force the cheat to not choke the current command **send\_packet** `**boolean**` Set to `false` to force the cheat to choke the current command **force\_defensive** `**boolean**` Set to `true` to trigger `'defensive'` exploit (Double tap is required to be fully charged) **jitter\_move** `**boolean**` Set to `false` to disable jitter move **choked\_commands** `**number**` Amount of choked commands **command\_number** `**number**` Current command number **tickcount** `**number**` Current command tickcount **random\_seed** `**number**` Current command random seed **view\_angles** `**vector**` Player view angles **move\_yaw** `**number**` Movement yaw angle **forwardmove** `**number**` Forward / backward speed **sidemove** `**number**` Left / right speed **upmove** `**number**` Up / down speed 🧷 Available cmd buttons[](https://docs-csgo.neverlose.cc/documentation#available-cmd-buttons) Copy local on_createmove = function(cmd) cmd.in_attack -- +attack cmd.in_attack2 -- +attack2 cmd.in_use -- +use cmd.in_jump -- +jump cmd.in_duck -- +duck cmd.in_walk -- +walk cmd.in_speed -- +speed cmd.in_reload -- +reload cmd.in_moveleft cmd.in_moveright cmd.in_forward cmd.in_back cmd.in_left cmd.in_right cmd.in_bullrush end events.createmove:set(on_createmove) ### [](https://docs-csgo.neverlose.cc/documentation#createmove_run) createmove\_run Fired every time the game runs a move command. Use the parameter passed by the callback to access the [`RunCommand`](https://docs-csgo.neverlose.cc/documentation/events#struct-usercmd-1) . #### [](https://docs-csgo.neverlose.cc/documentation#struct-runcommand) 🔗 struct `RunCommand` Name Type Description **choked\_commands** `**number**` Amount of choked commands **command\_number** `**number**` Current command number **tick\_count** `**number**` Current command tick count **move\_yaw** `**number**` Movement yaw angle **forwardmove** `**number**` Forward / backward speed **sidemove** `**number**` Left / right speed **upmove** `**number**` Up / down speed ### [](https://docs-csgo.neverlose.cc/documentation#aim_fire) aim\_fire Fired every time the aimbot shoots at a player. Name Type Description **id** `**number**` Shot ID **target** `**entity**` Target entity **damage** `**number**` Estimated damage **hitchance** `**number**` Estimated hit chance **hitgroup** `**number**` Targeted hitgroup **backtrack** `**number**` Amount of ticks the player was backtracked **aim** `**vector**` World position of the aim point **angle** `**vector**` Aimbot shoot angles ### [](https://docs-csgo.neverlose.cc/documentation#aim_ack) aim\_ack Name Type Description **id** `**number**` Shot ID **target** `**entity**` Target entity **damage** `**number**` Actual shot damage **spread** `**number**` Bullet spread angle if available **hitchance** `**number**` Actual shot hit chance **hitgroup** `**number**` Hitgroup that was hit **backtrack** `**number**` Amount of ticks the player was backtracked **aim** `**vector**` World position of the aim point **wanted\_damage** `**number**` Targeted damage **wanted\_hitgroup** `**number**` Targeted hitgroup **state** `**string**` Reason the shot was missed or nil if the shot was hit. Available miss reasons: `spread`, `correction`, `misprediction`, `prediction error`, `backtrack failure`, `damage rejection`, `unregistered shot`, `player death`, `death`. ### [](https://docs-csgo.neverlose.cc/documentation#bullet_fire) bullet\_fire Fired every time someone fires a bullet. Name Type Description **entity** `**entity**` Entity that did the shot **origin** `**vector**` Entity world position **angles** `**vector**` Aim angle based on entity rotation **sound** `**number**` Sound type **spread** `**number**` Weapon spread **inaccuracy** `**number**` Weapon inaccuracy **recoil\_index** `**number**` Weapon recoil index **random\_seed** `**number**` Spread seed of the shot **weapon\_id** `**number**` Weapon definition index **weapon\_mode** `**number**` Weapon fire mode ### [](https://docs-csgo.neverlose.cc/documentation#console_input) console\_input Fired every time the user runs a console command. Use the parameter passed by the callback to access the input string. Copy local last_random_int events.console_input:set(function(text) if text == '/roll' then local random_int = utils.random_int(1, 6) local str = common.get_username() .. ' rolled a ' .. random_int if random_int == 1 and random_int == last_random_int then str = str .. '... snake eyes!' end print(str) last_random_int = random_int return false end end) This can be used to implement custom console commands. Return `false` to prevent the game from processing the command. ### [](https://docs-csgo.neverlose.cc/documentation#draw_model) draw\_model Fired before a model is rendered. Use the parameter passed by the callback to access the model context. Return `false` to prevent the game from rendering the original model. Name Type Description **name** `**string**` Name of the model. (e.g: `weapons\v_knife_cord.mdl`) **entity** `**entity**` Entity that belongs to the model. **draw** `**function**` Draws the model with the specified material. Pass nil to the first argument to draw the model with the default material. 🧷 Draw model example[](https://docs-csgo.neverlose.cc/documentation#draw-model-example) Copy local ct_fbi_glass = materials.get('models/player/ct_fbi/ct_fbi_glass', true) events.draw_model:set(function(ctx) local me = entity.get_local_player() if ctx.entity == me then -- Override local player model with the new material ctx:draw(ct_fbi_glass) -- Prevent the game from drawing the original model return false end end) ### [](https://docs-csgo.neverlose.cc/documentation#level_init) level\_init Fired after fully connected to the server (first non-delta packet received). (`SIGNONSTATE:FULL`) ### [](https://docs-csgo.neverlose.cc/documentation#pre_render) pre\_render Fired before a frame is rendered. (`FrameStageNotify:FRAME_RENDER_START`) ### [](https://docs-csgo.neverlose.cc/documentation#post_render) post\_render Fired after a frame is rendered. (`FrameStageNotify:FRAME_RENDER_END`) ### [](https://docs-csgo.neverlose.cc/documentation#net_update_start) net\_update\_start Fired before the game processes entity updates from the server. (`FrameStageNotify:FRAME_NET_UPDATE_START`) ### [](https://docs-csgo.neverlose.cc/documentation#net_update_end) net\_update\_end Fired after an entity update packet is received from the server. (`FrameStageNotify:FRAME_NET_UPDATE_END`) ### [](https://docs-csgo.neverlose.cc/documentation#config_state) config\_state Fired every time config state is updated. The current state is accessible from the callback arguments as one of these strings: `pre_save`, `post_save`, `pre_load`, `post_load`. Copy events.config_state(function(state) print(state == "pre_save") end) ### [](https://docs-csgo.neverlose.cc/documentation#mouse_input) mouse\_input Fired every time the mouse input occurs. Return `false` to lock the mouse input. ### [](https://docs-csgo.neverlose.cc/documentation#shutdown) shutdown Fired when the script is about to unload. ### [](https://docs-csgo.neverlose.cc/documentation#pre_update_clientside_animation) pre\_update\_clientside\_animation Fired before C\_CSPlayer::UpdateClientSideAnimation is called. Name Type Description **player** `**entity**` ... ### [](https://docs-csgo.neverlose.cc/documentation#post_update_clientside_animation) post\_update\_clientside\_animation Fired after C\_CSPlayer::UpdateClientSideAnimation is called. Name Type Description **player** `**entity**` ... ### [](https://docs-csgo.neverlose.cc/documentation#grenade_override_view) grenade\_override\_view Invoked to override the input values for the grenade prediction. Contains detailed view parameters associated with the grenade trajectory prediction. Name Type Description **angles** `**vector**` Input view angles **src** `**vector**` Input starting position or origin **velocity** `**vector**` Input velocity **view\_offset** `**vector**` Input view offset ### [](https://docs-csgo.neverlose.cc/documentation#grenade_warning) grenade\_warning Fired when the "Grenade Proximity Warning" is being rendered. Return `false` to it from being rendered. Name Type Description **entity** `**entity**` The game entity representing the grenade in proximity. **origin** `**vector**` The current position of the grenade. **closest\_point** `**vector**` Represents the nearest point to the player where the grenade will cause damage. For example, in the case of a molotov, this point indicates where the flames would be most harmful. **type** `**string**` Specifies the type of the grenade, "Frag" or "Molly". **damage** `**number**` Predicts the potential damage that would be inflicted upon the local player if they remain at their current position when the grenade detonates. **expire\_time** `**number**` Specifies the time when the grenade detonates or is no longer a threat. **icon** `**ImgObject**` A reference to the texture used in the warning. **path** `**table**` Table of 3D vectors representing the complete trajectory path of the grenade. ### [](https://docs-csgo.neverlose.cc/documentation#grenade_prediction) grenade\_prediction Fired when the cheat is drawing the predicted grenade trajectory. Contains detailed information about the grenade's trajectory and impact. Name Type Description **type** `**string**` Identifies the type of the grenade, e.g., "Smoke", "Flash", "Frag". **damage** `**number**` Represents the amount of damage inflicted upon the `target` due to the grenade's effect. **fatal** `**boolean**` Indicates whether the grenade's effect resulted in a lethal outcome for the `target`. **path** `**table**` Table of 3D vectors representing the complete trajectory path of the grenade. **collisions** `**table**` Table of 3D vectors containing all the collision points where the grenade interacts with an obstacle or wall. **target** `**entity**` The game entity that the grenade directly impacts or affects. ### [](https://docs-csgo.neverlose.cc/documentation#localplayer_transparency) localplayer\_transparency Invoked to override the opacity of the local player's model. You can override it by returning a custom alpha value. Name Type Description **current\_alpha** `**number**` The current alpha. Ranges from 0 (completely transparent) to 255 (completely opaque). [](https://docs-csgo.neverlose.cc/documentation#list-of-complicated-events) List of complicated events: ------------------------------------------------------------------------------------------------------------ ### [](https://docs-csgo.neverlose.cc/documentation#voice_message) voice\_message Fired every time the game receives a voice packet. Name Type Description **entity** `**entity**` Entity that belongs to the voice packet. **audible\_mask** `**number**` Audible mask **xuid** `**number**` Xuid **proximity** `**number**` Proximity **format** `**number**` Format **sequence\_bytes** `**number**` Sequence bytes **section\_number** `**number**` Section number **uncompressed\_sample\_offset** `**number**` Uncompressed sample offset **buffer** `**bf_read**` Voice packet buffer **is\_nl** `**boolean**` Packet was sent by the Neverlose #### [](https://docs-csgo.neverlose.cc/documentation#struct-bf_read) 🔗 struct `bf_read` Name Type Description **read\_bits** `**function**` Reads a number value from the buffer `:read_bits(num_bits)` **read\_coord** `**function**` Reads a floating number value from the buffer `:read_coord()` (4 bytes) **reset** `**function**` Resets the pointer of the buffer to its original offset **crypt** `**function**` Encrypts/decrypts buffer `:crypt(key)` #### [](https://docs-csgo.neverlose.cc/documentation#struct-bf_write) 🔗 struct `bf_write` Name Type Description **write\_bits** `**function**` Writes a number value to the buffer `:write_bits(value, num_bits)` **write\_coord** `**function**` Writes a floating number value to the buffer `:write_coord(value)` (4 bytes) **is\_overflowed** `**function**` Returns `true` if the buffer is overflowed **crypt** `**function**` Encrypts/decrypts buffer `:crypt(key)` > 📌 Firing this event from the Lua will send a voice packet > > `events.voice_message(function: buffer)` Copy events.voice_message(function(ctx) local buffer = ctx.buffer local code = buffer:read_bits(16) if code ~= 0x1337 then return end local tickcount = buffer:read_bits(32) print(string.format( 'received voice packet from %s | pct_tickcount: %d', ctx.entity:get_name(), tickcount )) end) -- Note that you wont be able to receive your own voice packet -- unless voice_loopback convar is set to 1 events.voice_message:call(function(buffer) buffer:write_bits(0x1337, 16) buffer:write_bits(globals.tickcount, 32) end) > `[neverlose] received voice packet from Salvatore | pct_tickcount: 1200` [PreviousUI](https://docs-csgo.neverlose.cc/useful-information/script-examples/ui) [NextVariables](https://docs-csgo.neverlose.cc/documentation/variables) Last updated 2 years ago ---