Advertisement
Mister_Stefan

pred. nl

May 3rd, 2021
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 49.50 KB | None | 0 0
  1. --PREDICTION LUA V2
  2. local checkhitbox = {0,11,12,13,14}
  3. local username = cheat.GetCheatUserName()
  4. local ideal_yaw
  5. local right_side
  6. local left_side
  7. local dt_charging
  8. print("" .. username .. " if you have any questions feel free to dm kib1336#1030")
  9. print("" .. username .. " if you have any suggestion or found any bug feel free to join our discord! : https://discord.gg/pJ5WpMV")
  10. local version = "1643"
  11.  
  12. local ffi = require('ffi')
  13.  
  14. ffi.cdef[[
  15.     void* CreateFileA(
  16.         const char*                lpFileName,
  17.         unsigned long                 dwDesiredAccess,
  18.         unsigned long                 dwShareMode,
  19.         unsigned long lpSecurityAttributes,
  20.         unsigned long                 dwCreationDisposition,
  21.         unsigned long                 dwFlagsAndAttributes,
  22.         void*                hTemplateFile
  23.         );
  24.     bool ReadFile(
  25.             void*       hFile,
  26.             char*       lpBuffer,
  27.             unsigned long        nNumberOfBytesToRead,
  28.             unsigned long*      lpNumberOfBytesRead,
  29.             int lpOverlapped
  30.           );
  31.     bool WriteFile(
  32.             void*       hFile,
  33.             char*      lpBuffer,
  34.             unsigned long        nNumberOfBytesToWrite,
  35.             unsigned long*      lpNumberOfBytesWritten,
  36.             int lpOverlapped
  37.         );
  38.  
  39.     unsigned long GetFileSize(
  40.         void*  hFile,
  41.         unsigned long* lpFileSizeHigh
  42.     );
  43.     bool CloseHandle(void* hFile);
  44.  
  45.     typedef unsigned long ULONG_PTR;
  46.     typedef unsigned long DWORD;
  47.     typedef unsigned short WORD;
  48.  
  49.     typedef struct tagKEYBDINPUT {
  50.         WORD      wVk;
  51.         WORD      wScan;
  52.         DWORD     dwFlags;
  53.         DWORD     time;
  54.         ULONG_PTR dwExtraInfo;
  55.       } KEYBDINPUT, *PKEYBDINPUT, *LPKEYBDINPUT;
  56.  
  57.     typedef struct tagMOUSEINPUT {
  58.         long      dx;
  59.         long      dy;
  60.         DWORD     mouseData;
  61.         DWORD     dwFlags;
  62.         DWORD     time;
  63.         ULONG_PTR dwExtraInfo;
  64.       } MOUSEINPUT, *PMOUSEINPUT, *LPMOUSEINPUT;
  65.  
  66.       typedef struct tagHARDWAREINPUT {
  67.         DWORD uMsg;
  68.         WORD  wParamL;
  69.         WORD  wParamH;
  70.       } HARDWAREINPUT, *PHARDWAREINPUT, *LPHARDWAREINPUT;
  71.  
  72.     typedef struct tagINPUT {
  73.         DWORD type;
  74.           MOUSEINPUT    mi;
  75.           KEYBDINPUT    ki;
  76.           HARDWAREINPUT hi;
  77.       } INPUT, *PINPUT, *LPINPUT;
  78. ]]
  79.  
  80. local pfile = ffi.cast("void*", ffi.C.CreateFileA("nl/username.txt", 0xC0000000, 0x00000003, 0, 0x4, 0x80, nil))
  81. --local cfile = ffi.cast("void*", ffi.C.CreateFileA("nl/settings.txt", 0xC0000000, 0x00000003, 0, 0x4, 0x80, nil))
  82.  
  83. cheat.RegisterCallback("destroy", function()
  84. ffi.C.CloseHandle(pfile)
  85. --ffi.C.CloseHandle(cfile)
  86. end)
  87.  
  88. local size = ffi.C.GetFileSize(pfile, nil)
  89. local buff = ffi.new("char[" ..(size + 1).. "]")
  90.  
  91. ffi.C.ReadFile(pfile, buff, size, nil, 0)
  92. buff = ffi.string(buff)
  93. local username = buff
  94.  
  95. local function initlua()
  96.  
  97. menu.Text("Prediction LUA V2", "Hello "..username.."!")
  98.  
  99. local vers = http.Get("https://pastebin.com/raw/bHXD56yW")
  100.  
  101. local ok = ""
  102. if version == vers then ok = "Version: UP 2 DATE!" else ok = "Version: Outdated!" end
  103.  
  104. if ok then
  105.     menu.Text("STATUS", ok)
  106. else
  107.     menu.Text("STATUS", "ERROR")
  108. end
  109.  
  110. cheat.AddNotify("test lua", "Welcome to test lua.3.0 " .. username .. " ")
  111.  
  112. ffi.cdef[[
  113.     typedef uintptr_t (__thiscall* GetClientEntity_4242425_t)(void*, int);
  114.     typedef void (__thiscall* UpdateCSA_t)(void*);
  115.     typedef struct { float id; } poses_t;
  116.     typedef struct
  117.     {
  118.         float x;
  119.         float y;
  120.         float z;
  121.     } Vector_t;
  122.    
  123.     typedef struct
  124.     {
  125.         float           flAnimationTime;        //0x00
  126.         float           flFadeOut;              //0x04
  127.         void*           pStudioHdr;             //0x08
  128.         int             nDispatchedSrc;         //0x0C
  129.         int             nDispatchedDst;         //0x10
  130.         int             iOrder;                 //0x14
  131.         int nSequence;              //0x18
  132.         float           flPrevCycle;            //0x1C
  133.         float           flWeight;               //0x20
  134.         float           flWeightDeltaRate;      //0x24
  135.         float           flPlaybackRate;         //0x28
  136.         float           flCycle;                //0x2C
  137.         void*           pOwner;                 //0x30
  138.         int             nInvalidatePhysicsBits; //0x34
  139.     } animlayer_t;
  140.    
  141.     typedef struct
  142.     {
  143.         void* pThis;
  144.         char pad2[91];
  145.         void* pBaseEntity; //0x60
  146.         void* pActiveWeapon; //0x64
  147.         void* pLastActiveWeapon; //0x68
  148.         float m_flLastClientSideAnimationUpdateTime; //0x6C
  149.         int m_iLastClientSideAnimationUpdateFramecount; //0x70
  150.         float m_flEyePitch; //0x74
  151.         float m_flEyeYaw; //0x78
  152.         float m_flPitch; //0x7C
  153.         float m_flGoalFeetYaw; //0x80
  154.         float m_flCurrentFeetYaw; //0x84
  155.         float m_flCurrentTorsoYaw; //0x88
  156.         float m_flUnknownVelocityLean; //0x8C //changes when moving/jumping/hitting ground
  157.         float m_flLeanAmount; //0x90
  158.         char pad4[4]; //NaN
  159.         float m_flFeetCycle; //0x98 0 to 1
  160.         float m_flFeetYawRate; //0x9C 0 to 1
  161.         float m_fUnknown2;
  162.         float m_fDuckAmount; //0xA4
  163.         float m_fLandingDuckAdditiveSomething; //0xA8
  164.         float m_fUnknown3; //0xAC
  165.         Vector_t m_vOrigin; //0xB0, 0xB4, 0xB8
  166.         Vector_t m_vLastOrigin; //0xBC, 0xC0, 0xC4
  167.         float m_vVelocityX; //0xC8
  168.         float m_vVelocityY; //0xCC
  169.         char pad5[4];
  170.         float m_flUnknownFloat1; //0xD4 Affected by movement and direction
  171.         char pad6[8];
  172.         float m_flUnknownFloat2; //0xE0 //from -1 to 1 when moving and affected by direction
  173.         float m_flUnknownFloat3; //0xE4 //from -1 to 1 when moving and affected by direction
  174.         float m_unknown; //0xE8
  175.         float speed_2d; //0xEC
  176.         float flUpVelocity; //0xF0
  177.         float m_flSpeedNormalized; //0xF4 //from 0 to 1
  178.         float m_flFeetSpeedForwardsOrSideWays; //0xF8 //from 0 to 2. something  is 1 when walking, 2.something when running, 0.653 when crouch walking
  179.         float m_flFeetSpeedUnknownForwardOrSideways; //0xFC //from 0 to 3. something
  180.         float m_flTimeSinceStartedMoving; //0x100
  181.         float m_flTimeSinceStoppedMoving; //0x104
  182.         unsigned char m_bOnGround; //0x108
  183.         unsigned char m_bInHitGroundAnimation; //0x109
  184.         char pad7[10];
  185.         float m_flLastOriginZ; //0x114
  186.         float m_flHeadHeightOrOffsetFromHittingGroundAnimation; //0x118 from 0 to 1, is 1 when standing
  187.         float m_flStopToFullRunningFraction; //0x11C from 0 to 1, doesnt change when walking or crouching, only running
  188.         char pad8[4]; //NaN
  189.         float m_flUnknownFraction; //0x124 affected while jumping and running, or when just jumping, 0 to 1
  190.         char pad9[4]; //NaN
  191.         float m_flUnknown3;
  192.         char pad10[528];
  193.     } CCSGOPlayerAnimationState_534535_t;
  194. ]]
  195.  
  196. local hitboxesused = {18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,0}
  197.  
  198. local hitboxes = {
  199.     "Head",
  200.     "Upper Chest",
  201.     "Chest",
  202.     "Body",
  203.     "Stomach",
  204.     "Pelvis",
  205.     "Legs & Feet",
  206.     "Arms"
  207. }
  208.  
  209. local types = {
  210.     "2D Filled Circle",
  211.     "2D Circle"
  212. }
  213. --VARS
  214. local miss_counter = 0
  215. local menu_invert_side = g_Config:FindVar("Aimbot", "Anti Aim", "Fake Angle", "Inverter")
  216. local menu_left_limit = g_Config:FindVar("Aimbot", "Anti Aim", "Fake Angle", "Left Limit")
  217. local menu_fake_options = g_Config:FindVar("Aimbot", "Anti Aim", "Fake Angle", "LBY Mode")
  218. local menu_right_limit = g_Config:FindVar("Aimbot", "Anti Aim", "Fake Angle", "Right Limit")
  219. local menu_leg_movement = g_Config:FindVar("Aimbot", "Anti Aim", "Misc", "Leg Movement")
  220. local menu_fakelag_limit = g_Config:FindVar("Aimbot", "Anti Aim", "Fake Lag", "Limit")
  221. local menu_fakelag_enable = g_Config:FindVar("Aimbot", "Anti Aim", "Fake Lag", "Enable Fake Lag")
  222. local menu_fakelag_triggers = g_Config:FindVar("Aimbot", "Anti Aim", "Fake Lag", "Triggers")
  223.  
  224. local menu_safe_point = g_Config:FindVar("Aimbot", "Ragebot", "Accuracy", "Safe Points")
  225. local menu_fakeduck = g_Config:FindVar("Aimbot", "Anti Aim", "Misc", "Fake Duck")
  226. local menu_antiaim_manual = g_Config:FindVar("Aimbot", "Anti Aim", "Main", "Yaw Base")
  227. local var_arrow_fonts = g_Render:InitFont("Verdana",55)
  228.  
  229. --VARS END--
  230.  
  231. --LUA MENU
  232. menu.Text("Anti-Aim", "Anti Bruteforce Customization")
  233. local c_menu_anti_brute = menu.Switch("Anti-Aim", "Anti Brute", false, "Will enable Lua Script Anti-BruteForce!")
  234. local c_menu_anti_brute_fov_slider = menu.SliderFloat("Anti-Aim", "Anti Brute FOV", 175.0, 50.0, 250.0, "Limit FOV between bullet and your modelll (Recomended Default Value)")
  235.  
  236. local c_menu_anti_brute_debug_mode = menu.Switch("Anti-Aim", "Debug Mode", false, "Will print on console which angle has been overrided etc...")
  237. local c_menu_anti_brute_1stshot = menu.SliderInt("Anti-Aim", "1st shot angle", 45, 0, 60, "Fake Limit for 1st enemy shot (Recomended using default values if you don't know what you're doing!)")
  238. local c_menu_anti_brute_2ndshot = menu.SliderInt("Anti-Aim", "2nd shot angle", 45, 0, 60, "Fake Limit for 2nd enemy shot (Recomended using default values if you don't know what you're doing!)")
  239. local c_menu_anti_brute_3rdshot = menu.SliderInt("Anti-Aim", "3rd shot angle", 5, 0, 60, "Fake Limit for 3rd enemy shot (Recomended using default values if you don't know what you're doing!)")
  240.  
  241. menu.Text("Anti-Aim", "Body Lean Customization")
  242. local c_menu_custom_body_lean = menu.Switch("Anti-Aim", "Custom Bodylean", false, "Will enable customized BodyLean can be modified using the sliders below!")
  243. local c_menu_body_lean_left = menu.SliderFloat("Anti-Aim", "Body Lean Left", 16.4, -180.0, 180.0, "Adjusts your BodyLean")
  244. local c_menu_body_lean_right = menu.SliderFloat("Anti-Aim", "Body Lean Right", -20.0, -180.0, 180.0, "Adjusts your BodyLean")
  245.  
  246.  
  247.  
  248. menu.Text("FakeLags", "FakeLags Customization")
  249. local c_menu_custom_fakelag = menu.Switch("FakeLags", "Custom Fakelag", false, "Will enable customized Fakelags")
  250. local c_menu_fakelag_modes = menu.Combo("FakeLags", "Modes", {"Adaptive", "Fluctuate"}, 0, "Multiple Fakelag modes!")
  251. local c_menu_fakelag_fluctuate_timing = menu.SliderFloat("FakeLags", "Fluctuate Timing", 12.9, 0.0, 20.0, "Fluctuate timing (Recomended Default values!)!")
  252.  
  253. menu.Text("Exploits", "Exploits Customization")
  254. local c_menu_doubletap = menu.Switch("Exploits", "Customized Doubletap", true, "")
  255. local c_menu_doubletap_clockcr = menu.Switch("Exploits", "Disable Correction", false, "Will make your DoubleTap innacurate but faster!")
  256. local c_menu_doubletap_modes = menu.Combo("Exploits", "Modes", {"Instant", "Fast", "Slow", "Sonic"}, 0, "Multiple DoubleTap speed modes!")
  257. local c_menu_doubletap_debug_mode = menu.Switch("Exploits", "Debug Mode", false, "Will print info about doubletap, ticks etc...")
  258. local c_menu_doubletap_instant_recharge = menu.Switch("Exploits", "Instant Recharge", false, "Will recharge doubletap as soon as possible (Not recommended tho!)!")
  259.  
  260. local c_menu_exploits_legs = menu.Switch("Exploits", "Smart Legs", false, "Will swap your model legs between normal/sliding asap!")
  261. local c_menu_air_stuck = menu.Switch("Exploits", "Airstuck", false, "")
  262.  
  263. menu.Text("Visuals", "Visuals Customization")
  264. local c_menu_text_indicators = menu.Switch("Visuals", "Enable text indicators", false, "Draw Text indicators (Use the multicombo tho!)!")
  265. local c_menu_x = menu.SliderFloat("Visuals", "Text x position", 973.0, 0.0, 2000.0, "x pos")
  266. local c_menu_y = menu.SliderFloat("Visuals", "Text y position", 484.0, 0.0, 2000.0, "y pos")
  267. local c_menu_arrows = menu.Switch("Visuals", "Anti-Aim Arrows", false, "Draw AntiAim direction arrows!")
  268. local c_menu_arrow_color = menu.ColorEdit("Visuals", "Arrow color", Color.new(1,1,1,1), "")
  269. local c_menu_arrows_type = menu.Combo("Visuals", "Arrow Type", {")", ">", "Triangles", "Circle"}, 0, "Multiple Arrow types!")
  270. local c_menu_custom_impacts = menu.Switch("Visuals", "Custom Bullet Impacts", false, "")
  271. local c_menu_visuals_impacts = menu.SliderInt("Visuals", "Bullet Impacts size", 5, 1, 50, "")
  272. local c_menu_visuals_beam_color = menu.ColorEdit("Visuals", "Beam Color", Color.new(1,1,1,1), "")
  273. local c_menu_visuals_impact_color = menu.ColorEdit("Visuals", "Impacts Color", Color.new(1,1,1,1), "")
  274. local c_menu_watermarker = menu.Switch("Visuals", "Watermarker", false, "Enables simple Watermarker!")
  275.  
  276. menu.Text("Misc", "Miscellaneous")
  277. local c_menu_kill_say = menu.Switch("Misc", "Custom Kill Say", false, "Says something on the chat once you kill someone (Words can be edited on the textbox below!)!")
  278. local c_menu_kill_say_words = menu.TextBox("Misc", "Kill Say Words", 64, "Say something...", "Says something on the chat once you kill someone (If Kill Say checkbox is enabled!)!")
  279. local c_menu_hurt_say = menu.Switch("Misc", "Custom Hurt Say", false, "Says something on the chat once you hurt someone (Words can be edited on the textbox below!)!")
  280. local c_menu_hurt_say_words = menu.TextBox("Misc", "Hurt Say Words", 64, "Say something...", "Says something on the chat once you hurt someone (If Hurt Say checkbox is enabled!)!")
  281.  
  282. menu.Text("Aimbot", "Advanced Aimbot")
  283. local c_menu_safepoint_hitboxes = menu.MultiCombo("Aimbot", "Safe point Hitboxes", hitboxes, 0, "")
  284. local c_menu_draw_only_priority_hitboxe = menu.SwitchColor("Aimbot", "Draw only priority hitbox", false, Color.new(1.0,1.0,1.0,1.0), "")
  285. local c_menu_circle_customization = menu.Combo("Aimbot", "Circle Customization", types, 0, "")
  286. local c_menu_scale_circle = menu.SliderFloat("Aimbot", "Scale circle", 1, 0, 20, "")
  287. local c_menu_hitboxes_color = menu.ColorEdit("Aimbot", "Intersacted points Color", Color.new(1,1,1,1), "")
  288.  
  289.  
  290. local c_menu_anti_aim_helpers = menu.Switch("Anti-Aim", "Auto direction", false, "")
  291. local c_menu_anti_aim_helpers_types = menu.Combo("Anti-Aim", "Auto direction Types", {"Peek with Fake", "Peek with Real"}, 0, "Multiple Auto direction types!")
  292. local c_menu_anti_aim_helpers_desync = menu.Switch("Anti-Aim", "Desync Modifications", false, "")
  293. local c_menu_anti_aim_helpers_desync_mod = menu.Combo("Anti-Aim", "Desync Mods", {"Smart", "Prefer Low Delta", "Multiple"}, 0, "Multiple Auto direction types!")
  294. local menu_freestand_desync = g_Config:FindVar("Aimbot", "Anti Aim", "Fake Angle", "Freestanding Desync")
  295. local menu_fake_option = g_Config:FindVar("Aimbot", "Anti Aim", "Fake Angle", "Fake Options")
  296.  
  297. --LUA MENU
  298.  
  299. local function antiaim_helpers()
  300.  
  301.   if (c_menu_anti_aim_helpers:GetBool()) then
  302.         if (c_menu_anti_aim_helpers_types:GetInt() == 0) then --Peek fake
  303.             menu_freestand_desync:SetInt(1)
  304.         else if (c_menu_anti_aim_helpers_types:GetInt() == 1) then --Peek real
  305.             menu_freestand_desync:SetInt(2)
  306.         end
  307.     end
  308.   end
  309.  
  310.   local local_idx = g_EngineClient:GetLocalPlayer()
  311.   local local_entity = g_EntityList:GetClientEntity(local_idx)
  312.  
  313.   if local_entity == nil then
  314.     return
  315.   end
  316.  
  317.   local local_player = local_entity:GetPlayer();
  318.   local speed_x = local_player:GetProp("DT_BasePlayer", "m_vecVelocity[0]")
  319.   local speed_y = local_player:GetProp("DT_BasePlayer", "m_vecVelocity[1]")
  320.   local speed = math.sqrt(speed_x * speed_x + speed_y * speed_y)
  321.   local speed_per_tick = math.sqrt(speed_x * speed_x + speed_y * speed_y) *  g_GlobalVars.interval_per_tick
  322.     if (c_menu_anti_aim_helpers_desync:GetBool()) then
  323.  
  324.         if (c_menu_anti_aim_helpers_desync_mod:GetInt() == 0) then --smart
  325.             menu_fake_option:SetInt(1)
  326.             menu_freestand_desync:SetInt(2)
  327.             antiaim.OverrideLimit(math.random(45, 80))
  328.               menu_left_limit:SetInt(math.random(30, 80))
  329.               menu_right_limit:SetInt(math.random(30, 80))
  330.            
  331.        
  332.         end
  333.         if (c_menu_anti_aim_helpers_desync_mod:GetInt() == 2) then --Multiple
  334.             menu_fake_option:SetInt(utils.RandomInt(2, 3))
  335.             menu_fake_options:SetInt(utils.RandomInt(1, 2))
  336.               menu_left_limit:SetInt(utils.RandomInt(35, 60))
  337.               menu_right_limit:SetInt(utils.RandomInt(35, 60))
  338.         end
  339.        if (c_menu_anti_aim_helpers_desync_mod:GetInt() == 1) then --prefer low delta
  340.           menu_fake_option:SetInt(1)
  341.           menu_freestand_desync:SetInt(2)
  342.           antiaim.OverrideLimit(math.random(15, 15))
  343.           menu_left_limit:SetInt(math.random(15, 35))
  344.           menu_right_limit:SetInt(math.random(15, 35))
  345.        
  346.         end    
  347.     end
  348. end
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355. --AIMBOT
  356.  
  357. local safety_hitboxes = {}
  358. local best_hitbox = {}
  359. local best_damage = {}
  360.  
  361. local predict_ticks = 7
  362. local force_off = false
  363. local force_off_tick = 0
  364.  
  365. local function normalizeangles(ang)
  366.     if(ang.pitch > 180.0) then ang.pitch = ang.pitch - 360.0 end
  367.     if(ang.yaw > 180.0) then ang.yaw = ang.yaw - 360.0 end
  368.     return ang
  369. end
  370.  
  371. local function calcangle(src, dst)
  372.     local vecdelta = Vector.new(dst.x - src.x, dst.y - src.y, dst.z - src.z)
  373.     local angles = QAngle.new(math.atan2(-vecdelta.z, vecdelta:Length2D()) * 180.0 / math.pi, (math.atan2(vecdelta.y, vecdelta.x) * 180.0 / math.pi), 0.0)
  374.     angles = normalizeangles(angles)
  375.     return angles
  376. end
  377.  
  378. local function canseeentity(localplayer, entity)
  379.     if not entity or not localplayer then return false end
  380.     local canhit = false
  381.     for k,v in pairs(checkhitbox) do
  382.         local damage = cheat.FireBullet(localplayer, localplayer:GetEyePosition(), entity:GetPlayer():GetHitboxCenter(v))
  383.         if damage > 0 then
  384.             canhit = true
  385.             break
  386.         end
  387.     end
  388.     return canhit
  389. end
  390.  
  391. cheat.RegisterCallback("events", function(event)
  392.     if event:GetName() == "player_death" then
  393.        
  394.         if true then
  395.             for i = 1, 64 do
  396.                 best_hitbox[i] = -1
  397.                 best_damage[i] = 0
  398.             end
  399.         end
  400.     end
  401. end)
  402. local lines = {}
  403. local results = {}
  404.  
  405. local function impacts_events(event)
  406.     if event:GetName() == "bullet_impact" and event:GetInt("userid") == g_EngineClient:GetPlayerInfo(g_EngineClient:GetLocalPlayer()).userId then
  407.         local localplayer = g_EntityList:GetClientEntity(g_EngineClient:GetLocalPlayer())
  408.         if localplayer then localplayer = localplayer:GetPlayer() else return end
  409.         local position = localplayer:GetEyePosition()
  410.         local destination = Vector.new(event:GetFloat("x"), event:GetFloat("y"), event:GetFloat("z"))
  411.         table.insert(lines, {pos = position, destination = destination, time = 250, curtime = g_GlobalVars.curtime})
  412.     end
  413.  
  414.     if event:GetName() == "player_hurt" then
  415.         if event:GetInt("attacker") == g_EngineClient:GetPlayerInfo(g_EngineClient:GetLocalPlayer()).userId then
  416.             for k,v in pairs(lines) do
  417.                 if v.curtime == g_GlobalVars.curtime then
  418.                     table.insert(results, lines[k])
  419.                     table.remove(lines, k)
  420.                 end
  421.             end
  422.         end
  423.     end
  424. end
  425. local function draw_impacts()
  426.     local localplayer = g_EntityList:GetClientEntity(g_EngineClient:GetLocalPlayer())
  427.     if localplayer then localplayer = localplayer:GetPlayer() else return end
  428.     local position = localplayer:GetEyePosition()
  429.  
  430.     for k,v in pairs(results) do
  431.         v.time = v.time - 1
  432.         if g_Render:ScreenPosition(v.pos).x ~= g_Render:ScreenPosition(v.destination).x and g_Render:ScreenPosition(v.pos).y ~= g_Render:ScreenPosition(v.destination).y then
  433.             if g_Render:ScreenPosition(v.pos).x ~= g_Render:ScreenPosition(position).x and g_Render:ScreenPosition(v.pos).y ~= g_Render:ScreenPosition(position).y then
  434.                 g_Render:Line(g_Render:ScreenPosition(v.pos), g_Render:ScreenPosition(v.destination), c_menu_visuals_beam_color:GetColor())
  435.             end
  436.         end
  437.         if v.time == 0 then table.remove(results, k) end
  438.     end
  439.    
  440.     for k,v in pairs(results) do
  441.         for i = 1,c_menu_visuals_impacts:GetInt() do
  442.             local position1 = g_Render:ScreenPosition(v.destination)
  443.             local position2 = g_Render:ScreenPosition(v.destination)
  444.             local position3 = g_Render:ScreenPosition(v.destination)
  445.             local position4 = g_Render:ScreenPosition(v.destination)
  446.             position1.x = position1.x+i
  447.             position2.x = position2.x-i
  448.             position3.y = position3.y+i
  449.             position4.y = position4.y-i
  450.             g_Render:Box(position1, position2, c_menu_visuals_impact_color:GetColor())
  451.             g_Render:Box(position3, position4, c_menu_visuals_impact_color:GetColor())
  452.         end
  453.     end
  454. end
  455.  
  456. function C_BaseEntity:m_iHealth()
  457.     return self:GetProp("DT_BasePlayer", "m_iHealth")
  458. end
  459. function C_BaseEntity:m_vecVelocity()
  460.     return self:GetProp("DT_BasePlayer", "m_vecVelocity")
  461. end
  462.  
  463. local ENTITY_LIST_POINTER = ffi.cast("void***", utils.CreateInterface("client.dll", "VClientEntityList003")) or error("Failed to find VClientEntityList003!")
  464. local GET_CLIENT_ENTITY_FN = ffi.cast("GetClientEntity_4242425_t", ENTITY_LIST_POINTER[0][3])
  465. local UpdateClientSideAnims = ffi.cast("UpdateCSA_t", utils.PatternScan("client.dll", "55 8B EC 51 56 8B F1 80 BE ? ? ? ? 00 74 ? 8B 06 FF"))
  466.  
  467. local ffi_helpers = {
  468. get_animstate_offset = function()
  469.     return 14612
  470. end,
  471.  
  472. get_entity_address = function(entity_index)
  473.     local addr = GET_CLIENT_ENTITY_FN(ENTITY_LIST_POINTER, entity_index)
  474.     return addr
  475. end
  476. }
  477.  
  478. local original_goal_feet_yaw = {}
  479.  
  480.  
  481. local function aimbot(cmd)
  482.     local localplayer = g_EntityList:GetClientEntity(g_EngineClient:GetLocalPlayer())
  483.     local oldlocalplayer = localplayer
  484.     if localplayer then
  485.         --local entity_animation_state = ffi.cast("int**", ffi_helpers.get_entity_address(2) + 45952)[0]
  486.         --entity_animation_state = 100
  487.         localplayer = localplayer:GetPlayer()
  488.     else
  489.         return
  490.     end
  491.  
  492.     safety_hitboxes = {}
  493.     for i = 0,10 do
  494.         if c_menu_safepoint_hitboxes:GetBool(i) then
  495.             if i == 0 then table.insert( safety_hitboxes, 0 )
  496.             elseif i == 1 then table.insert( safety_hitboxes, 6 )
  497.             elseif i == 2 then table.insert( safety_hitboxes, 5 )
  498.             elseif i == 3 then table.insert( safety_hitboxes, 4 )
  499.             elseif i == 4 then table.insert( safety_hitboxes, 3 )
  500.             elseif i == 5 then table.insert( safety_hitboxes, 2 )
  501.             elseif i == 6 then
  502.                 for i = 7,12 do
  503.                     table.insert( safety_hitboxes, i )
  504.                 end
  505.             elseif i == 7 then
  506.                 for i = 13,18 do
  507.                     table.insert( safety_hitboxes, i )
  508.                 end
  509.             end
  510.         end
  511.     end
  512.  
  513.     for i = 1,64 do
  514.  
  515.         local entity = g_EntityList:GetClientEntity(i)
  516.         if not entity then break end
  517.         if entity and entity:GetPlayer():m_iHealth() > 0 and not entity:GetPlayer():IsTeamMate() and canseeentity(localplayer:GetPlayer(), entity:GetPlayer()) then
  518.            
  519.             --UpdateClientSideAnims(ffi.cast("void***", ffi_helpers.get_entity_address(entity:EntIndex())))
  520.             for k,v in pairs(safety_hitboxes) do
  521.                 ragebot.ForceHitboxSafety(entity:EntIndex(), v)
  522.             end
  523.  
  524.             local biggestdamage = 0
  525.             local health = entity:GetPlayer():m_iHealth()
  526.             local besthitboxfound = -1
  527.             for k,v in pairs(hitboxesused) do
  528.                 local damage = cheat.FireBullet(localplayer, localplayer:GetEyePosition(), entity:GetPlayer():GetHitboxCenter(v))
  529.                 if damage > biggestdamage then
  530.                     biggestdamage = damage
  531.                     besthitboxfound = v
  532.                 end
  533.  
  534.                 if damage >= health then
  535.                     biggestdamage = damage
  536.                     besthitboxfound = v
  537.                     break
  538.                 end
  539.             end
  540.            
  541.             best_hitbox[entity:EntIndex()] = besthitboxfound
  542.             best_damage[entity:EntIndex()] = biggestdamage
  543.  
  544.             for i = 1, 18 do
  545.                 ragebot.SetHitboxPriority(entity:EntIndex(), i, 1)
  546.             end
  547.  
  548.             ragebot.SetHitboxPriority(entity:EntIndex(), besthitboxfound, 10000)
  549.         else
  550.             best_damage[entity:EntIndex()] = 0
  551.             best_hitbox[entity:EntIndex()] = -1
  552.         end
  553.     end
  554.  
  555.     --peeking:handle()
  556. end
  557.  
  558.  
  559. function toint(n)
  560.     local s = tostring(n)
  561.     local i, j = s:find('%.')
  562.     if i then
  563.         return tonumber(s:sub(1, i-1))
  564.     else
  565.         return n
  566.     end
  567. end
  568.  
  569. local function aimbot_draw()  
  570.     local localplayer = g_EntityList:GetClientEntity(g_EngineClient:GetLocalPlayer())
  571.     if localplayer then
  572.         localplayer = localplayer:GetPlayer()
  573.     else
  574.         return
  575.     end
  576.  
  577.     if localplayer:m_iHealth() < 1 then
  578.         return
  579.     end
  580.  
  581.  
  582.     for i = 1,64 do
  583.         local entity = g_EntityList:GetClientEntity(i)
  584.         local nentity = entity
  585.         if entity then
  586.             entity = entity:GetPlayer()
  587.         end
  588.         if entity and entity:m_iHealth() > 0 and not entity:IsTeamMate() and not entity:IsDormant() then
  589.             for k,v in pairs(hitboxesused) do
  590.                 local color = Color.new(1,0,0,1)
  591.                 local red = false
  592.                     if best_hitbox[nentity:EntIndex()] == v then
  593.                         color = c_menu_draw_only_priority_hitboxe:GetColor()
  594.                     else
  595.                         color = c_menu_hitboxes_color:GetColor()
  596.                         red = true
  597.                     end
  598.                 if c_menu_draw_only_priority_hitboxe:GetBool() and not red then
  599.                     if c_menu_circle_customization:GetInt() == 1 then              
  600.                         g_Render:Circle(g_Render:ScreenPosition(Vector.new(entity:GetHitboxCenter(v).x, entity:GetHitboxCenter(v).y, entity:GetHitboxCenter(v).z)), toint(7*c_menu_scale_circle:GetFloat()), toint(58*c_menu_scale_circle:GetFloat()/4), color)
  601.                     elseif c_menu_circle_customization:GetInt() == 0 then
  602.                         g_Render:CircleFilled(g_Render:ScreenPosition(Vector.new(entity:GetHitboxCenter(v).x, entity:GetHitboxCenter(v).y, entity:GetHitboxCenter(v).z)), toint(7*c_menu_scale_circle:GetFloat()), toint(58*c_menu_scale_circle:GetFloat()/4), color)
  603.                     end
  604.                 elseif not c_menu_draw_only_priority_hitboxe:GetBool() then
  605.                     if c_menu_circle_customization:GetInt() == 1 then              
  606.                         g_Render:Circle(g_Render:ScreenPosition(Vector.new(entity:GetHitboxCenter(v).x, entity:GetHitboxCenter(v).y, entity:GetHitboxCenter(v).z)), toint(7*c_menu_scale_circle:GetFloat()), toint(58*c_menu_scale_circle:GetFloat()/4), color)
  607.                     elseif c_menu_circle_customization:GetInt() == 0 then
  608.                         g_Render:CircleFilled(g_Render:ScreenPosition(Vector.new(entity:GetHitboxCenter(v).x, entity:GetHitboxCenter(v).y, entity:GetHitboxCenter(v).z)), toint(7*c_menu_scale_circle:GetFloat()), toint(58*c_menu_scale_circle:GetFloat()/4), color)
  609.                     end
  610.                 end
  611.             end
  612.         end
  613.     end
  614. end
  615.  
  616.  
  617. --AIMBOT
  618.  
  619.  
  620. --PREDICTION CALLBACK FUNCTIONS
  621. local function body_lean()
  622.      local r_right = c_menu_body_lean_right:GetFloat()
  623.      local r_left = c_menu_body_lean_left:GetFloat()
  624.  
  625.     if (c_menu_custom_body_lean:GetBool()) then
  626.         if (menu_invert_side:GetBool()) then
  627.             antiaim.OverrideYawOffset(r_right)
  628.         else
  629.             antiaim.OverrideYawOffset(r_left)
  630.         end
  631.     end
  632. end
  633. --PREDICTION CALLBACK FUNCTIONS
  634.  
  635.  
  636. --EXPLOITS
  637. local function instant_recharge()
  638.    
  639.     if (c_menu_doubletap_instant_recharge:GetBool()) then
  640.         exploits.ForceCharge()
  641.     end
  642.  
  643. end
  644.  
  645. local function exploits_func()
  646.         --Speed modes
  647.     local instant = 15
  648.     local fast = 14
  649.     local default = 13
  650.  
  651.     --Preserve modes
  652.     local insecure = 0
  653.     local secure = 1
  654.     local safe = 2
  655.  
  656.     local cl_clock_correction = g_CVar:FindVar("cl_clock_correction") --clock correction OOPS: I think soufiw already manages with this but whatever...
  657.     local sv_maxusrcmdprocessticks = g_CVar:FindVar("sv_maxusrcmdprocessticks") --sv_maxusrcmdprocessticks
  658.  
  659.     if (c_menu_doubletap_clockcr:GetBool()) then
  660.         g_CVar:FindVar("cl_clock_correction"):SetInt(0)
  661.         g_CVar:FindVar("cl_clock_correction_adjustment_max_amount"):SetInt(450)
  662.     end
  663.  
  664.     if (c_menu_doubletap_modes:GetInt() == 0) then --Instant mode
  665.         exploits.OverrideDoubleTapSpeed(instant)
  666.        
  667.  
  668.         if (c_menu_doubletap_debug_mode:GetBool()) then
  669.            print("[DOUBLETAP] TICKS: MAX | PRESERVE: INSECURE | CORRECTION: DISABLED ")
  670.         end
  671.  
  672.     else if (c_menu_doubletap_modes:GetInt() == 1) then --Fast mode
  673.         exploits.OverrideDoubleTapSpeed(fast)
  674.        
  675.  
  676.         if (c_menu_doubletap_debug_mode:GetBool()) then
  677.         print("[DOUBLETAP] TICKS: MAX | PRESERVE: SECURE | CORRECTION: DISABLED ")
  678.         end
  679.  
  680.     else if (c_menu_doubletap_modes:GetInt() == 2) then --Slow mode
  681.         exploits.OverrideDoubleTapSpeed(default)
  682.        
  683.  
  684.         if (c_menu_doubletap_debug_mode:GetBool()) then
  685.         print("[DOUBLETAP] TICKS: 13 | PRESERVE: SAFETY | CORRECTION: ENABLED ")
  686.         end
  687.     else if (c_menu_doubletap_modes:GetInt() == 3) then --Sonic mode
  688.         local localplayer = g_EntityList:GetClientEntity(g_EngineClient:GetLocalPlayer())
  689.         local getplayer = localplayer:GetPlayer()
  690.         local active_weapon = getplayer:GetActiveWeapon()
  691.        
  692.         exploits.OverrideDoubleTapSpeed(14)
  693.         g_CVar:FindVar("cl_clock_correction"):SetInt(0)
  694.         g_CVar:FindVar("cl_clock_correction_adjustment_max_amount"):SetInt(450)
  695.         if active_weapon:GetProp("DT_BaseAttributableItem", "m_iItemDefinitionIndex") == 38 or active_weapon:GetProp("DT_BaseAttributableItem", "m_iItemDefinitionIndex") == 11 then
  696.             if g_Config:FindVar("Aimbot", "Ragebot", "Exploits", "Double Tap"):GetBool() then g_Config:FindVar("Aimbot", "Anti Aim", "Fake Lag", "Enable Fake Lag"):SetBool(false) else g_Config:FindVar("Aimbot", "Anti Aim", "Fake Lag", "Enable Fake Lag"):SetBool(true) end
  697.         else
  698.             g_Config:FindVar("Aimbot", "Anti Aim", "Fake Lag", "Enable Fake Lag"):SetBool(true)
  699.         end
  700.    
  701.         g_Config:FindVar("Aimbot", "Anti Aim", "Fake Lag", "Enable Fake Lag"):SetBool(true)
  702.  
  703.         if (c_menu_doubletap_debug_mode:GetBool()) then
  704.         print("[DOUBLETAP] TICKS: SONIC | PRESERVE: -1 | CORRECTION: DISABLED ")
  705.         end
  706.     else
  707.         g_Config:FindVar("Aimbot", "Anti Aim", "Fake Lag", "Enable Fake Lag"):SetBool(true)
  708.     end
  709.     end
  710.     end
  711.     end  
  712. end
  713.  
  714. local function air_stuck(cmd)
  715.  
  716.     if c_menu_air_stuck:GetBool() then --Air stuck xDDD
  717.         cmd.tick_count = 0x7FFFFFFF
  718.         cmd.command_number = 0x7FFFFFFF
  719.     end
  720.  
  721. end
  722. --EXPLOITS
  723.  
  724. --FAKELAG
  725.  
  726. local function adaptive_fakelag()
  727.     local local_idx = g_EngineClient:GetLocalPlayer()
  728.     local local_entity = g_EntityList:GetClientEntity(local_idx)
  729.     local sent_packets_num = fakelag.SentPackets()
  730.     local oldOrigin
  731.     if local_entity == nil then
  732.       return
  733.     end
  734.     local is_key_pressed = cheat.IsKeyDown(0x45)
  735.     local local_player = local_entity:GetPlayer();
  736.     local wish_ticks = 0
  737.     local adaptive_ticks = 2
  738.     local speed_x = local_player:GetProp("DT_BasePlayer", "m_vecVelocity[0]")
  739.     local GetAbsOrigin = local_player:GetProp("DT_BasePlayer", "m_vecAbsOrigin")
  740.     local speed_y = local_player:GetProp("DT_BasePlayer", "m_vecVelocity[1]")
  741.     local speed_per_tick = math.sqrt(speed_x * speed_x + speed_y * speed_y) *  g_GlobalVars.interval_per_tick
  742.  
  743.     while (wish_ticks * speed_per_tick) <= 68.0 do
  744.         if (((adaptive_ticks - 1) * speed_per_tick) > 68.0) then
  745.           wish_ticks = wish_ticks + 1;
  746.           break
  747.         end
  748.        
  749.         if ((adaptive_ticks * speed_per_tick) > 68.0) then
  750.           wish_ticks = wish_ticks + 2;
  751.           break
  752.         end
  753.        
  754.         if ((adaptive_ticks + 1) * speed_per_tick) > 68.0 then
  755.           wish_ticks = wish_ticks + 3;
  756.           break
  757.         end
  758.        
  759.         if ((adaptive_ticks + 2) * speed_per_tick) > 68.0 then
  760.           wish_ticks = wish_ticks + 4;
  761.           break
  762.         end
  763.        
  764.         adaptive_ticks = adaptive_ticks + 5;
  765.         wish_ticks = wish_ticks + 5;
  766.    
  767.         if adaptive_ticks > 15 then
  768.           break
  769.         end
  770.     end
  771.  
  772.     local weapon = local_player:GetActiveWeapon();
  773.     if weapon ~= nil then
  774.       if weapon:GetWeaponID() == 64 then
  775.         if wish_ticks > 15  then
  776.           wish_ticks = 15
  777.         end
  778.       end
  779.     end
  780.     if is_key_pressed then
  781.         fakelag.SetState(false)
  782.     end
  783.     if g_ClientState.m_choked_commands < wish_ticks then
  784.       fakelag.SetState(false)
  785.     end
  786. end
  787.  
  788. local function fluctuate_fakelag()
  789.    
  790.     local random1 = 0
  791.     local random2 = 0
  792.     local used = false
  793.  
  794.     if used then
  795.         random1 = math.random(1, c_menu_fakelag_fluctuate_timing:GetFloat())
  796.         used = false
  797.     else
  798.         random1 = math.random(1, c_menu_fakelag_fluctuate_timing:GetFloat())
  799.         used = true
  800.     end
  801.  
  802.     if random1 == 1 then
  803.         menu_fakelag_limit:SetInt(0)
  804.        
  805.     else
  806.         menu_fakelag_limit:SetInt(15)
  807.     end
  808.    
  809. end
  810.  
  811. local last = 0
  812. local state = true
  813. local function leg_fucker()
  814.     local cur = g_GlobalVars.curtime
  815.     local local_player = g_EntityList:GetClientEntity(g_EngineClient:GetLocalPlayer())
  816.     local player = local_player:GetPlayer()
  817.  
  818.     if (c_menu_exploits_legs:GetBool()) then
  819.      menu_leg_movement:SetInt(utils.RandomInt(1, 2))
  820.     end
  821. end
  822.  
  823. local function fake_lag()
  824.     local local_idx = g_EngineClient:GetLocalPlayer()
  825.     local local_entity = g_EntityList:GetClientEntity(local_idx)
  826.     local local_player = local_entity:GetPlayer();
  827.  
  828.     if (c_menu_fakelag_modes:GetInt()) == 0 and dt_charging == false then --adaptive fakelag (AIMWARE_PASTED)
  829.         adaptive_fakelag()
  830.    
  831.     else if (c_menu_fakelag_modes:GetInt()) == 1 then --fluctuate fakelag
  832.         fluctuate_fakelag()
  833.     end
  834. end  
  835. end
  836. --FAKELAG
  837.  
  838. --VISUALS
  839.  
  840.  
  841. local font1 = g_Render:InitFont("Verdana", 55)
  842.  
  843. local get_screen = g_EngineClient:GetScreenSize()
  844. local FPLx = Vector2.new((get_screen.x /2) - 54, (get_screen.y /2) + 30)
  845. local FPLy = Vector2.new((get_screen.x /2) - 30, (get_screen.y /2) + 56)
  846. local FPLz = Vector2.new((get_screen.x /2) - 51, (get_screen.y /2) + 55)
  847. local FPRx = Vector2.new((get_screen.x /2) + 54, (get_screen.y /2) + 30)
  848. local FPRy = Vector2.new((get_screen.x /2) + 30, (get_screen.y /2) + 56)
  849. local FPRz = Vector2.new((get_screen.x /2) + 51, (get_screen.y /2) + 55)
  850. local FPLxx = Vector2.new((get_screen.x /2) - 56, (get_screen.y /2) + 29)
  851. local FPLyy = Vector2.new((get_screen.x /2) - 32, (get_screen.y /2) + 55)
  852. local FPLzz = Vector2.new((get_screen.x /2) - 53, (get_screen.y /2) + 54)
  853. local FPRxx = Vector2.new((get_screen.x /2) + 53, (get_screen.y /2) + 29)
  854. local FPRyy = Vector2.new((get_screen.x /2) + 29, (get_screen.y /2) + 55)
  855. local FPRzz = Vector2.new((get_screen.x /2) + 50, (get_screen.y /2) + 54)
  856. local LPx = Vector2.new((get_screen.x /2) - 43, (get_screen.y /2) + 13)
  857. local LPy = Vector2.new((get_screen.x /2) - 43, (get_screen.y /2) - 7)
  858. local LPz = Vector2.new((get_screen.x /2) - 63, (get_screen.y /2) + 3)
  859. local RPx = Vector2.new((get_screen.x /2) + 42, (get_screen.y /2) + 13)
  860. local RPy = Vector2.new((get_screen.x /2) + 42, (get_screen.y /2) - 7)
  861. local RPz = Vector2.new((get_screen.x /2) + 62, (get_screen.y /2) + 3)
  862. local LPxx = Vector2.new((get_screen.x /2) - 42, (get_screen.y /2) + 14)
  863. local LPyy = Vector2.new((get_screen.x /2) - 42, (get_screen.y /2) - 6)
  864. local LPzz = Vector2.new((get_screen.x /2) - 62, (get_screen.y /2) + 4)
  865. local RPxx = Vector2.new((get_screen.x /2) + 42, (get_screen.y /2) + 14)
  866. local RPyy = Vector2.new((get_screen.x /2) + 42, (get_screen.y /2) - 6)
  867. local RPzz = Vector2.new((get_screen.x /2) + 62, (get_screen.y /2) + 4)
  868. local BPx = Vector2.new((get_screen.x /2) + 9, (get_screen.y /2) + 47)
  869. local BPy = Vector2.new((get_screen.x /2) - 11, (get_screen.y /2) + 47)
  870. local BPz = Vector2.new((get_screen.x /2) - 1, (get_screen.y /2) + 67)
  871. local BPxx = Vector2.new((get_screen.x /2) + 10, (get_screen.y /2) + 48)
  872. local BPyy = Vector2.new((get_screen.x /2) - 10, (get_screen.y /2) + 48)
  873. local BPzz = Vector2.new((get_screen.x /2), (get_screen.y /2) + 68)
  874. local function indicators_visuals()
  875.  
  876.     local color_inactive2 = Color.new(0 / 255, 0 / 255 ,0 / 255, 150 / 255)
  877.     local get_screen = g_EngineClient:GetScreenSize()
  878.     local pos_start = Vector2.new(1010,get_screen.y -  558)
  879.     local text_size = 35
  880.     local pos_add = Vector2.new(0, text_size)
  881.     local cur_pos = 0
  882.     local pos_start1 = Vector2.new(900,get_screen.y -  558)
  883.     local cur_pos1 = 0
  884.     if (c_menu_arrows_type:GetInt() == 2 and c_menu_arrows:GetBool()) then  
  885.  
  886.     g_Render:PolyFilled(color_inactive2, LPxx, LPyy, LPzz)
  887.     g_Render:PolyFilled(color_inactive2, RPxx, RPyy, RPzz)
  888.     g_Render:PolyFilled(color_inactive2, BPxx, BPyy, BPzz)
  889.  
  890.     if (menu_invert_side:GetBool()) then
  891.         g_Render:PolyFilled(c_menu_arrow_color:GetColor(), FPRxx, FPRyy, FPRzz)
  892.     end
  893.     if (not menu_invert_side:GetBool()) then
  894.         g_Render:PolyFilled(c_menu_arrow_color:GetColor(), FPLxx, FPLyy, FPLzz)
  895.     end
  896.     if menu_antiaim_manual:GetInt()==1 then
  897.          g_Render:PolyFilled(c_menu_arrow_color:GetColor(), BPx, BPy, BPz) -- backwards
  898.     elseif  menu_antiaim_manual:GetInt()==2 then
  899.         g_Render:PolyFilled(c_menu_arrow_color:GetColor(), RPx, RPy, RPz) -- right
  900.  
  901.     elseif  menu_antiaim_manual:GetInt()==3 then
  902.         g_Render:PolyFilled(c_menu_arrow_color:GetColor(), LPx, LPy, LPz) -- left
  903.  
  904.     end
  905. end
  906. if (c_menu_arrows_type:GetInt() == 3 and c_menu_arrows:GetBool()) then  
  907.  
  908. g_Render:CirclePart(Vector2.new(960.0, 541), 20.0, 58, Color.new(0, 0, 0, 100 / 255), math.rad(0), math.rad(360), 5.0)
  909.  
  910. if (menu_invert_side:GetBool()) then
  911.     g_Render:CirclePart(Vector2.new(960.0, 541), 20.0, 58, c_menu_arrow_color:GetColor(), math.rad(810.3), math.rad(630.3), 5.0)
  912. end
  913. if (not menu_invert_side:GetBool()) then
  914.     g_Render:CirclePart(Vector2.new(960.0, 541), 20.0, 58, c_menu_arrow_color:GetColor(), math.rad(90), math.rad(270), 5.0)
  915. end
  916. end
  917.  
  918.   local function GetColorFromBoolArrow(val)
  919.      return val and c_menu_arrow_color:GetColor() or c_menu_arrow_color:GetColor()
  920.   end
  921.  
  922.   local function arrow(str, val)
  923.     g_Render:Text(str, cur_pos,  GetColorFromBoolArrow(val),  text_size, font1)
  924.     cur_pos = cur_pos - pos_add
  925.   end
  926.   local function arrow2(str, val)
  927.     g_Render:Text(str, cur_pos1,  GetColorFromBoolArrow(val),  text_size, font1)
  928.     cur_pos1 = cur_pos1 - pos_add
  929.   end
  930.  
  931.   cur_pos = pos_start
  932.   cur_pos1 = pos_start1
  933.  
  934.   if (c_menu_arrows_type:GetInt() == 0) then
  935.   if c_menu_arrows:GetBool() and menu_invert_side:GetBool() then
  936.       arrow(")", c_menu_arrows:GetBool() )
  937.   end
  938.   if c_menu_arrows:GetBool() and not menu_invert_side:GetBool() then
  939.       arrow2("(", c_menu_arrows:GetBool() )
  940.   end
  941. end
  942.  
  943. if (c_menu_arrows_type:GetInt() == 1) then
  944.     if c_menu_arrows:GetBool() and menu_invert_side:GetBool() then
  945.         arrow(">", c_menu_arrows:GetBool() )
  946.     end
  947.     if c_menu_arrows:GetBool() and not menu_invert_side:GetBool() then
  948.         arrow2("<", c_menu_arrows:GetBool() )
  949.     end
  950.   end
  951.  
  952. end
  953.  
  954.    
  955.  
  956. --VISUALS
  957.  
  958. --MISC
  959.  
  960.  
  961. local function kill_say_function(event)
  962.  
  963. local words_kill = c_menu_kill_say_words:GetString()
  964. local words_hurt = c_menu_hurt_say_words:GetString()
  965.  
  966.     if event:GetName() == "player_death" then
  967.  
  968.         local victim = g_EngineClient:GetPlayerForUserId(event:GetInt("userid"))
  969.         local attacker = g_EngineClient:GetPlayerForUserId( event:GetInt("attacker"))
  970.  
  971.         if victim ~= attacker and attacker == g_EngineClient:GetLocalPlayer() and c_menu_kill_say:GetBool() then
  972.             g_EngineClient:ExecuteClientCmd('say ' .. words_kill)
  973.         end
  974.  
  975.     else if event:GetName() == "player_hurt" then
  976.  
  977.         local victim = g_EngineClient:GetPlayerForUserId(event:GetInt("userid"))
  978.         local attacker = g_EngineClient:GetPlayerForUserId( event:GetInt("attacker"))
  979.  
  980.         if victim ~= attacker and attacker == g_EngineClient:GetLocalPlayer() and c_menu_hurt_say:GetBool() then
  981.             g_EngineClient:ExecuteClientCmd('say ' .. words_hurt)
  982.         end
  983.     end
  984. end
  985. end
  986.  
  987.  
  988.  
  989. --MISC
  990.  
  991. --ANTIAIM
  992. local function vec_distance(vec_one, vec_two)
  993.  
  994.     local delta_x, delta_y, delta_z = vec_one.x - vec_two.x, vec_one.y - vec_two.y
  995.  
  996.     return math.sqrt(delta_x * delta_x + delta_y * delta_y)
  997.  
  998. end
  999.  
  1000. local function get_closest_enemy()
  1001.     local best_dist = c_menu_anti_brute_fov_slider:GetFloat()
  1002.     local best_enemy = nil
  1003.     local local_player = g_EntityList:GetClientEntity(g_EngineClient:GetLocalPlayer())
  1004.     local local_origin = local_player:GetProp("DT_BaseEntity", "m_vecOrigin")
  1005.     local local_screen_orig = g_Render:ScreenPosition(local_origin)
  1006.     local screen = g_EngineClient:GetScreenSize()
  1007.  
  1008.     for idx = 1, g_GlobalVars.maxClients + 1 do
  1009.         local ent = g_EntityList:GetClientEntity(idx)
  1010.         if ent and ent:IsPlayer() then
  1011.             local player = ent:GetPlayer()
  1012.             local health = player:GetProp("DT_BasePlayer", "m_iHealth")
  1013.  
  1014.             if not player:IsTeamMate() and health > 0 and not player:IsDormant() then
  1015.                 local origin = ent:GetProp("DT_BaseEntity", "m_vecOrigin")
  1016.                 local screen_orig = g_Render:ScreenPosition(origin)
  1017.                 local temp_dist = vec_distance(Vector2.new(screen.x / 2, screen.y / 2), screen_orig)
  1018.  
  1019.                 if(temp_dist < best_dist) then
  1020.                     best_dist = temp_dist
  1021.                     best_enemy = ent
  1022.                 end
  1023.             end
  1024.         end
  1025.     end
  1026.  
  1027.     return best_enemy
  1028. end
  1029.  
  1030. local function AA_Anti_Brute_Force(e)
  1031.  
  1032.       if e:GetName() == "weapon_fire" and c_menu_anti_brute:GetBool() then --Weapon Fire event later we run FOV check so we can make sure the bullet is on our direction!
  1033.         local user_id = e:GetInt("userid", -1)
  1034.         local user = g_EntityList:GetClientEntity(g_EngineClient:GetPlayerForUserId(user_id)) --Get Enemy Entity
  1035.         local local_player = g_EntityList:GetClientEntity(g_EngineClient:GetLocalPlayer()) --Get Local Entity
  1036.         local player = local_player:GetPlayer()
  1037.         local health = player:GetProp("DT_BasePlayer", "m_iHealth")
  1038.        
  1039.  
  1040.         if(health > 0) then -- if our local player is alive we run the AntiBrute Logic!
  1041.          
  1042.             local closest_enemy = get_closest_enemy() --Get Closest enemy based on distance
  1043.             if(closest_enemy ~= nil and user:EntIndex() == closest_enemy:EntIndex()) then
  1044.               miss_counter = miss_counter + 1 --Basic so we calculate missed shots of enemy also some checks so if we get hit don't run the code!
  1045.              
  1046.                  if (miss_counter % 3 == 0) then --Logic 1
  1047.                  
  1048.                     menu_left_limit:SetInt(c_menu_anti_brute_1stshot:GetInt())
  1049.                     menu_invert_side:SetBool(true)    
  1050.                     left_side = true                  
  1051.                     if (c_menu_anti_brute_debug_mode:GetBool()) then
  1052.                         print("[ANTI-BRUTE] Angle overrided to (" .. c_menu_anti_brute_1stshot:GetInt() .. ") [INFO: PASST 3RD SIDE | NEXT ANGLE = (" .. c_menu_anti_brute_2ndshot:GetInt() ..") INVERTER:TRUE]" )
  1053.                     end
  1054.                 else if (miss_counter % 3 == 1) then --Logic 2
  1055.                     menu_right_limit:SetInt(c_menu_anti_brute_2ndshot:GetInt())
  1056.                     menu_invert_side:SetBool(false)
  1057.                     right_side = true
  1058.                     if (c_menu_anti_brute_debug_mode:GetBool()) then
  1059.                         print("[ANTI-BRUTE] Angle overrided to (" .. c_menu_anti_brute_2ndshot:GetInt() .. ") [INFO: PASST 1ST SIDE | NEXT ANGLE = (" .. c_menu_anti_brute_3rdshot:GetInt() ..") INVERTER:FALSE]" )
  1060.                     end
  1061.  
  1062.                 else if (miss_counter % 3 == 2) then --Logic 3
  1063.                     menu_right_limit:SetInt(c_menu_anti_brute_3rdshot:GetInt())
  1064.                     menu_left_limit:SetInt(c_menu_anti_brute_3rdshot:GetInt())
  1065.          
  1066.                     ideal_yaw = true
  1067.                     if (c_menu_anti_brute_debug_mode:GetBool()) then
  1068.                         print("[ANTI-BRUTE] Angle overrided to (" .. c_menu_anti_brute_3rdshot:GetInt() .. ") [INFO: PASST 2ND SIDE | NEXT ANGLE = (" .. c_menu_anti_brute_1stshot:GetInt() ..") INVERTER:TRUE]" )
  1069.                     end
  1070.                 end
  1071.                 end
  1072.                 end
  1073.             end
  1074.         end
  1075.     end
  1076. end
  1077. --ANTIAIM
  1078.  
  1079. --IND
  1080.  
  1081. local function text_indicators()
  1082.  
  1083.     local clr_green = Color.new(146.1, 255.1, 36.1, 0.9)
  1084.     local clr_orange = Color.new(255.1, 183.1, 0.1, 0.9)
  1085.     local clr_red = Color.new(255, 0, 0)
  1086.     local clr_blue = Color.new(36.1, 164.1, 255.1, 255.9)
  1087.     local screen = g_EngineClient:GetScreenSize()
  1088.     local pos_start = Vector2.new(c_menu_x:GetFloat(),screen.y -  c_menu_y:GetFloat())
  1089.     local text_size = 13
  1090.     local pos_add = Vector2.new(0, text_size)
  1091.     local cur_pos = Vector2.new(0, 0) -- current frame
  1092.    
  1093.     -------------------------------------------------------------FAKEDUCK
  1094.     local function GetColorFromBool(val)
  1095.         return val and clr_green or clr_red
  1096.     end
  1097.    
  1098.     local function RenderIndicator(str, val)
  1099.         g_Render:Text(str, cur_pos,  GetColorFromBool(val),  text_size, true)
  1100.         cur_pos = cur_pos - pos_add
  1101.     end
  1102.    
  1103.     -------------------------------------------------------------DOUBLETAP
  1104.     local function dtchargeind(str, r,g,b)
  1105.         g_Render:Text(str, cur_pos, Color.new(r,g,b),text_size, true)
  1106.         cur_pos = cur_pos - pos_add
  1107.     end
  1108.     -------------------------------------------------------------------------------
  1109.  
  1110.      local ideal_ind_clr = Color.new(230 / 255, 184 / 255, 0 / 255, 0.9)
  1111.  
  1112.      local function ideal_indclr(val)
  1113.         return val and ideal_ind_clr or ideal_ind_clr
  1114.      end
  1115.  
  1116.      local function ideal_ind(str, val)
  1117.         g_Render:Text(str, cur_pos,  ideal_indclr(val),  text_size, true)
  1118.         cur_pos = cur_pos - pos_add
  1119.     end
  1120.  
  1121.     local function GetColorFromBool1(val)
  1122.         return val and clr_red or clr_red
  1123.     end
  1124.    
  1125.     local function RenderIndicator1(str, val)
  1126.         g_Render:Text(str, cur_pos,  GetColorFromBool1(val),  text_size, true)
  1127.         cur_pos = cur_pos - pos_add
  1128.     end
  1129.   -------------------------------------------------------------
  1130. local prefer_color = Color.new(208 / 255, 187 / 255, 252 / 255, 0.9)
  1131. local function prefersafebool(val)
  1132.     return val and prefer_color or prefer_color
  1133. end
  1134.  
  1135. local function prefersafe(str, val)
  1136.     g_Render:Text(str, cur_pos,  prefersafebool(val),  text_size)
  1137.     cur_pos = cur_pos - pos_add
  1138. end
  1139. -------------------------------------------------------------------------------
  1140. --------------------------------------------------------------------------------
  1141.     cur_pos = pos_start
  1142.    
  1143.     if c_menu_text_indicators:GetBool() then
  1144.        
  1145.  
  1146.         if exploits.GetCharge() ~= 1  then
  1147.             dt_charging = false
  1148.            dtchargeind("DT", 255, 0,0)
  1149.         else
  1150.             dt_charging = true
  1151.            dtchargeind("DT", 146 / 255, 255 / 255, 36 / 255, 0.9)
  1152.         end
  1153.      
  1154.         if menu_fakeduck:GetBool()  then --FD
  1155.             RenderIndicator("FD", menu_fakeduck:GetBool() )
  1156.         end
  1157.         if (ideal_yaw == true) then
  1158.             ideal_ind("IDEAL YAW")
  1159.         end
  1160.        
  1161.           prefersafe("PREDICTION")
  1162.  
  1163.           if (menu_safe_point:GetInt() > 0) then
  1164.             prefersafe("SAFETY")
  1165.           end
  1166.         if not menu_invert_side:GetBool() then
  1167.             RenderIndicator1("LEFT")
  1168.         end
  1169.         if (menu_invert_side:GetBool()) then
  1170.             RenderIndicator1("RIGHT")
  1171.         end
  1172.     end
  1173.  end      
  1174.    
  1175.    
  1176.        
  1177.    
  1178.  
  1179. --IND
  1180.  
  1181.  
  1182.  
  1183. local function watermarker()
  1184.     g_Render:GradientBoxFilled(Vector2.new(1569.0, 30.0), Vector2.new(1918.0, 2.0), Color.new(0, 0, 0, 2 / 255), Color.new(0, 0, 0, 255 / 255), Color.new(0, 0, 0, 2 / 255), Color.new(0, 0, 0, 255 / 255))
  1185.     g_Render:Text("test lua", Vector2.new(1820.0, 9.0), Color.new(1.0, 1.0, 1.0, 1.0), 13, false)
  1186.     g_Render:Text("Welcome " .. username, Vector2.new(1599.3, 9.0), Color.new(1.0, 1.0, 1.0, 1.0), 14, false)
  1187.     g_Render:Text("[ALPHA BUILD] ", Vector2.new(1705.3, 9.0), Color.new(1.0, 1.0, 1.0, 1.0), 14, false)
  1188.  
  1189. end
  1190.  
  1191. --CALLBACKS
  1192. local function draw()
  1193.     local localplayer = g_EntityList:GetClientEntity(g_EngineClient:GetLocalPlayer())
  1194.     if localplayer then
  1195.         localplayer = localplayer:GetPlayer()
  1196.     else
  1197.         return
  1198.     end
  1199.     if (g_EngineClient:IsConnected()) then
  1200.         if (c_menu_watermarker:GetBool()) then
  1201.             watermarker()
  1202.         end
  1203.  
  1204.     end
  1205.     if localplayer:m_iHealth() > 0 then
  1206.         aimbot_draw()
  1207.         indicators_visuals()
  1208.         text_indicators()
  1209.         if (c_menu_custom_impacts:GetBool()) then
  1210.             draw_impacts()
  1211.         end
  1212.     end    
  1213.  
  1214.  
  1215. end
  1216. local function pre_prediction(cmd)
  1217.  
  1218.    
  1219.     air_stuck(cmd)
  1220.     aimbot(cmd)
  1221.     instant_recharge()
  1222.     fake_lag()
  1223.  
  1224.  
  1225. end
  1226. local function prediction()
  1227.     body_lean()
  1228.  
  1229. end
  1230. local function createmove()
  1231.     antiaim_helpers()
  1232.     exploits_func()
  1233.     leg_fucker()
  1234.  
  1235.  
  1236. end
  1237. local function events(e)
  1238.    
  1239.     kill_say_function(e)
  1240.     AA_Anti_Brute_Force(e)
  1241.     impacts_events(e)
  1242.  
  1243.  
  1244. end
  1245.  
  1246. cheat.RegisterCallback("draw", draw)
  1247. cheat.RegisterCallback("pre_prediction", pre_prediction)
  1248. cheat.RegisterCallback("prediction", prediction)
  1249. cheat.RegisterCallback("createmove", createmove)
  1250. cheat.RegisterCallback("events", events)
  1251.  
  1252. end
  1253.  
  1254. if buff == "" then
  1255.     local textbox = menu.TextBox("Init", "Username", 64, "", "What username do you want to use?")
  1256.     local button = menu.Button("Init", "Confirm")
  1257.  
  1258.     --local done
  1259.  
  1260.     button:RegisterCallback(function()
  1261.         --if done == true then return end
  1262.         --done = true
  1263.         ffi.C.WriteFile(pfile, ffi.cast("char*", textbox:GetString()), #textbox:GetString(), nil, 0)
  1264.         username = textbox:GetString()
  1265.         menu.DestroyItem(textbox)
  1266.         menu.DestroyItem(button)
  1267.         initlua()
  1268.     end)
  1269. else
  1270.     local textbox = menu.TextBox("Init", "Username", 64, "", "What username do you want to use?")
  1271.         local button = menu.Button("Init", "Confirm")
  1272.         menu.DestroyItem(textbox)
  1273.         menu.DestroyItem(button)
  1274.     initlua()
  1275. end
  1276.  
  1277. --CALLBACKS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement