Neverlose
  • Welcome
  • Official Website
  • Useful information
    • 📲Quick start
    • â›Šī¸Common knowledge
    • 🧠Examples
      • âš™ī¸Materials
      • âš™ī¸Color
      • âš™ī¸Vector
      • âš™ī¸ESP
      • âš™ī¸ConVars
      • âš™ī¸UI
  • Documentation
    • 📓Events
    • âš™ī¸Variables
      • 🌎_G
      • đŸ—„ī¸bit
      • 🌈color
      • ⌚common
      • 🎲cvar
      • 💾db
      • 👾entity
      • 👩‍đŸ’ģesp
      • đŸ—ŗī¸events
      • 📂files
      • 📎globals
      • 🔓json
      • ✨materials
      • đŸ”ĸmath
      • đŸ’ģui
      • â˜ī¸network
      • 🌃panorama
      • đŸ’ĸrage
      • 🎨render
      • 🧰utils
      • 📍vector
Powered by GitBook
On this page
  • Text Example
  • Bar Example
  • Item Example
  1. Useful information
  2. Examples

ESP

PreviousVectorNextConVars

Last updated 2 years ago

Text Example

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

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

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)
🧠
âš™ī¸