-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Данный скрипт не проверялся модераторами, так как является кряком приватной LUA и в нём может присутствовать обфускация. Даже известные пользователи могут выложить вредоносный скрипт под видом крякнутого, поэтому любое использование исключительно на свой страх и риск.
code_language.lua:
-- * defines
local _name = 'Luftwaffe';
local _debug = true;
-- * C default (library usage)
ffi.cdef[[
// + types
typedef void* pvoid;
typedef pvoid handle;
typedef const pvoid* lpcvoid;
typedef unsigned int size_t;
typedef int* farproc;
typedef unsigned long dword;
typedef dword ulong_ptr;
typedef unsigned short word;
typedef unsigned char byte;
typedef const char* lpcstr;
// + structures
typedef struct _systemtime{
word wYear;
word wMonth;
word wDayOfWeek;
word wDay;
word wHour;
word wMinute;
word wSecond;
word wMilliseconds;
} systemtime, *lpsystemtime;
typedef struct _pointl {
long x, y;
} pointl, *ppointl;
typedef struct _devicemodea {
byte dmDeviceName[32];
word dmSpecVersion;
word dmDriverVersion;
word dmSize;
word dmDriverExtra;
dword dmFields;
union {
struct {
short dmOrientation;
short dmPaperSize;
short dmPaperLength;
short dmPaperWidth;
short dmScale;
short dmCopies;
short dmDefaultSource;
short dmPrintQuality;
} DUMMYSTRUCTNAME;
pointl dmPosition;
struct {
pointl dmPosition;
dword dmDisplayOrientation;
dword dmDisplayFixedOutput;
} DUMMYSTRUCTNAME2;
} DUMMYUNIONNAME;
short dmColor;
short dmDuplex;
short dmYResolution;
short dmTTOption;
short dmCollate;
byte dmFormName[32];
word dmLogPixels;
dword dmBitsPerPel;
dword dmPelsWidth;
dword dmPelsHeight;
union {
dword dmDisplayFlags;
dword dmNup;
} DUMMYUNIONNAME2;
dword dmDisplayFrequency;
dword dmICMMethod;
dword dmICMIntent;
dword dmMediaType;
dword dmDitherType;
dword dmReserved1;
dword dmReserved2;
dword dmPanningWidth;
dword dmPanningHeight;
} devmodea, *pdevmodea, *npdevmodea, *lpdevmodea;
// + Microsoft Api
bool EnumDisplaySettingsA(int lpszDeviceName, dword iModeNum, devmodea* lpDevMode);
void GetLocalTime(lpsystemtime lpSystemTime);
int VirtualProtect(handle lpAddress, dword dwSize, dword flNewProtect, dword* lpflOldProtect);
]]
-- * menu cheat elements
local m_cheat_elements = {
aimbot = {
ragebot = {
accuracy = {
minimum_damage = Menu.FindVar('Aimbot', 'Ragebot', 'Accuracy', 'Minimum Damage'),
},
exploits = {
hideshots = Menu.FindVar('Aimbot', 'Ragebot', 'Exploits', 'Hide Shots'),
doubletap = Menu.FindVar('Aimbot', 'Ragebot', 'Exploits', 'Double Tap'),
},
},
anti_aim = {
main = {
enable = Menu.FindVar('Aimbot', 'Anti Aim', 'Main', 'Enable Anti Aim'),
yaw_base = Menu.FindVar('Aimbot', 'Anti Aim', 'Main', 'Yaw Base'),
yaw_add = Menu.FindVar('Aimbot', 'Anti Aim', 'Main', 'Yaw Add'),
yaw_modifier = Menu.FindVar('Aimbot', 'Anti Aim', 'Main', 'Yaw Modifier'),
modifier_degree = Menu.FindVar('Aimbot', 'Anti Aim', 'Main', 'Modifier Degree'),
},
fake_angle = {
fake_options = Menu.FindVar('Aimbot', 'Anti Aim', 'Fake Angle', 'Fake Options'),
lby_mode = Menu.FindVar('Aimbot', 'Anti Aim', 'Fake Angle', 'LBY Mode'),
freestanding = Menu.FindVar('Aimbot', 'Anti Aim', 'Fake Angle', 'Freestanding Desync'),
desync_on_shot = Menu.FindVar('Aimbot', 'Anti Aim', 'Fake Angle', 'Desync On Shot'),
},
misc = {
slow_walk = Menu.FindVar('Aimbot', 'Anti Aim', 'Misc', 'Slow Walk'),
fake_duck = Menu.FindVar('Aimbot', 'Anti Aim', 'Misc', 'Fake Duck'),
},
},
},
visuals = {
view = {
camera = {
remove_scope = Menu.FindVar('Visuals', 'View', 'Camera', 'Remove Scope'),
},
thirdperson = {
toggle = Menu.FindVar('Visuals', 'View', 'Thirdperson', 'Enable Thirdperson'),
},
},
},
misc = {},
};
-- * enums (table)
local enums = {
yaw_base = {
forward = 0,
backward = 1,
right = 2,
left = 3,
at_targets = 4,
freestanding = 5,
},
yaw_modifier = {
disabled = 0,
center = 1,
offset = 2,
random = 3,
spin = 4,
},
conditions = {
shared = 0,
standing = 1,
running = 2,
walking = 3,
air = 4,
air_direction = 5,
crouch = 6,
on_use = 7,
manuals = 8,
},
team = {
NONE = 0,
SPEC = 1,
T = 2,
CT = 3,
},
-- * Source SDK
flags = {
FL_ONGROUND = bit.lshift(1, 0), -- * 1 << 0
FL_DUCKING = bit.lshift(1, 1), -- * 1 << 1
FL_ANIMDUCKING = bit.lshift(1, 2), -- * 1 << 2
FL_WATERJUMP = bit.lshift(1, 3), -- * 1 << 3
FL_ONTRAIN = bit.lshift(1, 4), -- * 1 << 4
FL_INRAIN = bit.lshift(1, 5), -- * 1 << 5
FL_FROZEN = bit.lshift(1, 6), -- * 1 << 6
FL_ATCONTROLS = bit.lshift(1, 7), -- * 1 << 7
FL_CLIENT = bit.lshift(1, 8), -- * 1 << 8
FL_FAKECLIENT = bit.lshift(1, 9), -- * 1 << 9
FL_INWATER = bit.lshift(1, 10), -- * 1 << 10
},
buttons = {
IN_ATTACK = bit.lshift(1, 0), -- * 1 << 0
IN_JUMP = bit.lshift(1, 1), -- * 1 << 1
IN_DUCK = bit.lshift(1, 2), -- * 1 << 2
IN_FORWARD = bit.lshift(1, 3), -- * 1 << 3
IN_BACK = bit.lshift(1, 4), -- * 1 << 4
IN_USE = bit.lshift(1, 5), -- * 1 << 5
IN_CANCEL = bit.lshift(1, 6), -- * 1 << 6
IN_LEFT = bit.lshift(1, 7), -- * 1 << 7
IN_RIGHT = bit.lshift(1, 8), -- * 1 << 8
IN_MOVELEFT = bit.lshift(1, 9), -- * 1 << 9
IN_MOVERIGHT = bit.lshift(1, 10), -- * 1 << 10
IN_ATTACK2 = bit.lshift(1, 11), -- * 1 << 11
IN_RUN = bit.lshift(1, 12), -- * 1 << 12
IN_RELOAD = bit.lshift(1, 13), -- * 1 << 13
IN_ALT1 = bit.lshift(1, 14), -- * 1 << 14
IN_ALT2 = bit.lshift(1, 15), -- * 1 << 15
IN_SCORE = bit.lshift(1, 16), -- * 1 << 16
IN_SPEED = bit.lshift(1, 17), -- * 1 << 17
IN_WALK = bit.lshift(1, 18), -- * 1 << 18
IN_ZOOM = bit.lshift(1, 19), -- * 1 << 19
IN_WEAPON1 = bit.lshift(1, 20), -- * 1 << 20
IN_WEAPON2 = bit.lshift(1, 21), -- * 1 << 21
IN_BULLRUSH = bit.lshift(1, 22), -- * 1 << 22
},
};
-- * stuff (table)
local stuff = {
anti_aim = {
jitter = nil,
roll = nil,
presets = {
luftwaffe = (function()
local conditions = {};
conditions[0] = {22, -15, 22};
conditions[1] = conditions[0];
conditions[2] = {20, -12, 48};
conditions[3] = {20, -12, 29};
conditions[4] = {-7, -12, 1};
conditions[5] = conditions[4];
conditions[6] = {20, -20, 29};
conditions[7] = conditions[0];
return conditions;
end)(),
},
conditions = {
[0] = 'Shared',
'Standing',
'Running',
'Walking',
'Air',
'Air + Direction',
'Crouch',
'On-Use'
},
conditions_type = {
[0] = '?',
'S',
'R',
'W',
'A',
'AD',
'C',
'U',
}
},
hitgroup_to_hitbox = {
0,
5,
2,
13,
14,
7,
8,
},
};
-- * ffi helper (qhouz's legendware library port to nevelose)
local g_helper = (function()
local data = {};
local NULL = ffi.new 'void*';
local interface = ffi.typeof 'void***';
local casts = {};
local is_valid_ptr = function(ptr)
if ptr == NULL then
return false;
end
return true;
end
local safe_cast = function(cast)
if casts[cast] ~= nil then
return casts[cast];
end
casts[cast] = ffi.typeof(cast);
if not is_valid_ptr(casts[cast]) then
error '[debug]{<safe cast>} cast type was invalid.';
end
return casts[cast];
end
data.vtable = (function()
local vtable = {};
vtable.tointerface = function(instance)
local interface_ptr = ffi.cast(interface, instance);
return interface_ptr;
end
vtable.entry = function(instance, index, cast)
local cast = safe_cast(cast);
local vtbl = instance[0];
if not is_valid_ptr(vtbl) then
error '[debug]{<vtable>} invalid vtbl. (1/3 progress)';
end
local fnptr = vtbl[index];
if not is_valid_ptr(fnptr) then
error '[debug]{<vtable>} invalid fnptr. (2/3 progress)';
end
local data = ffi.cast(cast, fnptr);
if not is_valid_ptr(data) then
error '[debug]{<vtable>} invalid data. (3/3 progress)';
end
return data;
end
vtable.thunk = function(index, cast)
return function(instance, ...)
local entry = vtable.entry(instance, index, cast);
return entry(...);
end
end
vtable.bind = function(instance, index, cast)
local entry = vtable.entry(instance, index, cast);
return function(...)
return entry(instance, ...);
end
end
return vtable;
end)();
data.hook = (function()
local vmt = (function()
local connected = {};
local vmt = {};
vmt.__index = vmt;
vmt.add = function(interface)
local module = {
interface = vtable.tointerface(interface)[0],
hooked = {},
};
setmetatable(module, vmt);
table.insert(connected, module);
return module;
end
vmt.replace_protect = function(self, index, hook)
local o_proc = ffi.new('dword[1]');
local address = data.vtable.tointerface(self.interface + index);
ffi.C.VirtualProtect(address, 4, 0x4, o_proc);
self.interface[index] = hook;
ffi.C.VirtualProtect(address, 4, o_proc[0], o_proc);
end
vmt.destroy = function(self, id)
local hook = self.hooked[id];
if hook == nil then
return false;
end
self:replace_protect(id, hook.address);
table.remove(self.hooked, id);
return true;
end
vmt.destroy_all = function(self)
for id, _ in pairs(self.hooked) do
self:destroy(id);
end
end
vmt.hook = function(self, index, cast, hook)
local protect = function(...)
local success, data = pcall(hook, ...);
if success then
return data;
end
self:destroy_all();
print(data);
end
local hooked = {};
hooked.address = self.interface[index];
hooked.fn = ffi.cast(cast, hooked.address);
hooked.hook = data.vtable.tointerface(ffi.cast(cast, protect));
table.insert(self.hooked, index, hooked);
self:replace_protect(index, hooked.hook);
return hooked.fn
end
vmt.self_destruct = function()
for _, hooks in pairs(connected) do
hooks:destroy_all();
end
end
return vmt;
end)()
return {
vmt = vmt,
};
end)();
data.module = (function()
local metatable = (function()
local class = {};
class.__index = class;
function class.create(ptr)
local mt = {};
mt.raw = ptr;
mt.interface = data.vtable.tointerface(mt.raw);
setmetatable(mt, class);
return mt;
end
function class:get_vfunc(index, cast)
return data.vtable.bind(self.interface, index, cast);
end
function class:cast(index, cast)
local cast = safe_cast(cast);
return data.vtable.entry(self.interface, index, cast);
end
function class:raw_cast(cast)
local cast = safe_cast(cast);
return ffi.cast(cast, self.raw);
end
return class;
end)();
return (function()
local get_class = function(instance)
return metatable.create(instance);
end
local pattern_scan = function(module, signature, offset)
local instance = Utils.PatternScan(module, signature, offset);
if not is_valid_ptr(instance) then
error '[debug]{<module>} cannot create interface.';
end
return get_class(instance);
end
local create_interface = function(module, interface, offset)
local instance = Utils.CreateInterface(module, interface, offset);
if not is_valid_ptr(instance) then
error '[debug]{<module>} cannot create interface.';
end
return get_class(instance);
end
return {
get_class = get_class,
pattern_scan = pattern_scan,
create_interface = create_interface,
};
end)()
end)();
return data;
end)();
-- * ffi stuff (library)
local g_ffi_stuff = (function()
local stuff = {};
stuff.modules = {
VGUI_System010 = g_helper.module.create_interface('vgui2.dll', 'VGUI_System010'),
IEngineSoundClient003 = g_helper.module.create_interface('engine.dll', 'IEngineSoundClient003'),
};
stuff.types = {
pvoid = ffi.typeof 'void***',
char = ffi.typeof 'char[?]',
};
stuff.data = {
VGUI_System010 = (function()
local get_clipboard_length = stuff.modules.VGUI_System010:get_vfunc(7, 'int(__thiscall*)(handle)');
local set_clipboard = stuff.modules.VGUI_System010:get_vfunc(9, 'handle(__thiscall*)(handle, lpcstr, int)');
local get_clipboard = stuff.modules.VGUI_System010:get_vfunc(11, 'handle(__thiscall*)(handle, int, lpcstr, int)');
return {
get_clipboard = function()
local length = get_clipboard_length();
if length <= 0 then
return '';
end
local buffer = stuff.types.char(length);
get_clipboard(0, buffer, length);
return ffi.string(buffer, length - 1);
end,
set_clipboard = function(text)
set_clipboard(text, #text);
end,
}
end)(),
IEngineSoundClient003 = {
EmitAmbientSound = stuff.modules.IEngineSoundClient003:get_vfunc(12, 'handle(__thiscall*)(handle, lpcstr, float, int, int, float)'),
},
};
return stuff;
end)();
-- * panorama (library)
local g_panorama = (function()
local interface = Panorama.Open();
local panorama = {};
panorama.open_link = interface.SteamOverlayAPI.OpenExternalBrowserURL;
panorama.json = Panorama.LoadString[[
return {
stringify: JSON.stringify,
parse: JSON.parse,
}
]]();
return panorama;
end)();
-- * image (library)
local g_image = (function()
local image = {};
image.png = {};
image.png.__index = image.png;
return image;
end)();
-- * math helper (library)
local g_math = (function()
local g_math = {};
g_math.round = function(value)
return math.floor(value + 0.5)
end
g_math.clamp = function(value, min, max)
if value < min then
return min;
end
if value > max then
return max;
end
return value;
end
g_math.lerp = function(value, goal, time, adaptive)
if value == nil then
return goal;
end
if type(time) ~= 'number' then
time = 0.095;
end
if adaptive == nil then
adaptive = true;
end
time = g_math.clamp(time, 0, 1);
if adaptive then
time = (GlobalVars.frametime * 175) * time;
end
local delta = (goal - value);
if type(delta) == 'number' then
if math.abs(delta) <= 0.05 then
return goal;
end
end
delta = delta * time + value;
return delta;
end
return g_math;
end)();
-- * fonts helper (library)
local g_fonts = (function()
local fonts = {};
local cache = {};
fonts.create_font = function(name, size, flags)
local bold, italic, noaa;
flags = flags or {};
for _, flag in pairs(flags) do
if flag == 'b' then
bold = true;
goto next;
end
if flag == 'i' then
italic = true;
goto next;
end
if flag == 'r' then
noaa = true;
goto next;
end
::next::
end
local key = ('name: [%s] size: [%i] flags: [%s, %s, %s]'):format(name, size, bold, italic, noaa);
if cache[key] ~= nil then
return cache[key];
end
cache[key] = Render.InitFont(name, size, flags);
return cache[key];
end
fonts.data = {};
fonts.data.Verdana = {
[10] = {
none = fonts.create_font('Verdana', 10),
},
[11] = {
r = fonts.create_font('Verdana', 11, {'r'}),
},
[12] = {
none = fonts.create_font('Verdana', 12),
},
[13] = {
none = fonts.create_font('Verdana', 13),
}
};
fonts.data.Tahoma = {
[11] = {
b = fonts.create_font('Tahoma', 11, {'b'}),
},
[14] = {
rb = fonts.create_font('Tahoma', 14, {'r', 'b'}),
},
[28] = {
b = fonts.create_font('Tahoma', 28, {'b'}),
}
}
fonts.data.SmallestPixel7 = {
[10] = {
none = fonts.create_font('Smallest Pixel-7', 10),
},
[12] = {
r = fonts.create_font('Smallest Pixel-7', 12, {'r'}),
}
};
return fonts;
end)();
-- * colors helper (library)
local g_colors = (function()
local colors = {};
colors.data = {
-- * RGB
red = Color.new(1.0, 0.0, 0.0),
green = Color.new(0.0, 1.0, 0.0),
blue = Color.new(0.0, 0.0, 1.0),
white = Color.new(1.0, 1.0, 1.0),
-- * CMYK
cyan = Color.new(0.0, 1.0, 1.0),
magenta = Color.new(1.0, 0.0, 1.0),
yellow = Color.new(1.0, 1.0, 0.0),
black = Color.new(0.05, 0.05, 0.05),
-- * CUSTOM
gray = Color.new(0.25, 0.25, 0.25),
orange = Color.new(1.0, 0.5, 0.0),
peach = Color.new(0.85, 0.45, 0.0),
violet = Color.new(0.825, 0.55, 0.9),
};
colors.copy = function(color)
return Color.new(color.r, color.g, color.b, color.a);
end
colors.lerp = function(color0, color1, time, adaptive)
local color = colors.copy(color0);
color.r = g_math.lerp(color.r, color1.r, time, adaptive);
color.g = g_math.lerp(color.g, color1.g, time, adaptive);
color.b = g_math.lerp(color.b, color1.b, time, adaptive);
color.a = g_math.lerp(color.a, color1.a, time, adaptive);
return color
end
colors.modify = function(color, func)
local r, g, b, a = color.r, color.g, color.b, color.a;
func(color);
color.r, color.g, color.b, color.a = r, g, b, a;
end
return colors
end)();
-- * engine (library)
local g_engine = (function()
local engine = {};
local data = {
local_time = {
timestamp = nil,
struct = ffi.new 'systemtime',
},
screen_size = {
timestamp = nil,
userdata = nil,
},
mouse_pos = {
timestamp = nil,
userdata = nil,
},
local_player = {
timestamp = nil,
userdata = nil,
idx = nil,
},
binds = {
timestamp = nil,
list = nil,
map = {},
},
};
engine.get_local_time = function()
if data.local_time.timestamp == GlobalVars.tickcount then
return data.local_time.struct;
end
data.local_time.timestamp = GlobalVars.tickcount;
ffi.C.GetLocalTime(data.local_time.struct);
return data.local_time.struct;
end
engine.get_screen_size = function()
if data.screen_size.timestamp == GlobalVars.tickcount then
return data.screen_size.userdata;
end
data.screen_size.timestamp = GlobalVars.tickcount;
data.screen_size.userdata = EngineClient.GetScreenSize();
return data.screen_size.userdata;
end
engine.get_mouse_pos = function()
if data.mouse_pos.timestamp == GlobalVars.tickcount then
return data.mouse_pos.userdata;
end
data.mouse_pos.timestamp = GlobalVars.tickcount;
data.mouse_pos.userdata = Cheat.GetMousePos();
return data.mouse_pos.userdata;
end
engine.is_lmb = function()
return Cheat.IsKeyDown(0x1);
end
engine.get_average = function(table)
local counter = 0;
for key, value in ipairs(table) do
counter = counter + value;
end
return counter / #table;
end
engine.get_local_player = function()
if data.local_player.timestamp == GlobalVars.tickcount then
return data.local_player.userdata;
end
data.local_player.timestamp = GlobalVars.tickcount;
data.local_player.userdata = EntityList.GetLocalPlayer();
data.local_player.idx = -1;
if data.local_player.userdata ~= nil then
data.local_player.idx = data.local_player.userdata:EntIndex();
end
return data.local_player.userdata;
end
engine.get_local_idx = function()
engine.get_local_player();
return data.local_player.idx;
end
engine.get_delta = function(absolute)
local real = AntiAim.GetCurrentRealRotation()
local fake = AntiAim.GetFakeRotation();
local max_delta = AntiAim.GetMaxDesyncDelta();
local min_delta = AntiAim.GetMinDesyncDelta();
local delta = real - fake;
delta = math.min(delta, max_delta);
delta = math.max(delta, min_delta);
if absolute then
return math.abs(delta);
end
return delta;
end
engine.get_condition = function(cmd)
local localplayer = engine.get_local_player();
if not localplayer or not localplayer:IsAlive() then
return enums.conditions.shared;
end
if bit.band(cmd.buttons, enums.buttons.IN_USE) ~= 0 then
return enums.conditions.on_use;
end
local velocity = localplayer:GetProp('m_vecVelocity');
local m_fFlags = localplayer:GetProp('m_fFlags');
local speed = velocity:Length2D();
local moving = speed > 5;
if bit.band(m_fFlags, enums.flags.FL_ONGROUND) == 0 then
if moving then
return enums.conditions.air_direction;
end
return enums.conditions.air;
end
if bit.band(m_fFlags, enums.flags.FL_DUCKING) ~= 0 then
return enums.conditions.crouch;
end
if moving then
if m_cheat_elements.aimbot.anti_aim.misc.slow_walk:Get() then
return enums.conditions.walking;
end
return enums.conditions.running;
end
return enums.conditions.standing;
end
engine.initialize_binds = function()
if data.binds.timestamp == GlobalVars.tickcount then
return data.binds.userdata;
end
data.binds.timestamp = GlobalVars.tickcount;
data.binds.list = Cheat.GetBinds();
data.binds.map = {};
for _, bind in pairs(data.binds.list) do
local name = bind:GetName();
data.binds.map[name] = {
active = bind:IsActive(),
value = bind:GetValue(),
mode = bind:GetMode(),
};
end
return data.binds.list;
end
engine.get_bind = function(name)
engine.initialize_binds();
if name == nil then
return data.binds.list;
end
return data.binds.map[name];
end
return engine
end)();
-- * callbacks (library)
local g_callbacks = (function()
local handlers = {};
local handles = {};
local handles_mt = {};
handles_mt.__index = handles_mt;
local force_update = function()
for callback_type, callback_t in pairs(handles) do
local _call = function(...)
for _, metadata in pairs(callback_t) do
if metadata.status == false then
goto continue;
end
metadata(...);
::continue::
end
end
Cheat.RegisterCallback(callback_type, _call);
end
end
handles_mt.__call = function(self, ...)
self.callback.fn(...);
end
handles_mt.start = function(self)
self.status = true;
force_update();
end
handles_mt.stop = function(self)
self.status = false;
force_update();
end
handlers.add_callback = function(callback_type, callback)
if handles[callback_type] == nil then
handles[callback_type] = {};
end
local metadata = {};
metadata.status = true;
metadata.self_destruct = nil;
metadata.callback = {
idx = #handles[callback_type],
type = callback_type,
fn = callback,
};
setmetatable(metadata, handles_mt);
table.insert(handles[callback_type], metadata);
force_update();
return metadata;
end
handlers.delay_call = function(wait_seconds, callback)
local time = GlobalVars.realtime;
local call;
call = handlers.add_callback('draw', function(...)
if GlobalVars.realtime - time < wait_seconds then
return;
end
callback(...);
call:stop()
call = nil;
end)
return call;
end
handlers.self_destruct = function()
for _, callback_t in pairs(handles) do
for _, metadata in pairs(callback_t) do
metadata:stop();
metadata = nil;
end
callback_t = nil;
end
end
return handlers;
end)();
-- * base64 (library)
local g_base64 = (function()
local base64 = {};
local extract = function(value, from, width)
return bit.band(bit.rshift(value, from), bit.lshift(1, width) - 1)
end
base64.create_encoder = function(alphabet)
local encoder, t_alphabet = {}, {};
for i = 1, #alphabet do
t_alphabet[i - 1] = alphabet:sub(i, i)
end
for base64code, char in pairs(t_alphabet) do
encoder[base64code] = char:byte()
end
return encoder
end
base64.create_decoder = function(alphabet)
local decoder = {};
local encoder = base64.create_encoder(alphabet);
for base64code, charcode in pairs(encoder) do
decoder[charcode] = base64code
end
return decoder
end
base64.encode = function(str, encoder, usecaching)
str = tostring(str)
local t, k, n = {}, 1, #str;
local lastn = n % 3;
local cache = {};
for i = 1, n - lastn, 3 do
local a, b, c = str:byte(i, i + 2)
local v = a * 0x10000 + b * 0x100 + c
local s
if usecaching then
s = cache[v]
if not s then
s = string.char(encoder[extract(v, 18, 6)], encoder[extract(v, 12, 6)], encoder[extract(v, 6, 6)], encoder[extract(v, 0, 6)])
cache[v] = s
end
else
s = string.char(encoder[extract(v, 18, 6)], encoder[extract(v, 12, 6)], encoder[extract(v, 6, 6)], encoder[extract(v, 0, 6)])
end
t[k] = s
k = k + 1
end
if lastn == 2 then
local a, b = str:byte(n - 1, n);
local v = a * 0x10000 + b * 0x100;
t[k] = string.char(encoder[extract(v, 18, 6)], encoder[extract(v, 12, 6)], encoder[extract(v, 6, 6)], encoder[64])
elseif lastn == 1 then
local v = str:byte(n) * 0x10000;
t[k] = string.char(encoder[extract(v, 18, 6)], encoder[extract(v, 12, 6)], encoder[64], encoder[64])
end
return table.concat(t)
end
base64.decode = function(base64, decoder, usecaching)
local pattern = '[^%w%+%/%=]';
if decoder then
local s62, s63
for charcode, b64code in pairs(decoder) do
if b64code == 62 then
s62 = charcode
elseif b64code == 63 then
s63 = charcode
end
end
pattern = ('[^%%w%%%s%%%s%%=]'):format(string.char(s62), string.char(s63))
end
base64 = base64:gsub(pattern, '')
local cache = usecaching and {};
local t, k = {}, 1;
local n = #base64;
local padding = base64:sub(-2) == "==" and 2 or base64:sub(-1) == "=" and 1 or 0
for i = 1, padding > 0 and n - 4 or n, 4 do
local a, b, c, d = base64:byte(i, i + 3);
local s;
if usecaching then
local v0 = a * 0x1000000 + b * 0x10000 + c * 0x100 + d
s = cache[v0]
if not s then
local v = decoder[a] * 0x40000 + decoder[b] * 0x1000 + decoder[c] * 0x40 + decoder[d]
s = string.char(extract(v, 16, 8), extract(v, 8, 8), extract(v, 0, 8))
cache[v0] = s
end
else
local v = decoder[a] * 0x40000 + decoder[b] * 0x1000 + decoder[c] * 0x40 + decoder[d]
s = string.char(extract(v, 16, 8), extract(v, 8, 8), extract(v, 0, 8))
end
t[k] = s
k = k + 1
end
if padding == 1 then
local a, b, c = base64:byte(n - 3, n - 1);
local v = decoder[a] * 0x40000 + decoder[b] * 0x1000 + decoder[c] * 0x40;
t[k] = string.char(extract(v, 16, 8), extract(v, 8, 8))
elseif padding == 2 then
local a, b = base64:byte(n - 3, n - 2);
local v = decoder[a] * 0x40000 + decoder[b] * 0x1000;
t[k] = string.char(extract(v, 16, 8))
end
return table.concat(t)
end
return base64
end)();
-- * menu handler (library)
local g_menu = (function()
local menu = {};
menu.stuff = {};
menu.stuff.list = {};
menu.stuff.get_t = {};
menu.stuff.elem_t = {};
menu.stuff.travels = {
general = _name:upper(),
global = 'Global',
anti_aim = 'Anti-Aim',
indicators = 'Indicators',
another = 'Another',
misc = 'Misc',
};
menu.force_update = function()
for _, tab in pairs(menu.stuff.elem_t) do
for _, element in pairs(tab) do
element.cheatvar:SetVisible(element.callback());
end
end
end
-- * config system
local g_config = (function()
local config = {};
local key = 'PN7cCxX23HphFVILgRM8TZOlotG9EfBm5Kurz6YnqJ10yibvkA4QDsweUWajSd+/=';
local encoder = g_base64.create_encoder(key);
local decoder = g_base64.create_decoder(key);
local color_t = {
write = function(color)
return {color.r, color.g, color.b, color.a};
end,
read = function(color)
return Color.new(unpack(color));
end,
}
config.export = function()
local status, message = pcall(function()
local items_t = {};
for tab, elems_t in pairs(menu.stuff.elem_t) do
items_t[tab] = {};
for name, elem_t in pairs(elems_t) do
local temp_t = {
value = elem_t.cheatvar:Get(),
};
if type(temp_t.value) == 'userdata' then
temp_t.color = color_t.write(temp_t.value);
temp_t.value = nil;
elseif elem_t.colored then
temp_t.color = color_t.write(elem_t.cheatvar:GetColor());
end
if temp_t.color == nil and temp_t.value == nil then
goto skip end
items_t[tab][name] = temp_t;
::skip::
end
end
local _json = g_panorama.json.stringify(items_t);
_json = g_base64.encode(_json, encoder);
g_ffi_stuff.data.VGUI_System010.set_clipboard(_json);
Cheat.AddNotify(_name, 'Config copied to clipboard.');
end)
if not status then
-- * debug
if _debug then
print('Failed to save config:', message);
end
Cheat.AddNotify(_name, 'Failed to save config!');
return
end
end
config.import = function(text)
local status, message = pcall(function()
local clipboard = g_ffi_stuff.data.VGUI_System010.get_clipboard();
if text ~= nil then
clipboard = text;
end
local _json = g_base64.decode(clipboard, decoder);
_json = g_panorama.json.parse(_json);
-- * debug
if _debug then
if _json == nil then
error('Wrong json!');
end
end
for tab, elems_t in pairs(_json) do
for name, elem_t in pairs(elems_t) do
if not menu.stuff.elem_t[tab][name] then
goto skip end
if elem_t.value ~= nil then
menu.stuff.elem_t[tab][name].cheatvar:Set(elem_t.value);
menu.stuff.get_t[tab][name] = elem_t.value;
end
if elem_t.color ~= nil then
local color_t = color_t.read(elem_t.color);
menu.stuff.elem_t[tab][name].cheatvar:SetColor(color_t);
end
::skip::
end
end
menu.force_update();
Cheat.AddNotify(_name, 'Config successfully loaded!')
end)
if not status then
-- * debug
if _debug then
print('Failed to load config:', message);
end
Cheat.AddNotify(_name, 'Failed to load config!');
return
end
end
return config;
end)();
menu.stuff.ui = {
controller = Menu.Combo(menu.stuff.travels.general, 'Select Tab', {'Waiting...'}, 0),
Menu.Text(menu.stuff.travels.general, ''),
config = {
import = Menu.Button(menu.stuff.travels.general, 'Import config from clipboard', '', function()
g_config.import();
end),
export = Menu.Button(menu.stuff.travels.general, 'Export config to clipboard', '', function()
g_config.export();
end),
default = Menu.Button(menu.stuff.travels.general, 'Load default config'),
},
Menu.Text(menu.stuff.travels.general, ''),
discord = Menu.Button(menu.stuff.travels.general, 'Open Discord Server', '', function()
g_panorama.open_link('https://discord.gg/ATDAKJ2KWa');
end),
};
menu.new = function(travel, name, cheatvar, colored, callback)
if colored == nil then
colored = false;
end
local colored_type = type(colored);
if colored_type ~= 'boolean' then
error(('Unable to create element with incorrect colored variable type. Current type is %s'):format(colored_type), 2);
end
if callback == nil then
callback = function(...)
return true;
end
end
if menu.stuff.elem_t[travel] == nil then
menu.stuff.elem_t[travel] = {};
menu.stuff.get_t[travel] = {};
table.insert(menu.stuff.list, travel);
menu.stuff.ui.controller:UpdateList(menu.stuff.list);
end
if menu.stuff.elem_t[travel][name] ~= nil then
error('Unable to create same element', 2)
end
menu.stuff.elem_t[travel][name] = {
cheatvar = cheatvar,
colored = colored,
callback = function()
return (travel == menu.stuff.current) and (callback() == true);
end,
}
local update = function(value)
menu.stuff.get_t[travel][name] = value;
menu.force_update();
end
cheatvar:RegisterCallback(update);
update(cheatvar:Get());
menu.stuff.current = menu.stuff.list[menu.stuff.ui.controller:Get() + 1];
menu.force_update();
return cheatvar;
end
menu.get_multi_combo = function(value, index)
if type(value) ~= 'number' then
value = value:Get();
end
if type(index) ~= 'number' then
error('Incorrect index type.', 2);
end
local mask = bit.lshift(1, index); -- 1 << index
return bit.band(value, mask) ~= 0
end
menu.set_multi_combo = function(value, index)
local bitwise = 0x0;
if type(index) ~= 'table' then
bitwise = index;
else
for _, value in pairs(index) do
local mask = bit.lshift(1, value); -- 1 << index
bitwise = bit.bor(bitwise, mask); -- bitwise | mask
end
end
if type(value) ~= 'number' then
value:Set(bitwise);
end
return bitwise;
end
menu.stuff.ui.controller:RegisterCallback(function(value)
menu.stuff.current = menu.stuff.list[value + 1];
menu.force_update();
end)
return menu;
end)();
-- * menu lua elements (library usage)
local m_lua_elements = {
[g_menu.stuff.travels.global] = {
toggle = g_menu.new(g_menu.stuff.travels.global, 'Global_Toggle', Menu.Switch(g_menu.stuff.travels.global, 'Enable Global', false)),
dormant_aimbot = {
enable = g_menu.new(g_menu.stuff.travels.global, 'DormantAimbot_Enable', Menu.Switch(g_menu.stuff.travels.global, 'Dormant Aimbot', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.global]['Global_Toggle'];
end),
amount = g_menu.new(g_menu.stuff.travels.global, 'DormantAimbot_Amount', Menu.SliderInt(g_menu.stuff.travels.global, 'Minimum Damage', 5, 0, 130), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.global]['Global_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.global]['DormantAimbot_Enable'];
end),
},
air_hitchance = {
enable = g_menu.new(g_menu.stuff.travels.global, 'AirHitchance_Enable', Menu.Switch(g_menu.stuff.travels.global, 'Air Hitchance', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.global]['Global_Toggle'];
end),
amount = g_menu.new(g_menu.stuff.travels.global, 'AirHitchance_Amount', Menu.SliderInt(g_menu.stuff.travels.global, 'Air Hitchance Value', 50, 0, 100), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.global]['Global_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.global]['AirHitchance_Enable'];
end),
},
noscope_hitchance = {
enable = g_menu.new(g_menu.stuff.travels.global, 'NSHitchance_Enable', Menu.Switch(g_menu.stuff.travels.global, 'NS Hitchance', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.global]['Global_Toggle'];
end),
amount = g_menu.new(g_menu.stuff.travels.global, 'NSHitchance_Amount', Menu.SliderInt(g_menu.stuff.travels.global, 'NS Hitchance Value', 50, 0, 100), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.global]['Global_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.global]['NSHitchance_Enable'];
end),
},
anti_exploit = g_menu.new(g_menu.stuff.travels.global, 'AntiExploit_Enable', Menu.Switch(g_menu.stuff.travels.global, 'Anti-Exploit', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.global]['Global_Toggle'];
end),
custom_dt_speed = {
enable = g_menu.new(g_menu.stuff.travels.global, 'CustomDTSpeed_Enable', Menu.Switch(g_menu.stuff.travels.global, 'Custom DT Speed', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.global]['Global_Toggle'];
end),
amount = g_menu.new(g_menu.stuff.travels.global, 'CustomDTSpeed_Amount', Menu.SliderInt(g_menu.stuff.travels.global, 'Shift Ticks Speed', 13, 4, 16), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.global]['Global_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.global]['CustomDTSpeed_Enable'];
end),
},
},
[g_menu.stuff.travels.anti_aim] = (function()
local manual_yaw_base = m_cheat_elements.aimbot.anti_aim.main.yaw_base:GetList();
table.insert(manual_yaw_base, 1, 'Disabled');
local roll_conditions = {unpack(stuff.anti_aim.conditions)};
table.insert(roll_conditions, 'Manuals');
local anti_aim = {};
anti_aim.toggle = g_menu.new(g_menu.stuff.travels.anti_aim, 'AntiAim_Toggle', Menu.Switch(g_menu.stuff.travels.anti_aim, 'Enable Anti-Aim', false));
anti_aim.type = g_menu.new(g_menu.stuff.travels.anti_aim, 'AntiAim_Type', Menu.Combo(g_menu.stuff.travels.anti_aim, 'Anti-Aim Type', {'Luftwaffe', 'Builder'}, 0), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'];
end);
anti_aim.extended_desync = g_menu.new(g_menu.stuff.travels.anti_aim, 'AntiAim_Extended_Desync', Menu.MultiCombo(g_menu.stuff.travels.anti_aim, 'Extended Desync', roll_conditions, 0), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'];
end);
anti_aim.manual_yaw_base = g_menu.new(g_menu.stuff.travels.anti_aim, 'AntiAim_ManualYawBase', Menu.Combo(g_menu.stuff.travels.anti_aim, 'Manual Yaw Base', manual_yaw_base, 0), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'];
end);
anti_aim.select = g_menu.new(g_menu.stuff.travels.anti_aim, 'AntiAim_Select', Menu.Combo(g_menu.stuff.travels.anti_aim, 'Condition', stuff.anti_aim.conditions, 0), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'];
end);
anti_aim.on_use = g_menu.new(g_menu.stuff.travels.anti_aim, 'AntiAim_On_Use', Menu.Switch(g_menu.stuff.travels.anti_aim, 'Anti-Aim On-Use', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'];
end);
anti_aim.on_use_mode = g_menu.new(g_menu.stuff.travels.anti_aim, 'AntiAim_On_Use_Mode', Menu.Combo(g_menu.stuff.travels.anti_aim, 'On-Use Mode', {'Static', 'Jitter'}, 0), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_On_Use'];
end);
anti_aim.edge_yaw = g_menu.new(g_menu.stuff.travels.anti_aim, 'AntiAim_Edge_Yaw', Menu.Switch(g_menu.stuff.travels.anti_aim, 'Edge Yaw', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'];
end);
anti_aim.avoid_backstab = g_menu.new(g_menu.stuff.travels.anti_aim, 'AntiAim_Avoid_Backstab', Menu.Switch(g_menu.stuff.travels.anti_aim, 'Avoid Backstab', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'];
end);
anti_aim.disable_on_warmup = g_menu.new(g_menu.stuff.travels.anti_aim, 'AntiAim_Disable_On_Warmup', Menu.Switch(g_menu.stuff.travels.anti_aim, 'Disable On Warmup', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'];
end);
local visibility = function(key)
if not g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'] then
return;
end
if g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Type'] ~= 1 then
return;
end
local select = g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Select'];
if not select then
return;
end
return select == key;
end
for key, value in pairs(stuff.anti_aim.conditions) do
local abbreviation = stuff.anti_aim.conditions_type[key];
anti_aim[value] = {};
if key ~= 0 then
anti_aim[value].override = g_menu.new(g_menu.stuff.travels.anti_aim, string.format('%s - Override', value), Menu.Switch(g_menu.stuff.travels.anti_aim, string.format('[%s] Override', abbreviation), false), false, function()
return visibility(key);
end);
end
anti_aim[value].yaw_base = g_menu.new(g_menu.stuff.travels.anti_aim, string.format('%s - Yaw Base', value), Menu.Combo(g_menu.stuff.travels.anti_aim, string.format('[%s] Yaw Base', abbreviation), m_cheat_elements.aimbot.anti_aim.main.yaw_base:GetList(), 0), false, function()
return visibility(key);
end);
anti_aim[value].left_yaw = g_menu.new(g_menu.stuff.travels.anti_aim, string.format('%s - Left Yaw Add', value), Menu.SliderInt(g_menu.stuff.travels.anti_aim, string.format('[%s] Left Yaw Add', abbreviation), 0, -180, 180), false, function()
return visibility(key);
end);
anti_aim[value].right_yaw = g_menu.new(g_menu.stuff.travels.anti_aim, string.format('%s - Right Yaw Add', value), Menu.SliderInt(g_menu.stuff.travels.anti_aim, string.format('[%s] Right Yaw Add', abbreviation), 0, -180, 180), false, function()
return visibility(key);
end);
anti_aim[value].yaw_modifier = g_menu.new(g_menu.stuff.travels.anti_aim, string.format('%s - Yaw Modifier', value), Menu.Combo(g_menu.stuff.travels.anti_aim, string.format('[%s] Yaw Modifier', abbreviation), m_cheat_elements.aimbot.anti_aim.main.yaw_modifier:GetList(), 0), false, function()
return visibility(key);
end);
anti_aim[value].modifier_degree = g_menu.new(g_menu.stuff.travels.anti_aim, string.format('%s - Modifier Degree', value), Menu.SliderInt(g_menu.stuff.travels.anti_aim, string.format('[%s] Modifier Degree', abbreviation), 0, -180, 180), false, function()
if g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim][string.format('%s - Yaw Modifier', value)] == 0 then
return;
end
return visibility(key);
end);
anti_aim[value].left_limit = g_menu.new(g_menu.stuff.travels.anti_aim, string.format('%s - Left Limit', value), Menu.SliderInt(g_menu.stuff.travels.anti_aim, string.format('[%s] Left Limit', abbreviation), 60, 0, 60), false, function()
return visibility(key);
end);
anti_aim[value].right_limit = g_menu.new(g_menu.stuff.travels.anti_aim, string.format('%s - Right Limit', value), Menu.SliderInt(g_menu.stuff.travels.anti_aim, string.format('[%s] Right Limit', abbreviation), 60, 0, 60), false, function()
return visibility(key);
end);
anti_aim[value].fake_options = g_menu.new(g_menu.stuff.travels.anti_aim, string.format('%s - Fake Options', value), Menu.MultiCombo(g_menu.stuff.travels.anti_aim, string.format('[%s] Fake Options', abbreviation), m_cheat_elements.aimbot.anti_aim.fake_angle.fake_options:GetList(), 0), false, function()
return visibility(key);
end);
anti_aim[value].lby_mode = g_menu.new(g_menu.stuff.travels.anti_aim, string.format('%s - LBY Mode', value), Menu.Combo(g_menu.stuff.travels.anti_aim, string.format('[%s] LBY Mode', abbreviation), m_cheat_elements.aimbot.anti_aim.fake_angle.lby_mode:GetList(), 0), false, function()
return visibility(key);
end);
anti_aim[value].freestanding = g_menu.new(g_menu.stuff.travels.anti_aim, string.format('%s - Freestanding Desync', value), Menu.Combo(g_menu.stuff.travels.anti_aim, string.format('[%s] Freestand Desync', abbreviation), m_cheat_elements.aimbot.anti_aim.fake_angle.freestanding:GetList(), 0), false, function()
return visibility(key);
end);
anti_aim[value].desync_on_shot = g_menu.new(g_menu.stuff.travels.anti_aim, string.format('%s - Desync On Shot', value), Menu.Combo(g_menu.stuff.travels.anti_aim, string.format('[%s] Desync On Shot', abbreviation), m_cheat_elements.aimbot.anti_aim.fake_angle.desync_on_shot:GetList(), 0), false, function()
return visibility(key);
end);
end
return anti_aim;
end)(),
[g_menu.stuff.travels.indicators] = {
toggle = g_menu.new(g_menu.stuff.travels.indicators, 'Indicators_Toggle', Menu.Switch(g_menu.stuff.travels.indicators, 'Enable Indicators', false)),
indicators_under_xhair = {
enable = g_menu.new(g_menu.stuff.travels.indicators, 'IndicatorsUnderXhair_Enable', Menu.Switch(g_menu.stuff.travels.indicators, 'Indicators under xhair', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'];
end),
type = g_menu.new(g_menu.stuff.travels.indicators, 'IndicatorsUnderXhair_Type', Menu.ComboColor(g_menu.stuff.travels.indicators, 'Indicators type', {'Classic', 'Alternative'}, 0, g_colors.data.peach), true, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Enable'];
end),
position = g_menu.new(g_menu.stuff.travels.indicators, 'IndicatorsUnderXhair_Position', Menu.Combo(g_menu.stuff.travels.indicators, 'Indicators position', {'Center', 'Right'}, 0), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Enable'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Type'] == 0;
end),
line = {
enable = g_menu.new(g_menu.stuff.travels.indicators, 'IndicatorsUnderXhair_Line', Menu.Switch(g_menu.stuff.travels.indicators, 'Indicators line', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Enable'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Type'] == 0;
end),
color0 = g_menu.new(g_menu.stuff.travels.indicators, 'IndicatorsUnderXhair_LineColor', Menu.ColorEdit(g_menu.stuff.travels.indicators, 'Line color', g_colors.data.peach), true, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Enable'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Type'] == 0 and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Line'];
end),
color1 = g_menu.new(g_menu.stuff.travels.indicators, 'IndicatorsUnderXhair_LineColor2', Menu.ColorEdit(g_menu.stuff.travels.indicators, 'Line color 2', Color.new(0, 0, 0, 0)), true, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Enable'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Type'] == 0 and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Line'];
end),
},
draw = g_menu.new(g_menu.stuff.travels.indicators, 'IndicatorsUnderXhair_Draw', Menu.MultiCombo(g_menu.stuff.travels.indicators, 'Indicators draw', {'Double tap', 'Hide shots', 'Minimum damage'}, 0), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Enable'];
end),
dt_inactive_color = g_menu.new(g_menu.stuff.travels.indicators, 'IndicatorsUnderXhair_DT_InActive_Color', Menu.ColorEdit(g_menu.stuff.travels.indicators, 'DT inactive color', Color.new(1.0, 0.5, 0.5)), true, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Enable'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Type'] == 1 and g_menu.get_multi_combo(g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Draw'], 0);
end),
},
manual_arrows = {
enable = g_menu.new(g_menu.stuff.travels.indicators, 'ManualArrows_Enable', Menu.SwitchColor(g_menu.stuff.travels.indicators, 'Manual Arrows', false, g_colors.data.white), true, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'];
end),
type = g_menu.new(g_menu.stuff.travels.indicators, 'ManualArrows_Type', Menu.Combo(g_menu.stuff.travels.indicators, 'Arrows type', {_name}, 0), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['ManualArrows_Enable'];
end),
offset = g_menu.new(g_menu.stuff.travels.indicators, 'ManualArrows_Offset', Menu.SliderInt(g_menu.stuff.travels.indicators, 'Arrows offset', 0, -40, 100), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['ManualArrows_Enable'];
end),
},
jesus_mode = g_menu.new(g_menu.stuff.travels.indicators, 'JesusMode_Enable', Menu.Switch(g_menu.stuff.travels.indicators, 'Jesus Mode', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'];
end),
velocity_indicator = g_menu.new(g_menu.stuff.travels.indicators, 'VelocityIndicator_Enable', Menu.Switch(g_menu.stuff.travels.another, 'Velocity Indicator', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'];
end),
custom_scope = {
enable = g_menu.new(g_menu.stuff.travels.indicators, 'CustomScope_Enable', Menu.Combo(g_menu.stuff.travels.another, 'Custom Scope', {'Disabled', 'Default', 'Inverted'}, 0), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'];
end),
color = g_menu.new(g_menu.stuff.travels.indicators, 'CustomScope_Color', Menu.ColorEdit(g_menu.stuff.travels.another, 'Color', g_colors.data.white), true, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['CustomScope_Enable'] ~= 0;
end),
gap = g_menu.new(g_menu.stuff.travels.indicators, 'CustomScope_Gap', Menu.SliderInt(g_menu.stuff.travels.another, 'Gap', 5, 0, 100), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['CustomScope_Enable'] ~= 0;
end),
size = g_menu.new(g_menu.stuff.travels.indicators, 'CustomScope_Size', Menu.SliderInt(g_menu.stuff.travels.another, 'Size', 55, 0, 500), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['CustomScope_Enable'] ~= 0;
end),
},
damage_marker = g_menu.new(g_menu.stuff.travels.indicators, 'DamageMarker_Enable', Menu.SwitchColor(g_menu.stuff.travels.another, 'Damage Marker', false, g_colors.data.white), true, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'];
end),
world_marker = g_menu.new(g_menu.stuff.travels.indicators, 'WorldMarker_Enable', Menu.SwitchColor(g_menu.stuff.travels.another, 'World Marker', false, g_colors.data.white), true, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'];
end),
hit_marker = g_menu.new(g_menu.stuff.travels.indicators, 'HitMarker_Enable', Menu.Switch(g_menu.stuff.travels.another, 'Hit Marker', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'];
end),
snaplines = g_menu.new(g_menu.stuff.travels.indicators, 'Snaplines_Enable', Menu.SwitchColor(g_menu.stuff.travels.another, 'Snaplines', false, g_colors.data.white), true, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'];
end),
flags = g_menu.new(g_menu.stuff.travels.indicators, 'Flags_Enable', Menu.Switch(g_menu.stuff.travels.another, 'Flags', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'];
end),
side_indicatiors = g_menu.new(g_menu.stuff.travels.indicators, 'SideIndicators_Enable', Menu.Switch(g_menu.stuff.travels.another, 'Side Indicators', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'];
end),
disable_3rd_preson_anim = g_menu.new(g_menu.stuff.travels.indicators, 'Disable_3rd_Person_Anim', Menu.Switch(g_menu.stuff.travels.another, 'Disable Thirdperson Animation', false, '', function(value)
Cheat.SetThirdPersonAnim(not value);
end), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'];
end),
},
[g_menu.stuff.travels.misc] = {
toggle = g_menu.new(g_menu.stuff.travels.misc, 'Misc_Toggle', Menu.Switch(g_menu.stuff.travels.misc, 'Enable Miscellaneous', false)),
windows = g_menu.new(g_menu.stuff.travels.misc, 'Windows_MultiCombo', Menu.MultiCombo(g_menu.stuff.travels.misc, 'Windows', {'Watermark', 'Keybinds', 'Spectators', 'Fake / LC indication', --[['Performance indication']]}, 0), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Misc_Toggle'];
end),
theme_style = g_menu.new(g_menu.stuff.travels.misc, 'WindowsStyle_Combo', Menu.Combo(g_menu.stuff.travels.misc, 'Theme style', {'Default', 'Fade', 'Gradient', 'Animated gradient', 'Custom gradient'}, 0), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Misc_Toggle'];
end),
theme_color = {
g_menu.new(g_menu.stuff.travels.misc, 'Theme_Color_1', Menu.ColorEdit(g_menu.stuff.travels.misc, 'Theme color', g_colors.data.peach), true, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Misc_Toggle'];
end),
g_menu.new(g_menu.stuff.travels.misc, 'Theme_Color_2', Menu.ColorEdit(g_menu.stuff.travels.misc, 'Theme color 2', g_colors.data.peach), true, function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Misc_Toggle'] then
return;
end
return g_menu.stuff.get_t[g_menu.stuff.travels.misc]['WindowsStyle_Combo'] == 4;
end),
g_menu.new(g_menu.stuff.travels.misc, 'Theme_Color_3', Menu.ColorEdit(g_menu.stuff.travels.misc, 'Theme color 3', g_colors.data.peach), true, function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Misc_Toggle'] then
return;
end
return g_menu.stuff.get_t[g_menu.stuff.travels.misc]['WindowsStyle_Combo'] == 4;
end),
},
box_alpha = g_menu.new(g_menu.stuff.travels.misc, 'Theme_Box_Alpha', Menu.SliderInt(g_menu.stuff.travels.misc, 'Box Alpha', 255, 0, 255), false, function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Misc_Toggle'] then
return;
end
return g_menu.stuff.get_t[g_menu.stuff.travels.misc]['WindowsStyle_Combo'] == 4;
end),
killsay = g_menu.new(g_menu.stuff.travels.misc, 'KillSay_Enable', Menu.Switch(g_menu.stuff.travels.misc, 'KillSay', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Misc_Toggle'];
end),
hitsound = {
enable = g_menu.new(g_menu.stuff.travels.misc, 'HitSound_Enable', Menu.Switch(g_menu.stuff.travels.misc, 'Hitsound', false), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Misc_Toggle'];
end),
amount = g_menu.new(g_menu.stuff.travels.misc, 'HitSound_Volume', Menu.SliderInt(g_menu.stuff.travels.misc, 'Volume', 100, 0, 100), false, function()
return g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Misc_Toggle'] and g_menu.stuff.get_t[g_menu.stuff.travels.misc]['HitSound_Enable'];
end),
},
},
};
-- * render (library)
local g_render = (function()
local render = {};
render.line = function(x0, y0, x1, x2, color, ...)
Render.Line(
Vector2.new(x0, y0),
Vector2.new(x1, x2),
color,
...
);
end;
render.polyline = function(color, ...)
local args = {...};
local length = #args;
if length % 2 ~= 0 then
error '[m_render] - Arguments are odd'
end
local polys = {};
for index = 1, length, 2 do
table.insert(
polys,
Vector2.new(
args[index],
args[index + 1]
)
)
end
Render.PolyLine(
color,
unpack(polys)
);
end;
render.polyfilled = function(color, ...)
local args = {...};
local length = #args;
if length % 2 ~= 0 then
error '[m_render] - Arguments are odd'
end
local polys = {};
for index = 1, length, 2 do
table.insert(
polys,
Vector2.new(
args[index],
args[index + 1]
)
)
end
Render.PolyFilled(
color,
unpack(polys)
);
end;
render.blur = function(x, y, w, h, color, ...)
Render.Blur(
Vector2.new(x, y),
Vector2.new(x + w, y + h),
color,
...
);
end;
render.filled_rect = function(x, y, w, h, color, ...)
Render.BoxFilled(
Vector2.new(x, y),
Vector2.new(x + w, y + h),
color,
...
);
end;
render.outline_rect = function(x, y, w, h, color, ...)
Render.Box(
Vector2.new(x, y),
Vector2.new(x + w, y + h),
color,
...
);
end
render.glow_rect = function(x, y, w, h, color, glow_amount, ...)
if glow_amount == nil then
error '[m_render] - Argument: glow_amount is nil';
end
if glow_amount <= 0 then
error '[m_render] - Argument: glow_amount is under or equals 0';
end
local alpha = color.a;
for radius = 1, glow_amount do
x = x - 1;
y = y - 1;
w = w + 2;
h = h + 2;
color.a = color.a * (1 - (radius / glow_amount));
render.outline_rect(x, y, w, h, color, ...);
end
color.a = alpha;
end
render.gradient_rect = function(x, y, w, h, color_0, color_1, horizontal, ...)
local top_left, top_right, bottom_left, bottom_right = color_0, color_0, color_1, color_1;
if horizontal then
top_right, bottom_left = bottom_left, top_right;
end
Render.GradientBoxFilled(
Vector2.new(x, y),
Vector2.new(x + w, y + h),
top_left,
top_right,
bottom_left,
bottom_right,
...
);
end
render.text = function(text, x, y, color, ...)
local position = Vector2.new(x, y);
Render.Text(text, position, color, ...);
end
render.calc_text_size = function(text, ...)
return Render.CalcTextSize(text, ...);
end
render.calc_multitext_size = function(data, ...)
local temp = Vector2.new(0, 0);
for key, value in ipairs(data) do
local size = render.calc_text_size(value.text, ...);
temp.x = temp.x + size.x;
if size.y > temp.y then
temp.y = size.y;
end
end
return temp;
end
render.multitext = function(data, x, y, ...)
local x, y = x, y;
local arguments = {...};
local custom_font = type(arguments[2]) ~= 'boolean';
local is_centered = arguments[custom_font and 4 or 3];
local size_arguments = arguments;
if #size_arguments > 2 then
size_arguments = {size_arguments[1], size_arguments[2]};
end
if is_centered then
table.remove(arguments, #arguments);
local size = render.calc_multitext_size(data, unpack(size_arguments));
x = x - size.x /2;
y = y - size.y /2;
end
for key, value in ipairs(data) do
render.text(value.text, x, y, value.color, unpack(arguments));
local size = Render.CalcTextSize(value.text, unpack(size_arguments));
x = x + size.x;
end
end
render.dropshadow_text = function(text, x, y, color, ...)
local position = Vector2.new(x, y);
local alpha = g_colors.data.black.a;
g_colors.data.black.a = alpha * color.a;
Render.Text(text, position + 1, g_colors.data.black, ...);
Render.Text(text, position, color, ...);
g_colors.data.black.a = alpha;
end
render.dropshadow_multitext = function(data, x, y, ...)
local x, y = x, y;
local arguments = {...};
local custom_font = type(arguments[2]) ~= 'boolean';
local is_centered = arguments[custom_font and 4 or 3];
local size_arguments = arguments;
if #size_arguments > 2 then
size_arguments = {size_arguments[1], size_arguments[2]};
end
if is_centered then
table.remove(arguments, #arguments);
local size = render.calc_multitext_size(data, unpack(size_arguments));
x = x - size.x /2;
y = y - size.y /2;
end
for key, value in ipairs(data) do
render.dropshadow_text(value.text, x, y, value.color, unpack(arguments));
local size = Render.CalcTextSize(value.text, unpack(size_arguments));
x = x + size.x;
end
end
render.circle = function(x, y, ...)
Render.Circle(Vector2.new(x, y), ...);
end
local sk33t = {
Color.new(0.0, 1.0, 1.0),
Color.new(1.0, 0.0, 1.0),
Color.new(1.0, 1.0, 0.0),
}
render.adaptive_box = function(x, y, w, h, options)
if options == nil then
options = {};
end
options.a = options.a or 1.0;
local theme = g_menu.stuff.get_t[g_menu.stuff.travels.misc]['WindowsStyle_Combo'];
local colors = {
g_menu.stuff.elem_t[g_menu.stuff.travels.misc]['Theme_Color_1'].cheatvar:Get(),
g_menu.stuff.elem_t[g_menu.stuff.travels.misc]['Theme_Color_2'].cheatvar:Get(),
g_menu.stuff.elem_t[g_menu.stuff.travels.misc]['Theme_Color_3'].cheatvar:Get(),
}
render.blur(x, y + 2, w, h - 2, g_colors.data.white);
g_colors.modify(g_colors.data.black, function(color)
color.a = colors[1].a * options.a;
if theme == 4 then
color.a = (g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Theme_Box_Alpha'] / 255) * options.a
end
render.filled_rect(x, y + 2, w, h - 2, color);
end)
g_colors.modify(colors[1], function(color)
if theme ~= 4 then
color.a = options.a;
end
local disable_glow = theme > 1;
if theme == 0 then
render.filled_rect(x, y, w, 2, color);
elseif theme == 1 then
local fade = g_colors.copy(color);
fade.a = 0;
render.gradient_rect(x, y, w / 2, 2, fade, color, true);
render.gradient_rect(x + w, y, -w / 2, 2, fade, color, true);
elseif theme == 2 then
local alpha = {
colors[1].a,
colors[2].a,
colors[3].a,
}
sk33t[1].a = alpha[1] * options.a;
sk33t[2].a = alpha[2] * options.a;
sk33t[3].a = alpha[3] * options.a;
render.gradient_rect(x, y, w / 2, 2, sk33t[1], sk33t[2], true);
render.gradient_rect(x + w, y, -w / 2, 2, sk33t[3], sk33t[2], true);
sk33t[1].a = alpha[1];
sk33t[2].a = alpha[2];
sk33t[3].a = alpha[3];
elseif theme == 3 then
local left = Color.HSLA(GlobalVars.realtime / 5 % 1, 1.0, 0.5, options.a);
local middle = Color.new(left.b, left.r, left.g, left.a);
local right = Color.new(left.g, left.b, left.r, left.a);
render.gradient_rect(x, y, w / 2, 2, left, middle, true);
render.gradient_rect(x + w, y, -w / 2, 2, right, middle, true);
elseif theme == 4 then
local alpha = {
colors[1].a,
colors[2].a,
colors[3].a,
}
colors[1].a = alpha[1] * options.a;
colors[2].a = alpha[2] * options.a;
colors[3].a = alpha[3] * options.a;
render.gradient_rect(x, y, w / 2, 2, colors[1], colors[2], true);
render.gradient_rect(x + w, y, -w / 2, 2, colors[3], colors[2], true);
colors[1].a = alpha[1];
colors[2].a = alpha[2];
colors[3].a = alpha[3];
end
if not disable_glow then
color.a = color.a / 5
render.glow_rect(x, y, w, h, color, 8);
end
end)
end
return render;
end)();
-- * draggable elements (library)
local g_drag = (function()
local screen = g_engine.get_screen_size();
local overlap;
local count = 0;
local drag_mt = {};
drag_mt.__index = drag_mt;
drag_mt.create = function(x, y, w, h)
local data = {};
local asis = {
x = ('%.f_x'):format(count),
y = ('%.f_y'):format(count),
}
data.ui_x = g_menu.new(g_menu.stuff.travels.indicators, asis.x, Menu.SliderInt(g_menu.stuff.travels.indicators, asis.x, 0, 0, screen.x), false, function()
return false;
end);
data.ui_y = g_menu.new(g_menu.stuff.travels.indicators, asis.y, Menu.SliderInt(g_menu.stuff.travels.indicators, asis.y, 0, 0, screen.y), false, function()
return false;
end);
data.default = {
x = g_menu.stuff.get_t[g_menu.stuff.travels.indicators][asis.x],
y = g_menu.stuff.get_t[g_menu.stuff.travels.indicators][asis.y],
w = w or 144,
h = h or 20,
}
data.x = data.default.x;
data.y = data.default.y;
data.w = data.default.w;
data.h = data.default.h;
data.alpha = 0.0;
data.focus = nil;
data.rendering = true;
data.dragging = true;
setmetatable(data, drag_mt);
count = count + 1;
return data;
end
drag_mt.drag = function(self, boolean)
if type(boolean) ~= 'boolean' then
return;
end
self.dragging = boolean;
end
drag_mt.draw = function(self, boolean)
if type(boolean) ~= 'boolean' then
return;
end
self.rendering = boolean;
end
drag_mt.move = function(self, x, y)
self.ui_x:Set(x);
self.ui_y:Set(y);
self.x = x;
self.y = y;
end
drag_mt.resize = function(self, w, h)
if w then
self.w = w;
end
if h then
self.h = h;
end
end
drag_mt.hovered = function(self)
local mouse = g_engine.get_mouse_pos();
if not mouse then
return false;
end
if mouse.x < self.x then
return false;
end
if mouse.y < self.y then
return false;
end
if mouse.x > self.x + self.w then
return false;
end
if mouse.y > self.y + self.h then
return false;
end
return true
end
drag_mt.interact = function(self)
if not Cheat.IsMenuVisible() then
return;
end
if not self.dragging then
return;
end
local mouse = g_engine.get_mouse_pos();
if g_engine.is_lmb() then
if self:hovered() and overlap == nil and self.focus == nil and self.hold == nil then
overlap = true;
self.focus = {
x = self.x - mouse.x,
y = self.y - mouse.y,
};
end
self.hold = true;
else
overlap = nil;
self.focus = nil;
self.hold = nil;
end
if self.focus == nil then
return;
end
self:move(self.focus.x + mouse.x, self.focus.y + mouse.y);
end
drag_mt.reset = function(self)
self.x = self.default.x;
self.y = self.default.y;
self.w = self.default.w;
self.h = self.default.h;
end
drag_mt.render = function(self, callback)
if callback == nil then
callback = function(...) end;
end
callback(self);
self:interact();
end
return drag_mt;
end)();
-- * all functions used
local g_functions = {
inair_hitchance = (function()
local hitchance_correction = g_callbacks.add_callback('prediction', function(cmd)
if not g_menu.stuff.get_t[g_menu.stuff.travels.global]['Global_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.global]['AirHitchance_Enable'] then
return;
end
local localplayer = g_engine.get_local_player();
if not localplayer then
return;
end
local m_fFlags = localplayer:GetProp('m_fFlags');
if bit.band(m_fFlags, enums.flags.FL_ONGROUND) ~= 0 then
return;
end
for ent_index = 1, 64 do
RageBot.OverrideHitchance(ent_index, g_menu.stuff.get_t[g_menu.stuff.travels.global]['AirHitchance_Amount']);
end
end)
end)(),
noscope_hitchance = (function()
local classes = {
[233] = true,
[242] = true,
[261] = true,
[267] = true,
};
local hitchance_correction = g_callbacks.add_callback('prediction', function(cmd)
if not g_menu.stuff.get_t[g_menu.stuff.travels.global]['Global_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.global]['NSHitchance_Enable'] then
return;
end
local localplayer = g_engine.get_local_player();
if not localplayer then
return;
end
if localplayer:GetProp('m_bIsScoped') then
return;
end
local c_basecombatweapon = localplayer:GetActiveWeapon();
if not c_basecombatweapon then
return;
end
if not classes[c_basecombatweapon:GetClassId()] then
return;
end
for ent_index = 1, 64 do
RageBot.OverrideHitchance(ent_index, g_menu.stuff.get_t[g_menu.stuff.travels.global]['NSHitchance_Amount']);
end
end)
end)(),
anti_exploit = (function()
local cvar = CVar.FindVar('cl_lagcompensation');
local disable_lag_comp = function(bool)
cvar:SetInt(bool and 0 or 1);
end
g_menu.stuff.elem_t[g_menu.stuff.travels.global]['AntiExploit_Enable'].cheatvar:RegisterCallback(function(value)
local localplayer = g_engine.get_local_player();
if not EngineClient.IsConnected() or not localplayer then
disable_lag_comp(value);
return;
end
local m_iTeamNum = localplayer:GetProp('m_iTeamNum');
if m_iTeamNum == 0 or m_iTeamNum == 1 then
disable_lag_comp(value);
return;
end
EngineClient.ExecuteClientCmd('spectate');
disable_lag_comp(value);
g_callbacks.delay_call(1, function()
EngineClient.ExecuteClientCmd('jointeam ' .. m_iTeamNum .. ' 1');
end);
end);
end)(),
custom_dt_speed = (function()
local cvar = CVar.FindVar('sv_maxusrcmdprocessticks');
local change_dt_speed = function(speed)
cvar:SetInt(math.max(16, speed + 2));
Exploits.OverrideDoubleTapSpeed(speed);
end
g_menu.stuff.elem_t[g_menu.stuff.travels.global]['CustomDTSpeed_Enable'].cheatvar:RegisterCallback(function(value)
if not value then
return;
end
change_dt_speed(13);
end);
local restore = g_callbacks.add_callback('destroy', function()
change_dt_speed(13);
end);
local dt_speed = g_callbacks.add_callback('prediction', function(cmd)
if not g_menu.stuff.get_t[g_menu.stuff.travels.global]['Global_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.global]['CustomDTSpeed_Enable'] then
return;
end
change_dt_speed(g_menu.stuff.get_t[g_menu.stuff.travels.global]['CustomDTSpeed_Amount']);
end);
end)(),
anti_aim = (function()
local flip = false;
local cache = {
yaw_base = nil,
yaw_modifier = nil,
modifier_degree = nil,
fake_options = nil,
lby_mode = nil,
freestanding = nil,
desync_on_shot = nil,
};
local restore = function()
if cache.yaw_base ~= nil then
m_cheat_elements.aimbot.anti_aim.main.yaw_base:Set(cache.yaw_base);
cache.yaw_base = nil;
end
if cache.yaw_add ~= nil then
m_cheat_elements.aimbot.anti_aim.main.yaw_add:Set(cache.yaw_add);
cache.yaw_add = nil;
end
if cache.yaw_modifier ~= nil then
m_cheat_elements.aimbot.anti_aim.main.yaw_modifier:Set(cache.yaw_modifier);
cache.yaw_modifier = nil;
end
if cache.modifier_degree ~= nil then
m_cheat_elements.aimbot.anti_aim.main.modifier_degree:Set(cache.modifier_degree);
cache.modifier_degree = nil;
end
if cache.fake_options ~= nil then
m_cheat_elements.aimbot.anti_aim.fake_angle.fake_options:Set(cache.fake_options);
cache.fake_options = nil;
end
if cache.lby_mode ~= nil then
m_cheat_elements.aimbot.anti_aim.fake_angle.lby_mode:Set(cache.lby_mode);
cache.lby_mode = nil;
end
if cache.freestanding ~= nil then
m_cheat_elements.aimbot.anti_aim.fake_angle.freestanding:Set(cache.freestanding);
cache.freestanding = nil;
end
if cache.desync_on_shot ~= nil then
m_cheat_elements.aimbot.anti_aim.fake_angle.desync_on_shot:Set(cache.desync_on_shot);
cache.desync_on_shot = nil;
end
end
local backup = function()
-- restore();
if cache.yaw_base == nil then
cache.yaw_base = m_cheat_elements.aimbot.anti_aim.main.yaw_base:Get();
end
if cache.yaw_add == nil then
cache.yaw_add = m_cheat_elements.aimbot.anti_aim.main.yaw_add:Get();
end
if cache.yaw_modifier == nil then
cache.yaw_modifier = m_cheat_elements.aimbot.anti_aim.main.yaw_modifier:Get();
end
if cache.modifier_degree == nil then
cache.modifier_degree = m_cheat_elements.aimbot.anti_aim.main.modifier_degree:Get();
end
if cache.fake_options == nil then
cache.fake_options = m_cheat_elements.aimbot.anti_aim.fake_angle.fake_options:Get();
end
if cache.lby_mode == nil then
cache.lby_mode = m_cheat_elements.aimbot.anti_aim.fake_angle.lby_mode:Get();
end
if cache.freestanding == nil then
cache.freestanding = m_cheat_elements.aimbot.anti_aim.fake_angle.freestanding:Get();
end
if cache.desync_on_shot == nil then
cache.desync_on_shot = m_cheat_elements.aimbot.anti_aim.fake_angle.desync_on_shot:Get();
end
end
backup();
g_menu.stuff.elem_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'].cheatvar:RegisterCallback(function(value)
local fn = (value and backup or restore);
fn();
end);
local destroy = g_callbacks.add_callback('destroy', restore);
local luftwaffe = g_callbacks.add_callback('pre_prediction', function(cmd)
stuff.anti_aim.jitter = nil;
if not g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'] then
return;
end
if g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Type'] ~= 0 then
return;
end
if stuff.anti_aim.on_use then
return;
end
backup();
local localplayer = g_engine.get_local_player();
if not localplayer and not localplayer:IsAlive() then
return;
end
local inverter = AntiAim.GetInverterState();
local condition = g_engine.get_condition(cmd);
local preset = stuff.anti_aim.presets.luftwaffe[condition];
if preset == nil then
return;
end
local jitter = preset[3] /2;
local yaw = inverter and preset[2] - jitter or preset[1] + jitter;
stuff.anti_aim.jitter = true;
AntiAim.OverridePitch(85);
AntiAim.OverrideLimit(60);
AntiAim.OverrideYawOffset(yaw);
if not stuff.anti_aim.roll then
AntiAim.OverrideInverter(flip);
end
m_cheat_elements.aimbot.anti_aim.main.yaw_base:Set(enums.yaw_base.at_targets);
m_cheat_elements.aimbot.anti_aim.main.yaw_add:Set(0);
m_cheat_elements.aimbot.anti_aim.main.yaw_modifier:Set(0);
m_cheat_elements.aimbot.anti_aim.main.modifier_degree:Set(0);
m_cheat_elements.aimbot.anti_aim.fake_angle.fake_options:Set(0);
end);
local builder = g_callbacks.add_callback('pre_prediction', function(cmd)
if not g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'] then
return;
end
if g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Type'] ~= 1 then
return;
end
backup();
local localplayer = g_engine.get_local_player();
if not localplayer and not localplayer:IsAlive() then
return;
end
local condition = g_engine.get_condition(cmd);
local condition_type = stuff.anti_aim.conditions[condition];
if not g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim][string.format('%s - Override', condition_type)] then
condition = 0;
condition_type = stuff.anti_aim.conditions[condition];
end
local inverter = AntiAim.GetInverterState();
m_cheat_elements.aimbot.anti_aim.main.yaw_base:Set(
g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim][string.format('%s - Yaw Base', condition_type)]
);
AntiAim.OverrideLimit(
g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim][string.format('%s - %s Limit', condition_type, inverter and 'Left' or 'Right')]
);
m_cheat_elements.aimbot.anti_aim.main.yaw_add:Set(
g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim][string.format('%s - %s Yaw Add', condition_type, inverter and 'Left' or 'Right')]
)
m_cheat_elements.aimbot.anti_aim.main.yaw_modifier:Set(
g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim][string.format('%s - Yaw Modifier', condition_type)]
);
m_cheat_elements.aimbot.anti_aim.main.modifier_degree:Set(
g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim][string.format('%s - Modifier Degree', condition_type)]
);
m_cheat_elements.aimbot.anti_aim.fake_angle.fake_options:Set(
g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim][string.format('%s - Fake Options', condition_type)]
);
m_cheat_elements.aimbot.anti_aim.fake_angle.lby_mode:Set(
g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim][string.format('%s - LBY Mode', condition_type)]
);
m_cheat_elements.aimbot.anti_aim.fake_angle.freestanding:Set(
g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim][string.format('%s - Freestanding Desync', condition_type)]
);
m_cheat_elements.aimbot.anti_aim.fake_angle.desync_on_shot:Set(
g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim][string.format('%s - Desync On Shot', condition_type)]
);
end);
g_callbacks.add_callback('createmove', function(cmd)
if ClientState.m_choked_commands == 0 then
flip = not flip;
end
end);
end)(),
anti_backstab = (function()
local calculating = g_callbacks.add_callback('pre_prediction', function(cmd)
if not g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Avoid_Backstab'] then
return;
end
local localplayer = g_engine.get_local_player();
if not localplayer and not localplayer:IsAlive() then
return;
end
local selfOrigin = localplayer:GetRenderOrigin();
local data = {
origin = nil,
distance = 150,
};
local player_list = EntityList.GetPlayers();
for ent_index, c_baseplayer in pairs(player_list) do
if c_baseplayer:IsTeamMate()
or c_baseplayer:IsDormant()
or not c_baseplayer:IsAlive() then
goto continue;
end
local c_basecombatweapon = c_baseplayer:GetActiveWeapon();
if not c_basecombatweapon or not c_basecombatweapon:IsKnife() then
goto continue;
end
local origin = c_baseplayer:GetRenderOrigin();
if not origin then
goto continue;
end
local distance = selfOrigin:DistTo(origin);
if distance < data.distance then
data.origin = origin;
data.distance = distance;
end
::continue::
end
if data.origin == nil then
return;
end
local camera = EngineClient.GetViewAngles();
local delta = data.origin - selfOrigin;
local angle = Cheat.VectorToAngle(delta);
angle:Normalize();
m_cheat_elements.aimbot.anti_aim.main.yaw_base:Set(enums.yaw_base.forward);
AntiAim.OverrideYawOffset(angle.yaw - camera.yaw)
end)
end)(),
manual_yaw_base = (function()
local pre_prediction = g_callbacks.add_callback('pre_prediction', function(cmd)
if not g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'] then
return;
end
local manual_yaw_base = g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_ManualYawBase'] - 1;
local condition = g_engine.get_condition(cmd);
if manual_yaw_base == -1 or (condition == enums.conditions.on_use) then
return;
end
m_cheat_elements.aimbot.anti_aim.main.yaw_base:Set(manual_yaw_base);
end)
end)(),
edge_yaw = (function()
local wall = 30;
local distance = math.huge;
local qangle = QAngle.new(0, 0, 0);
local calculating = g_callbacks.add_callback('pre_prediction', function(cmd)
if not g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Edge_Yaw'] then
return;
end
if stuff.anti_aim.on_use then
return;
end
if stuff.anti_aim.roll then
return;
end
local localplayer = g_engine.get_local_player();
if not localplayer and not localplayer:IsAlive() then
return;
end
local m_fFlags = localplayer:GetProp('m_fFlags');
if not m_fFlags then
return;
end
if bit.band(m_fFlags, enums.flags.FL_ONGROUND) == 0 then
return;
end
local eye_position = localplayer:GetEyePosition();
if not eye_position then
return;
end
local chest = localplayer:GetHitboxCenter(5);
if not chest then
return;
end
local yaw = -181;
local angle = QAngle.new(0, cmd.viewangles.yaw, 0);
angle:Normalize();
local step = 10;
for rotation = -180, 180, step do
local forward = Cheat.AngleToForward(angle);
local extend = eye_position + forward * 8192;
local wall_trace = EngineTrace.TraceRay(eye_position, extend, localplayer, 4009);
local glass_check = EngineTrace.TraceRay(eye_position, extend, localplayer, 2);
if wall_trace.fraction > glass_check.fraction then
break;
end
local extend = wall_trace.fraction * 8192;
if (distance == nil or extend < distance) and (extend < wall) then
distance = extend;
yaw = rotation + 12;
qangle = angle;
end
angle = angle + QAngle.new(0, step, 0);
angle:Normalize();
end
distance = nil;
local check_trace = EngineTrace.TraceRay(chest, chest + Cheat.AngleToForward(qangle) * 8192, localplayer, 4009);
local extend = check_trace.fraction * 8192;
if extend >= wall then
return;
end
m_cheat_elements.aimbot.anti_aim.main.yaw_base:Set(enums.yaw_base.at_targets);
AntiAim.OverrideYawOffset(yaw);
end)
end)(),
anti_aim_on_use = (function()
g_callbacks.add_callback('pre_prediction', function(cmd)
stuff.anti_aim.on_use = nil;
if not g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'] then
return;
end
local localplayer = g_engine.get_local_player();
if not localplayer and not localplayer:IsAlive() then
return;
end
local condition = g_engine.get_condition(cmd);
local on_use = (condition == enums.conditions.on_use);
if g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_On_Use'] then
local selfOrigin = localplayer:GetRenderOrigin();
local m_iTeamNum = localplayer:GetProp('m_iTeamNum');
if m_iTeamNum == enums.team.T then
local weapon_t = localplayer:GetActiveWeapon();
if not weapon_t then
return;
end
local weapon_class = weapon_t:GetClassName()
if weapon_class == 'CC4' then
if localplayer:GetProp('m_bInBombZone') then
return;
end
end
elseif m_iTeamNum == enums.team.CT then
local CPlantedC4 = EntityList.GetEntitiesByName('CPlantedC4');
if #CPlantedC4 > 0 then
local maxDistance = 999999;
for _, bomn in pairs(CPlantedC4) do
local bombOrigin = bomn:GetRenderOrigin();
local distance = bombOrigin:DistTo(selfOrigin);
if distance < maxDistance then
maxDistance = distance;
end
end
if maxDistance < 62 then
return;
end
end
end
local eye_position = localplayer:GetEyePosition();
local camera = EngineClient.GetViewAngles();
local forward = Cheat.AngleToForward(camera);
local trace_t = EngineTrace.TraceRay(eye_position, (eye_position + forward * 8192), localplayer, 0x4600400B);
if trace_t == nil then
return;
end
local entity_t = trace_t.hit_entity;
if trace_t.fraction < 1.0 and trace_t.hit_entity then
local entityOrigin = trace_t.hit_entity:GetRenderOrigin();
local distance = entityOrigin:DistTo(selfOrigin);
if distance < 135 then
local entity_class = entity_t:GetClassName();
if (entity_class ~= 'CWorld') and (entity_class ~= 'CFuncBrush') and (entity_class ~= 'CCSPlayer') then
return;
end
end
end
cmd.buttons = bit.band(cmd.buttons, bit.bnot(enums.buttons.IN_USE));
if on_use then
stuff.anti_aim.on_use = true;
m_cheat_elements.aimbot.anti_aim.main.yaw_base:Set(enums.yaw_base.forward);
m_cheat_elements.aimbot.anti_aim.fake_angle.fake_options:Set(2, g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_On_Use_Mode'] == 1);
AntiAim.OverridePitch(camera.pitch);
end
end
end)
end)(),
extended_desync = (function()
local AngleToForward = function(QAngle)
local forward, right = Vector.new(), Vector.new();
local pitch, yaw, roll = math.rad(QAngle.pitch), math.rad(QAngle.yaw), math.rad(QAngle.roll);
local cp, sp = math.cos(pitch), math.sin(pitch);
local cy, sy = math.cos(yaw), math.sin(yaw);
local cr, sr = math.cos(roll), math.sin(roll);
forward.x = cp * cy;
forward.y = cp * sy;
forward.z = -sp;
right.x = (-1 * sr * sp * cy) + (-1 * cr * -sy);
right.y = (-1 * sr * sp * sy) + (-1 * cr * cy);
right.z = -1 * sr * cp;
return forward, right;
end
g_callbacks.add_callback('prediction', function(cmd)
stuff.anti_aim.roll = nil;
if not g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Toggle'] then
return;
end
local bitwise = g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['AntiAim_Extended_Desync'];
local yaw_base = m_cheat_elements.aimbot.anti_aim.main.yaw_base:Get();
local condition = g_engine.get_condition(cmd);
if (yaw_base == enums.yaw_base.left) or (yaw_base == enums.yaw_base.right) then
condition = enums.conditions.manuals;
end
if not g_menu.get_multi_combo(bitwise, condition - 1) then
return;
end
local degree = 50;
if not AntiAim.GetInverterState() then
degree = -degree;
end
cmd.viewangles.roll = degree;
stuff.anti_aim.roll = true;
end);
g_callbacks.add_callback('create_move', function(cmd)
if not stuff.anti_aim.roll then
return;
end
local frL, riL = AngleToForward(QAngle.new(0, cmd.viewangles.yaw, 0));
local frC, riC = AngleToForward(cmd.viewangles);
frL.z = 0;
riL.z = 0;
frC.z = 0;
riC.z = 0;
frL = frL / frL:Length();
riL = riL / riL:Length();
frC = frC / frC:Length();
riC = riC / riC:Length();
local Move = Vector2.new(cmd.forwardmove, cmd.sidemove);
local Coord = (frL * Move.x) + (riL * Move.y);
cmd.sidemove = (frC.x * Coord.y - frC.y * Coord.x) / (riC.y * frC.x - riC.x * frC.y);
cmd.forwardmove = (riC.y * Coord.x - riC.x * Coord.y) / (riC.y * frC.x - riC.x * frC.y);
end)
end)(),
disable_on_warmup = (function()
local cache;
local backup = function()
if cache == nil then
cache = m_cheat_elements.aimbot.anti_aim.main.enable:Get();
end
end
local restore = function()
if cache ~= nil then
m_cheat_elements.aimbot.anti_aim.main.enable:Set(cache);
cache = nil;
end
end
backup();
g_menu.stuff.elem_t[g_menu.stuff.travels.anti_aim]['AntiAim_Disable_On_Warmup'].cheatvar:RegisterCallback(function(value)
if not value then
return restore();
end
return backup();
end);
g_callbacks.add_callback('destroy', restore);
g_callbacks.add_callback('prediction', function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.anti_aim]['Disable_On_Warmup'] then
return;
end
local gamerule = EntityList.GetGameRules();
if not gamerule then
return;
end
local m_bWarmupPeriod = gamerule:GetProp('m_bWarmupPeriod');
if not m_bWarmupPeriod then
return restore();
end
backup();
m_cheat_elements.aimbot.anti_aim.main.enable:Set(false);
end)
end)(),
windows = (function()
-- * global
local id;
local drags = {
keybinds = g_drag.create(0, 250),
spectators = g_drag.create(250, 250),
}
-- * watermark sector
local watermark_data = {
nickname = Cheat.GetCheatUserName(),
};
local watermark = g_callbacks.add_callback('draw', function()
id = 0;
if not g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Misc_Toggle'] then
return;
end
if not g_menu.get_multi_combo(g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Windows_MultiCombo'], 0) then
return;
end
local font_size, font = 11, g_fonts.data.Verdana[11].r;
local screen = g_engine.get_screen_size();
local time = g_engine.get_local_time();
local position = Vector2.new(screen.x - 10, 8 + 20 * id);
local text = {
_name:upper(),
watermark_data.nickname,
('%02d:%02d:%02d'):format(time.wHour, time.wMinute, time.wSecond),
}
if EngineClient.IsConnected() then
local inetchannel = EngineClient.GetNetChannelInfo();
if inetchannel then
table.insert(text, #text, string.format('delay: %.fms', inetchannel:GetLatency(0) * 1000));
table.insert(text, #text, string.format('%.ftick', 1 / GlobalVars.interval_per_tick));
end
end
text = table.concat(text, ' | ');
local text_size = g_render.calc_text_size(text, font_size, font)
local box_size = Vector2.new(text_size.x + 10.0, 20);
watermark_data.width = g_math.lerp(watermark_data.width, box_size.x);
position.x = position.x - watermark_data.width;
g_render.adaptive_box(position.x, position.y, watermark_data.width, box_size.y);
g_render.dropshadow_text(text, position.x + watermark_data.width /2, position.y + box_size.y /2 + 1, g_colors.data.white, font_size, font, false, true);
id = id + 1;
end);
-- * binds sector
local keybinds_data = {
gap = 17,
offset = {
x = 4,
y = 4,
},
anims = {},
};
local keybinds = g_callbacks.add_callback('draw', function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Misc_Toggle'] then
return;
end
if not g_menu.get_multi_combo(g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Windows_MultiCombo'], 1) then
return;
end
local font_size, font = 11, g_fonts.data.Verdana[11].r;
drags.keybinds:render(function(self)
local visible;
local count = 0;
local maxw = 144;
g_colors.modify(g_colors.data.white, function(color)
color.a = self.alpha;
g_render.adaptive_box(self.x, self.y, self.w, self.h, {a = self.alpha});
g_render.dropshadow_text('keybinds', self.x + self.w /2, self.y + self.h /2 + 1, color, font_size, font, false, true);
local binds = Cheat.GetBinds();
for index = #binds, 1, -1 do
local bind = binds[index];
local name = bind:GetName();
local value = '[' .. tostring(bind:GetValue()) .. ']';
local active = bind:IsActive();
if active then
visible = true;
end
keybinds_data.anims[name] = g_math.lerp(keybinds_data.anims[name], active and 1 or 0);
if keybinds_data.anims[name] == 0 then
goto continue;
end
local name_size = g_render.calc_text_size(name, font_size, font);
local value_size = g_render.calc_text_size(value, font_size, font);
-- g_render.blur(self.x, self.y + self.h + (count * keybinds_data.gap), self.w, keybinds_data.gap, color);
g_colors.modify(color, function(color)
color.a = keybinds_data.anims[name];
local x = self.x;
local y = self.y + self.h + keybinds_data.offset.y + (count * keybinds_data.gap);
g_render.dropshadow_text(name, x + keybinds_data.offset.x, y, color, font_size, font);
g_render.dropshadow_text(value, x + self.w - keybinds_data.offset.x - value_size.x, y, color, font_size, font);
end)
local width = name_size.x + value_size.x + (keybinds_data.offset.x * 2) + 10;
if width > maxw then
maxw = width;
end
count = count + 1
::continue::
end
end);
self.alpha = g_math.lerp(self.alpha, (visible or Cheat.IsMenuVisible()) and 1 or 0);
self.w = maxw;
end)
end)
-- * spectators sector
local spectators_data = {
gap = 17,
offset = {
x = 4,
y = 4,
},
anims = {},
};
local spectators = g_callbacks.add_callback('draw', function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Misc_Toggle'] then
return;
end
if not g_menu.get_multi_combo(g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Windows_MultiCombo'], 2) then
return;
end
local font_size, font = 11, g_fonts.data.Verdana[11].r;
drags.spectators:render(function(self)
local visible;
local count = 0;
local maxw = 144;
g_colors.modify(g_colors.data.white, function(color)
color.a = self.alpha;
g_render.adaptive_box(self.x, self.y, self.w, self.h, {a = self.alpha});
g_render.dropshadow_text('spectators', self.x + self.w /2, self.y + self.h /2 + 1, color, font_size, font, false, true);
-- local binds = Cheat.GetBinds();
-- for index = #binds, 1, -1 do
-- local bind = binds[index];
-- local name = bind:GetName();
-- local value = '[' .. tostring(bind:GetValue()) .. ']';
-- local active = bind:IsActive();
-- if active then
-- visible = true;
-- end
-- spectators_data.anims[name] = g_math.lerp(spectators_data.anims[name], active and 1 or 0);
-- if spectators_data.anims[name] == 0 then
-- goto continue;
-- end
-- local name_size = g_render.calc_text_size(name, font_size, font);
-- local value_size = g_render.calc_text_size(value, font_size, font);
-- g_render.blur(self.x, self.y + self.h + (count * spectators_data.gap), self.w, spectators_data.gap, color);
-- g_colors.modify(color, {a = spectators_data.anims[name]}, function(color)
-- local x = self.x;
-- local y = self.y + self.h + spectators_data.offset.y + (count * spectators_data.gap);
-- g_render.dropshadow_text(name, x + spectators_data.offset.x, y, color, font_size, font);
-- g_render.dropshadow_text(value, x + self.w - spectators_data.offset.x - value_size.x, y, color, font_size, font);
-- end)
-- local width = name_size.x + value_size.x + (spectators_data.offset.x * 2) + 10;
-- if width > maxw then
-- maxw = width;
-- end
-- count = count + 1
-- ::continue::
-- end
end);
self.alpha = g_math.lerp(self.alpha, (visible or Cheat.IsMenuVisible()) and 1 or 0);
self.w = maxw;
end)
end)
local fakelag = {
last = 0,
cur = 0,
}
local fl_ind = {
modifier = 0,
shifting = {
alpha = 0,
},
dst = {
records = {},
current = 0,
value = 0,
origin = nil,
},
}
local fakelag_calc = g_callbacks.add_callback('createmove', function()
local choke = ClientState.m_choked_commands;
if choke == 0 then
fakelag.last = fakelag.cur;
end
fakelag.cur = choke;
local localplayer = g_engine.get_local_player();
local origin = localplayer:GetProp('m_vecOrigin');
if fl_ind.dst.origin == nil then
fl_ind.dst.origin = origin;
end
if not FakeLag.Choking() then
local different = math.abs((fl_ind.dst.origin - origin):Length2D())
table.insert(fl_ind.dst.records, different);
fl_ind.dst.current = different;
fl_ind.dst.value = g_engine.get_average(fl_ind.dst.records);
fl_ind.dst.origin = origin;
end
if #fl_ind.dst.records > 8 then
table.remove(fl_ind.dst.records, 1);
end
end);
local fake_fl = g_callbacks.add_callback('draw', function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Misc_Toggle'] then
return;
end
if not g_menu.get_multi_combo(g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Windows_MultiCombo'], 3) then
return;
end
local font_size, font = 11, g_fonts.data.Verdana[11].r;
local screen = g_engine.get_screen_size();
local position = Vector2.new(screen.x - 10, 8 + 25 * id);
-- * fakelag
local text = ('FL: %.f'):format(fakelag.last);
local text_size = g_render.calc_text_size(text, font_size, font)
local box_size = Vector2.new(text_size.x + 10.0, 18);
fl_ind.dst.alpha = g_math.lerp(fl_ind.dst.alpha, (fl_ind.dst.value > 40) and 1 or 0, 0.075);
fl_ind.shifting.alpha = g_math.lerp(fl_ind.shifting.alpha, (fl_ind.dst.alpha == 0 and Exploits.GetCharge() == 1) and 1 or 0, 0.075);
position.x = position.x - box_size.x;
local fade = g_colors.copy(g_colors.data.white);
fade.a = 0;
local modifier, alpha;
if fl_ind.shifting.alpha ~= 0 then
modifier = ' | SHIFTING';
alpha = fl_ind.shifting.alpha;
elseif fl_ind.dst.alpha ~= 0 then
modifier = ' | dst:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20';
alpha = fl_ind.dst.alpha;
end
if modifier and alpha then
local modifier_size = g_render.calc_text_size(modifier, font_size, font);
box_size.x = box_size.x + (modifier_size.x * alpha);
position.x = position.x - (modifier_size.x * alpha);
end
local gradient = g_colors.lerp(g_colors.data.white, g_colors.data.orange, fl_ind.shifting.alpha, false);
local g_fade = g_colors.copy(gradient);
g_fade.a = 0
g_render.gradient_rect(position.x, position.y + box_size.y, box_size.x / 2, -1, g_fade, gradient, true);
g_render.gradient_rect(position.x + box_size.x, position.y + box_size.y, - box_size.x / 2, -1, g_fade, gradient, true);
g_render.dropshadow_text(text, position.x + 5, position.y + box_size.y /2 - text_size.y /2, g_colors.data.white, font_size, font);
if modifier and alpha then
g_colors.modify(g_colors.data.white, function(color)
color.a = color.a * alpha;
g_render.dropshadow_text(modifier:sub(1, #modifier * alpha), position.x + text_size.x + 5, position.y + box_size.y /2 - text_size.y /2, color, font_size, font);
end);
end
if fl_ind.dst.alpha ~= 0 then
local color = g_menu.stuff.elem_t[g_menu.stuff.travels.misc]['Theme_Color_1'].cheatvar:Get();
local fade = g_colors.copy(color);
fade.a = 0
g_colors.modify(color, function(color)
color.a = fl_ind.dst.alpha;
g_render.gradient_rect(position.x + 5 + box_size.x - 35, position.y + 6, fl_ind.dst.current / 2.5, 7, color, fade, true);
end)
end
position.x = position.x - 5;
-- * fake
local delta = g_engine.get_delta(true);
local text = ('FAKE (%.1f°)'):format(delta);
local text_size = g_render.calc_text_size(text, font_size, font)
local box_size = Vector2.new(text_size.x + 10.0, 18);
position.x = position.x - box_size.x;
local fade = g_colors.copy(g_colors.data.black);
fade.a = 0;
g_render.gradient_rect(position.x, position.y, box_size.x / 2, box_size.y, fade, g_colors.data.black, true);
g_render.gradient_rect(position.x + box_size.x, position.y, - box_size.x / 2, box_size.y, fade, g_colors.data.black, true);
delta = delta / AntiAim.GetMaxDesyncDelta();
local color = Color.new(1 - delta, delta, 0);
local fade = g_colors.copy(color);
fade.a = 0
g_render.gradient_rect(position.x - 2, position.y, 2, box_size.y /2, fade, color, false);
g_render.gradient_rect(position.x - 2, position.y + box_size.y, 2, - box_size.y /2, fade, color, false);
g_render.dropshadow_text(text, position.x + box_size.x /2, position.y + box_size.y /2, g_colors.data.white, font_size, font, false, true);
id = id + 1
end);
end)(),
indicators_under_xhair = (function()
local color = g_menu.stuff.elem_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Type'].cheatvar:GetColor();
local colors = {
left = Color.new(1.0, 1.0, 1.0),
right = Color.new(1.0, 1.0, 1.0),
};
local data = {
circle = {
radius = 4.5,
thinkness = 1.5,
offset = 1.75,
},
offset = {
classic = {
x = 0,
y = 12,
},
alternative = {
x = 0,
y = 11,
},
},
bindings = {
alternative = {
{
text = 'DMG',
alpha = 0,
active = function()
if not g_menu.get_multi_combo(g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Draw'], 2) then
return;
end
local bind = g_engine.get_bind('Minimum Damage');
if not bind then
return;
end
return bind.active;
end
},
{
text = 'HS',
alpha = 0,
active = function()
if not g_menu.get_multi_combo(g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Draw'], 1) then
return;
end
return m_cheat_elements.aimbot.ragebot.exploits.hideshots:Get();
end
},
{
text = 'DT',
alpha = 0,
colored = function()
if Exploits.GetCharge() ~= 1 then
return g_menu.stuff.elem_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_DT_InActive_Color'].cheatvar:Get();
end
end,
active = function()
if not g_menu.get_multi_combo(g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Draw'], 0) then
return;
end
return m_cheat_elements.aimbot.ragebot.exploits.doubletap:Get();
end
},
},
},
}
local classic = g_callbacks.add_callback('draw', function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Enable'] then
return;
end
if g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Type'] ~= 0 then
return;
end
local font_size, font = 13, g_fonts.data.Verdana[13].none;
local centered = g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Position'] == 0
local localplayer = g_engine.get_local_player();
if not localplayer then
return;
end
if not localplayer:IsAlive() then
return;
end
local screen = g_engine.get_screen_size();
if g_menu.get_multi_combo(g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Draw'], 2) then
local value = m_cheat_elements.aimbot.ragebot.accuracy.minimum_damage:Get();
g_render.dropshadow_text(tostring(value), screen.x /2 + 25, screen.y /2 - 25, g_colors.data.white, font_size, font);
end
local position = Vector2.new(screen.x /2, screen.y /2 + 30);
g_render.dropshadow_text(_name:upper(), position.x, position.y, color, font_size, font, false, centered);
position.y = position.y + data.offset.classic.y;
if g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Line'] then
local color0 = g_menu.stuff.elem_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_LineColor'].cheatvar:GetColor();
local color1 = g_menu.stuff.elem_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_LineColor2'].cheatvar:GetColor();
local delta = g_engine.get_delta(true) / 58;
g_render.gradient_rect(position.x, position.y - data.offset.classic.y /2 + 1, -delta * 35, 2, color0, color1, true);
g_render.gradient_rect(position.x, position.y - data.offset.classic.y /2 + 1, delta * 35, 2, color0, color1, true);
position.y = position.y + 5;
end
local text, color = 'DEFAULT', g_colors.data.violet;
local yaw_base = m_cheat_elements.aimbot.anti_aim.main.yaw_base:Get();
if yaw_base == enums.yaw_base.at_targets then
text = 'DYNAMIC';
end
if stuff.anti_aim.jitter then
text = 'JITTER';
end
if yaw_base == enums.yaw_base.freestanding then
text = 'FREESTAND';
end
if stuff.anti_aim.roll then
text = 'ROLL';
end
if text == 'DEFAULT' then
color = g_colors.data.red;
end
g_render.dropshadow_text(text, position.x, position.y, color, font_size, font, false, centered);
position.y = position.y + data.offset.classic.y;
local bitwise = g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Draw'];
local doubletap = m_cheat_elements.aimbot.ragebot.exploits.doubletap:Get() and g_menu.get_multi_combo(bitwise, 0);
local hideshots = m_cheat_elements.aimbot.ragebot.exploits.hideshots:Get() and g_menu.get_multi_combo(bitwise, 1);
if doubletap then
local exploit = Exploits.GetCharge();
g_colors.modify(g_colors.data.green, function(color)
color.r, color.g = 1 - exploit, exploit
local x_offset = 0;
local y_offset = 0;
if not centered then
x_offset = x_offset + ((data.circle.radius * data.circle.offset) + 5) * exploit;
else
x_offset = x_offset + (data.circle.radius * data.circle.offset) * exploit;
end
g_render.dropshadow_text('DT', position.x + x_offset, position.y + y_offset, color, font_size, font, false, centered);
local x_offset = 0;
local y_offset = 0;
if not centered then
x_offset = x_offset + data.circle.radius;
y_offset = y_offset + data.circle.radius + 2;
else
x_offset = x_offset - (data.circle.radius * data.circle.offset);
end
g_render.circle(position.x + x_offset, position.y + y_offset, data.circle.radius, 10, color, data.circle.thinkness, 0, 360 * exploit)
position.y = position.y + data.offset.classic.y;
end)
else
if hideshots then
g_render.dropshadow_text('AA', position.x, position.y, g_colors.data.violet, font_size, font, false, centered);
position.y = position.y + data.offset.classic.y;
end
end
end);
local title = {};
title.name = _name .. '°';
title.length = #title.name;
title.left = title.name:sub(1, math.floor(title.length /2));
title.right = title.name:sub(#title.left + 1, title.length);
local alternative = g_callbacks.add_callback('draw', function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Enable'] then
return;
end
if g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['IndicatorsUnderXhair_Type'] ~= 1 then
return;
end
local localplayer = g_engine.get_local_player();
if not localplayer then
return;
end
if not localplayer:IsAlive() then
return;
end
local font_size, font = 14, g_fonts.data.Tahoma[14].rb;
local screen = g_engine.get_screen_size();
local position = Vector2.new(screen.x /2, screen.y /2 + 33);
local inverter = AntiAim.GetInverterState();
colors.left = g_colors.lerp(colors.left, inverter and g_colors.data.white or color);
colors.right = g_colors.lerp(colors.right, inverter and color or g_colors.data.white);
g_render.multitext({
{text = title.left, color = colors.left},
{text = title.right, color = colors.right},
}, position.x + 4, position.y, font_size, font, true, true);
position.y = position.y + data.offset.alternative.y;
font_size, font = 12, g_fonts.data.SmallestPixel7[12].r;
local text = 'DEFAULT';
local yaw_base = m_cheat_elements.aimbot.anti_aim.main.yaw_base:Get();
if yaw_base == enums.yaw_base.at_targets then
text = 'DYNAMIC';
end
if stuff.anti_aim.jitter then
text = 'JITTER';
end
if yaw_base == enums.yaw_base.freestanding then
text = 'FREESTAND';
end
if stuff.anti_aim.roll then
text = 'ROLL';
end
g_render.text(text, position.x, position.y + 1, g_colors.data.white, font_size, font, true, true)
position.y = position.y + data.offset.alternative.y;
for key, value in pairs(data.bindings.alternative) do
value.alpha = g_math.lerp(value.alpha, value.active() and 1 or 0);
if value.alpha == 0 then
goto continue;
end
local _color = color;
if value.colored ~= nil then
local result = value.colored();
if result ~= nil then
_color = result;
end
end
g_colors.modify(_color, function(color)
color.a = color.a * value.alpha;
g_render.text(value.text, position.x, position.y, color, font_size, font, true, true)
position.y = position.y + (data.offset.alternative.y * value.alpha);
end);
::continue::
end
end);
end)(),
manual_arrows = (function()
local draw = g_callbacks.add_callback('draw', function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['ManualArrows_Enable'] then
return;
end
local engine = g_engine.get_screen_size() /2;
local x, y = engine.x, engine.y;
local yaw_base = m_cheat_elements.aimbot.anti_aim.main.yaw_base:Get();
local color = g_menu.stuff.elem_t[g_menu.stuff.travels.indicators]['ManualArrows_Enable'].cheatvar:GetColor();
local mode = g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['ManualArrows_Type'];
local offset = 66 + g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['ManualArrows_Offset'];
if mode == 0 then
local size = 1.0;
if yaw_base == enums.yaw_base.left then
local x = x - offset;
g_render.polyline(color, x, y, x + 5 * size, y + 10 * size, x - 15 * size, y, x + 5 * size, y - 10 * size, x, y);
g_render.polyfilled(color, x, y, x + 5 * size, y + 10 * size, x - 15 * size, y);
end
if yaw_base == enums.yaw_base.right then
local x = x + offset;
g_render.polyline(color, x, y, x - 5 * size, y + 10 * size, x + 15 * size, y, x - 5 * size, y - 10 * size, x, y);
g_render.polyfilled(color, x, y, x - 5 * size, y + 10 * size, x + 15 * size, y);
end
end
end)
end)(),
jesus_mode = (function()
local draw = g_callbacks.add_callback('draw', function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['JesusMode_Enable'] then
return;
end
if not m_cheat_elements.visuals.view.thirdperson.toggle:Get() then
return;
end
local localplayer = g_engine.get_local_player();
if not localplayer then
return;
end
if not localplayer:IsAlive() then
return;
end
local head = localplayer:GetHitboxCenter(0);
if not head then
return;
end
head.z = head.z + 7;
Render.Circle3D(head, 18, 5.0, g_colors.data.yellow);
end);
end)(),
flags = (function()
local drag = g_drag.create(250, 250);
local font_size, font = 12, g_fonts.data.Verdana[12].none;
local draw = g_callbacks.add_callback('draw', function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Flags_Enable'] then
return;
end
drag:render(function(self)
if Cheat.IsMenuVisible() then
g_render.outline_rect(self.x, self.y, self.w, self.h, g_colors.data.white);
end
local text = '$ TORETTO YAW $';
local text_size = g_render.calc_text_size(text, font_size, font);
g_render.text(text, self.x + self.w / 2 - text_size.x / 2, self.y + 20 - text_size.y /2, g_colors.data.white, font_size, font, true);
local text = 'STAY GODELESS';
local text_size = g_render.calc_text_size(text, font_size, font);
g_render.text(text, self.x + self.w / 2 - text_size.x / 2, self.y + self.h - 20 - text_size.y /2, g_colors.data.white, font_size, font, true);
local gap = 55;
local box_size = {
x = self.w * 0.625,
y = 8,
};
local flags = {
{text = 'FAKE:', amount = g_engine.get_delta(true) / 58},
{text = 'FL:', amount = math.min(ClientState.m_choked_commands, 14) /14},
-- {text = 'TEST:', amount = 0.0},
};
local center = {
x = self.x + self.w / 2,
y = self.y + self.h / 2,
};
local length = #flags;
for index, value in pairs(flags) do
local index = index - 1;
local text_size = g_render.calc_text_size(value.text, font_size, font);
local x = self.x + 10;
local y = center.y + (index / length) * gap - (gap / length) + text_size.y /2;
g_render.text(value.text, x, y, g_colors.data.white, font_size, font, true);
g_render.filled_rect(center.x - box_size.x /2, y + 2, box_size.x, box_size.y, g_colors.data.black);
g_render.gradient_rect(center.x - box_size.x /2, y + 2, box_size.x * value.amount, box_size.y, g_colors.data.black, g_colors.data.gray, true);
g_render.outline_rect(center.x - box_size.x /2, y + 2, box_size.x, box_size.y, g_colors.data.black);
end
self.w = 250;
self.h = self.w /2;
end)
end);
end)(),
snaplines = (function()
local draw = g_callbacks.add_callback('draw', function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Snaplines_Enable'] then
return;
end
local screen = g_engine.get_screen_size();
local position = Vector2.new(screen.x / 2, screen.y);
local localplayer = g_engine.get_local_player();
if not localplayer then
return;
end
if not localplayer:IsAlive() then
return;
end
if m_cheat_elements.visuals.view.thirdperson.toggle:Get() then
local body = localplayer:GetHitboxCenter(5);
if not body then
return;
end
position = Render.WorldToScreen(body);
end
local playerlist = EntityList.GetPlayers();
local color = g_menu.stuff.elem_t[g_menu.stuff.travels.indicators]['Snaplines_Enable'].cheatvar:GetColor();
for ent_index, c_baseplayer in pairs(playerlist) do
if c_baseplayer:IsTeamMate() then
goto skip;
end
if not c_baseplayer:IsAlive() then
goto skip;
end
local origin = c_baseplayer:GetRenderOrigin();
local w2s = Render.WorldToScreen(origin);
g_colors.modify(color, function(color)
color.a = color.a * c_baseplayer:GetESPAlpha();
g_render.line(w2s.x, w2s.y, position.x, position.y, color);
end);
::skip::
end
end)
end)(),
side_indicators = (function()
local font_size, font = 28, g_fonts.data.Tahoma[28].b;
local draw = g_callbacks.add_callback('draw', function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['SideIndicators_Enable'] then
return;
end
local screen = g_engine.get_screen_size();
local position = {
x = 15,
y = screen.y * 0.8
};
local indicators = {};
if m_cheat_elements.aimbot.anti_aim.misc.fake_duck:Get() then
table.insert(indicators, {text = 'FD'});
end
local dmg = g_engine.get_bind('Minimum Damage');
if dmg ~= nil then
if dmg.active then
table.insert(indicators, {text = 'DMG: '.. dmg.value});
end
end
if m_cheat_elements.aimbot.ragebot.exploits.doubletap:Get() then
table.insert(indicators, {text = 'DT', color = Exploits.GetCharge() ~= 1 and g_colors.data.red or nil});
end
if m_cheat_elements.aimbot.ragebot.exploits.hideshots:Get() then
table.insert(indicators, {text = 'ON-SHOT'});
end
local alphaness = Color.new(0, 0, 0, 0.25);
local alphaless = Color.new(0, 0, 0, 0.0);
for index, value in pairs(indicators) do
local index = index - 1;
local text_size = g_render.calc_text_size(value.text, font_size, font);
local x = position.x - 5;
local y = position.y - (index * 40);
g_render.gradient_rect(x, y + 1, text_size.x /2, text_size.y, alphaless, alphaness, true);
g_render.gradient_rect(x + text_size.x, y + 1, -text_size.x /2, text_size.y, alphaless, alphaness, true);
g_render.dropshadow_text(value.text, x + 5, y, value.color or g_colors.data.white, font_size, font);
end
end)
end)(),
velocity_indicator = (function()
local font_size, font = 11, g_fonts.data.Tahoma[11].b;
local drag = g_drag.create(500, 250);
local draw = g_callbacks.add_callback('draw', function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['VelocityIndicator_Enable'] then
return;
end
drag:render(function(self)
local UI_Visibility = Cheat.IsMenuVisible()
local Positions = Vector2.new(self.x - 7, self.y - 7)
local Width, Height = self.w, self.h
if UI_Visibility then
Render.Box(Positions, Vector2.new(Positions.x + Width, Positions.y + Height), g_colors.data.white)
end
local Player = g_engine.get_local_player();
if not Player then
return end
if not Player:IsAlive() and not UI_Visibility then
return end
local Modifier = Player:GetProp('m_flVelocityModifier')
if not UI_Visibility and Modifier == 1.0 then
return end
local Speed = 6.0;
local Speed = GlobalVars.realtime * Speed
local Anim = Speed % (math.pi * 2.0)
Anim = math.abs(-math.pi + Anim)
local Alpha = math.sin(Anim);
local Color = g_colors.lerp(Color.new(1.0, 0.0, 0.0), Color.new(0.5, 0.75, 0.15), Modifier, false)
Color.a = Alpha;
local Black = Color.new(0.0, 0.0, 0.0, 0.75);
local Positions = Vector2.new(self.x, self.y)
local Width, Height = Height - 20.0 + 3.0, Height - 20.0
Render.PolyFilled(Black, Vector2.new(Positions.x, Positions.y + Height), Vector2.new(Positions.x + Width /2.0, Positions.y), Vector2.new(Positions.x + Width, Positions.y + Height))
Positions.x = Positions.x + 4.0
Positions.y = Positions.y + 4.0
local Width, Height = Width - 8.0, Height - 6.0
Render.PolyFilled(Color, Vector2.new(Positions.x, Positions.y + Height), Vector2.new(Positions.x + Width /2.0, Positions.y), Vector2.new(Positions.x + Width, Positions.y + Height))
Render.Text('!', Vector2.new(Positions.x + Width /2.0, Positions.y + Height /2.0 + 3.0), Black, 30, false, true)
Color.a = 1.0
local Size = 85.0
Render.BoxFilled(Vector2.new(Positions.x + Width + 7.0, Positions.y + Height), Vector2.new(Positions.x + Width + 7.0 + Size, Positions.y + Height - 10.0), Black)
Render.BoxFilled(Vector2.new(Positions.x + Width + 7.0, Positions.y + Height), Vector2.new(Positions.x + Width + 7.0 + (Size * Modifier), Positions.y + Height - 10.0), Color)
Render.Box(Vector2.new(Positions.x + Width + 7.0, Positions.y + Height), Vector2.new(Positions.x + Width + 7.0 + (Size * Modifier), Positions.y + Height - 10.0), Black)
Render.Text(('VELOCITY %.f%%'):format(Modifier * 100.0), Vector2.new(Positions.x + Width + 7.0, Positions.y + Height - 25.0), g_colors.data.white, font_size, font, false, false)
self.w = 145;
self.h = 55;
end)
end)
end)(),
custom_scope = (function()
local m_backup;
local m_size = 0;
local backup = function()
if m_backup then
return;
end
m_backup = m_cheat_elements.visuals.view.camera.remove_scope:Get();
end
local restore = function()
if not m_backup then
return;
end
m_cheat_elements.visuals.view.camera.remove_scope:Set(m_backup);
m_backup = nil;
end
local destroy = g_callbacks.add_callback('destroy', restore);
local draw = g_callbacks.add_callback('draw', function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] then
return restore();
end
local mode = g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['CustomScope_Enable'];
if mode == 0 then
return restore();
end
local localplayer = g_engine.get_local_player();
if not localplayer then
return;
end
if not localplayer:IsAlive() then
return;
end
if not localplayer:GetProp('m_bIsScoped') then
m_size = 0;
return;
end
local color = g_menu.stuff.elem_t[g_menu.stuff.travels.indicators]['CustomScope_Color'].cheatvar:GetColor();
local copied = g_colors.copy(color);
copied.a = 0.0;
local left, right = color, copied;
local center = g_engine.get_screen_size() /2;
local gap = g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['CustomScope_Gap'];
local size = g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['CustomScope_Size'];
if mode == 2 then
left, right = right, left;
end
local c_basecombatweapon = localplayer:GetActiveWeapon();
if not c_basecombatweapon then
return;
end
local spread = c_basecombatweapon:GetSpread(c_basecombatweapon);
local inaccuracy = c_basecombatweapon:GetInaccuracy(c_basecombatweapon);
gap = gap + (inaccuracy + spread) * 75;
m_size = g_math.lerp(m_size, size);
backup();
m_cheat_elements.visuals.view.camera.remove_scope:Set(2);
g_render.gradient_rect(center.x - gap, center.y, -m_size, 1, left, right, true);
g_render.gradient_rect(center.x + gap + 1, center.y, m_size, 1, left, right, true);
g_render.gradient_rect(center.x, center.y - gap, 1, -m_size, left, right, false);
g_render.gradient_rect(center.x, center.y + gap + 1, 1, m_size, left, right, false);
end)
end)(),
hitmarker = (function()
local m_color = Color.new(1.0, 1.0, 1.0);
local m_time;
local m_alpha;
local draw = g_callbacks.add_callback('draw', function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['HitMarker_Enable'] then
return;
end
local localplayer = g_engine.get_local_player();
if not localplayer then
return;
end
if not localplayer:IsAlive() then
return;
end
local center = g_engine.get_screen_size() /2;
local gap = 5;
local size = gap + 5;
if not m_alpha or not m_time then
return;
end
g_colors.modify(m_color, function(color)
if GlobalVars.realtime - m_time > 0.75 then
m_alpha = g_math.lerp(m_alpha, 0);
end
color.a = color.a * m_alpha;
g_render.line(center.x - gap, center.y - gap, center.x - size, center.y - size, color);
g_render.line(center.x + gap, center.y + gap, center.x + size, center.y + size, color);
g_render.line(center.x - gap, center.y + gap, center.x - size, center.y + size, color);
g_render.line(center.x + gap, center.y - gap, center.x + size, center.y - size, color);
if m_alpha == 0 then
m_time = nil;
m_alpha = nil;
end
end);
end);
local event = g_callbacks.add_callback('events', function(event)
if event:GetName() ~= 'player_hurt' then
return;
end
local localplayer = g_engine.get_local_player();
if not localplayer then
return;
end
local userid = event:GetInt('userid', 0);
local userid_ptr = EntityList.GetPlayerForUserID(userid);
local attacker = event:GetInt('attacker', 0);
local attacker_ptr = EntityList.GetPlayerForUserID(attacker);
if not userid_ptr or not attacker_ptr then
return;
end
if attacker_ptr ~= localplayer then
return;
end
if userid_ptr == localplayer then
return;
end
m_time = GlobalVars.realtime;
m_alpha = 1.0;
end);
end)(),
damage_marker = (function()
local data = {};
local font_size, font = 13, g_fonts.data.Verdana[13].none;
local color = g_menu.stuff.elem_t[g_menu.stuff.travels.indicators]['DamageMarker_Enable'].cheatvar:GetColor();
local draw = g_callbacks.add_callback('draw', function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['DamageMarker_Enable'] then
data = {};
return;
end
local localplayer = g_engine.get_local_player();
if not localplayer then
return;
end
if not localplayer:IsAlive() then
return;
end
for key, value in pairs(data) do
if GlobalVars.realtime - value.time > 2 then
value.alpha = g_math.lerp(value.alpha, 0);
else
value.alpha = g_math.lerp(value.alpha, 1);
end
if value.alpha == 0 then
table.remove(data, key);
end
value.position.z = value.position.z + 50 * GlobalVars.frametime;
local w2s = Render.WorldToScreen(value.position);
local color = value.killed and g_colors.data.red or color;
g_colors.modify(color, function(color)
color.a = color.a * value.alpha;
g_render.dropshadow_text(value.text, w2s.x, w2s.y, color, math.floor(font_size * value.alpha), font, false, true);
end);
end
end);
local event = g_callbacks.add_callback('events', function(event)
if event:GetName() ~= 'player_hurt' then
return;
end
local localplayer = g_engine.get_local_player();
if not localplayer then
return;
end
local userid = event:GetInt('userid', 0);
local userid_ptr = EntityList.GetPlayerForUserID(userid);
local attacker = event:GetInt('attacker', 0);
local attacker_ptr = EntityList.GetPlayerForUserID(attacker);
if not userid_ptr or not attacker_ptr then
return;
end
if attacker_ptr ~= localplayer then
return;
end
if userid_ptr == localplayer then
return;
end
local dmg = event:GetInt('dmg_health', 0);
local hp = event:GetInt('health', 0);
local hitgroup = event:GetInt('hitgroup', 0);
local hitbox = stuff.hitgroup_to_hitbox[hitgroup] or 5;
table.insert(data, {
position = userid_ptr:GetHitboxCenter(hitbox),
text = tostring(dmg),
killed = hp <= 0,
time = GlobalVars.realtime,
alpha = 0.0,
})
end);
end)(),
world_marker = (function()
local data = {};
local font_size, font = 13, g_fonts.data.Verdana[13].none;
local size = 5;
local color = g_menu.stuff.elem_t[g_menu.stuff.travels.indicators]['WorldMarker_Enable'].cheatvar:GetColor();
local draw = g_callbacks.add_callback('draw', function()
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Indicators_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['WorldMarker_Enable'] then
data = {};
return;
end
local localplayer = g_engine.get_local_player();
if not localplayer then
return;
end
if not localplayer:IsAlive() then
return;
end
for key, value in pairs(data) do
if GlobalVars.realtime - value.time > 2 then
value.alpha = g_math.lerp(value.alpha, 0);
else
value.alpha = g_math.lerp(value.alpha, 1);
end
if value.alpha == 0 then
table.remove(data, key);
end
local w2s = Render.WorldToScreen(value.position);
g_colors.modify(color, function(color)
color.a = color.a * value.alpha;
g_render.filled_rect(w2s.x - size, w2s.y - 1, size * 2, 2, color);
g_render.filled_rect(w2s.x - 1, w2s.y - size, 2, size * 2, color);
end);
end
end);
local event = g_callbacks.add_callback('events', function(event)
if event:GetName() ~= 'player_hurt' then
return;
end
local localplayer = g_engine.get_local_player();
if not localplayer then
return;
end
local userid = event:GetInt('userid', 0);
local userid_ptr = EntityList.GetPlayerForUserID(userid);
local attacker = event:GetInt('attacker', 0);
local attacker_ptr = EntityList.GetPlayerForUserID(attacker);
if not userid_ptr or not attacker_ptr then
return;
end
if attacker_ptr ~= localplayer then
return;
end
if userid_ptr == localplayer then
return;
end
local hitgroup = event:GetInt('hitgroup', 0);
local hitbox = stuff.hitgroup_to_hitbox[hitgroup] or 5;
table.insert(data, {
position = userid_ptr:GetHitboxCenter(hitbox),
time = GlobalVars.realtime,
alpha = 0.0,
})
end);
end)(),
disable_3rd_preson_anim = (function()
Cheat.SetThirdPersonAnim(not g_menu.stuff.get_t[g_menu.stuff.travels.indicators]['Disable_3rd_Person_Anim']);
local destroy = g_callbacks.add_callback('destroy', function()
Cheat.SetThirdPersonAnim(true);
end)
end)(),
killsay = (function()
local phrases = {
head = {
'hs',
'что с ебалом моча?',
'эй лысый иди пописый',
'получил по башке улител на горшке',
'1',
},
body = {
'спи пидараска',
_name,
'жирный',
'снова хуй в жопе',
'я твою мать ебал клоп',
'спи моча ебаная',
'куда попрыгал, к матери шлюхе?',
'делай мне минет пидарас',
'yt bot',
'оправдайся в хуй почему сделал мне минет',
'депортирован в ад к матери шлюхе',
'ty4clip',
'toretto.yaw > all world',
'спи вечным сном',
'вафля ебаная',
'cya in hell',
'deported',
'выебан дегенерат',
},
}
local event = g_callbacks.add_callback('events', function(event)
if not g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Misc_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.misc]['KillSay_Enable'] then
return;
end
if event:GetName() ~= 'player_death' then
return;
end
local localplayer = g_engine.get_local_player();
if not localplayer then
return;
end
local userid = event:GetInt('userid', 0);
local userid_ptr = EntityList.GetPlayerForUserID(userid);
local attacker = event:GetInt('attacker', 0);
local attacker_ptr = EntityList.GetPlayerForUserID(attacker);
if not userid_ptr or not attacker_ptr then
return;
end
if attacker_ptr ~= localplayer then
return;
end
if userid_ptr == localplayer then
return;
end
local temp = phrases.body;
if event:GetBool('headshot', false) then
temp = phrases.head;
end
local text = temp[Utils.RandomInt(1, #temp)];
if not text then
return;
end
EngineClient.ExecuteClientCmd('say ' .. text);
end);
end)(),
hitsound = (function()
local event = g_callbacks.add_callback('events', function(event)
if not g_menu.stuff.get_t[g_menu.stuff.travels.misc]['Misc_Toggle'] then
return;
end
if not g_menu.stuff.get_t[g_menu.stuff.travels.misc]['HitSound_Enable'] then
return;
end
if event:GetName() ~= 'player_hurt' then
return;
end
local localplayer = g_engine.get_local_player();
if not localplayer then
return;
end
local userid = event:GetInt('userid', 0);
local userid_ptr = EntityList.GetPlayerForUserID(userid);
local attacker = event:GetInt('attacker', 0);
local attacker_ptr = EntityList.GetPlayerForUserID(attacker);
if not userid_ptr or not attacker_ptr then
return;
end
if attacker_ptr ~= localplayer then
return;
end
if userid_ptr == localplayer then
return;
end
g_ffi_stuff.data.IEngineSoundClient003.EmitAmbientSound('buttons\\arena_switch_press_02.wav', g_menu.stuff.get_t[g_menu.stuff.travels.misc]['HitSound_Volume'] / 100, 100, 0, 0);
end);
end)(),
};