Crack Lua [NL] Dormant aimbot by Peepl

Пользователь
Статус
Оффлайн
Регистрация
2 Май 2022
Сообщения
356
Реакции[?]
46
Поинты[?]
24K

Данный скрипт не проверялся модераторами, так как является кряком приватной LUA и в нём может присутствовать обфускация. Даже известные пользователи могут выложить вредоносный скрипт под видом крякнутого, поэтому любое использование исключительно на свой страх и риск.

code_language.lua:
local hboxes = {} -- in lua api
hboxes["head"]            = 0
hboxes["neck"]            = 1
hboxes["pelvis"]          = 2
hboxes["stomach"]         = 3
hboxes["lower_chest"]     = 4
hboxes["chest"]           = 5
hboxes["upper_chest"]     = 6
hboxes["left_thigh"]      = 7
hboxes["right_thigh"]     = 8
hboxes["left_calf"]       = 9
hboxes["right_calf"]      = 10
hboxes["left_foot"]       = 11
hboxes["right_foot"]      = 12
hboxes["left_hand"]       = 13
hboxes["right_hand"]      = 14
hboxes["left_upper_arm"]  = 15
hboxes["left_forearm"]    = 16
hboxes["right_upper_arm"] = 17
hboxes["right_forearm"]   = 18

-- ui
local ui_dormant             = ui.create("Dormant Aimbot")
local ui_dormant_switch      = ui_dormant:switch("Dormant Aimbot", false)
local ui_dormant_logs        = ui_dormant:switch("Logs", false)

local ui_settings            = ui.create("Settings")
local ui_settings_hitboxes   = ui_settings:selectable("Hitboxes", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet")

local ui_settings_mindmg     = ui_settings:slider("Minimum Damage", 1, 100, 1)
local ui_settings_hitchance  = ui_settings:slider("Hitchance", 1, 100, 70)
local ui_settings_alpha      = ui_settings:slider("Alpha Modulator", 1, 1000, 300, 0.001)

local ui_accuracy            = ui.create("Accuracy")
local ui_accuracy_autoscope  = ui_accuracy:switch("Auto Scope", false)
local ui_accuracy_autostop   = ui_accuracy:switch("Auto Stop", false)

local dormant_aimbot = new_class()
    :struct 'consts' {
        WEAPONTYPE_UNKNOWN          = -1,
        WEAPONTYPE_KNIFE            = 0,
        WEAPONTYPE_PISTOL        = 1,
        WEAPONTYPE_SUBMACHINEGUN = 2,
        WEAPONTYPE_RIFLE         = 3,
        WEAPONTYPE_SHOTGUN       = 4,
        WEAPONTYPE_SNIPER_RIFLE  = 5,
        WEAPONTYPE_MACHINEGUN    = 6,
        WEAPONTYPE_C4            = 7,
        WEAPONTYPE_TASER         = 8,
        WEAPONTYPE_GRENADE       = 9,
        WEAPONTYPE_HEALTHSHOT      = 11,

        hbox_radius              = { 4.2, 3.5, 6.0, 6.0, 6.5, 6.2, 5.0, 5.0, 5.0, 4.0, 4.0, 3.6, 3.7, 4.0, 4.0, 3.3, 3.0, 3.3, 3.0 },
        hbox_factor              = { 0.5, 0.1, 0.8, 0.8, 0.7, 0.7, 0.7, 0.5, 0.5, 0.5, 0.5, 0.4, 0.4, 0.4, 0.4, 0.5, 0.5, 0.5, 0.5 },
        hitgroup_str             = { [0] = "generic", "head", "chest", "stomach", "left arm", "right arm", "left leg", "right leg", "neck", "generic", "gear" }
    }
    :struct 'aimbot_shot' {
        tickcount = nil,
        victim    = nil,
        hitchance = nil,
        hitgroup  = nil,
        damage    = nil,
        handled   = nil
    }
    :struct 'variables' {
        hbox_state       = { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
        is_reachable     = {},

        cmd              = nil,
        lp               = nil,
        eyepos           = nil,

        weapon           = nil,
        weapon_info      = nil,
        weapon_type      = nil,
        range_modifier   = nil,
        armor_resist     = nil,

        camera_position  = nil,
        camera_direction = nil,

        mindmg           = nil,
        minhc            = nil,

        dmg              = nil,
        dmg_is_wrong     = nil,

        initialize       = function(self, cmd)
            self.cmd              = cmd
            self.lp               = entity.get_local_player()
            self.eyepos           = self.lp:get_eye_position()

            self.weapon           = self.lp:get_player_weapon()
            self.weapon_info      = self.weapon:get_weapon_info()
            self.weapon_type      = self.weapon_info["weapon_type"]
            self.range_modifier   = self.weapon_info["range_modifier"]
            self.armor_resist     = 1.0 - self.weapon_info["armor_ratio"] * 0.5

            self.camera_position  = render.camera_position()
            self.camera_direction = vector():angles(render.camera_angles())

            self.mindmg           = ui_settings_mindmg:get()
            self.minhc            = ui_settings_hitchance:get()

            self.dmg_is_wrong = false
        end,
    }
    :struct 'aimbot' {
        get_hitgroup_index = function(self, hbox)
            if hbox == 1 then
                return 1
            end
            if hbox == 2 then
                return 8
            end
            if 3 <= hbox and hbox <= 4 then
                return 3
            end
            if 5 <= hbox and hbox <= 7 then
                return 2
            end
            if 8 <= hbox and hbox <= 13 then
                if hbox % 2 == 0 then
                    return 6
                else
                    return 7
                end
            end
            if 14 <= hbox and hbox <= 19 then
                if hbox % 2 == 1 then
                    return 4
                else
                    return 5
                end
            end

            return 0 -- a little bit incorrect but who cares?
        end,

        get_hitgroup_name = function(self, hbox)
            return self.consts.hitgroup_str[self:get_hitgroup_index(hbox)]
        end,

        get_damage_multiplier = function(self, hbox)
            local hgroup = self:get_hitgroup_name(hbox)
            if hgroup == "head" then
                return 4.0
            end
            if hgroup == "stomach" then
                return 1.25
            end
            if hgroup == "left leg" or hgroup == "right leg" then
                return 0.75
            end

            return 1.0
        end,

        get_weighted_damage = function(self, hbox, dmg) -- safety order: stomach, chest, limbs, head (head is so fucking unsafe)
            local hgroup = self:get_hitgroup_name(hbox)

            if hgroup == "head" or hgroup == "neck" then
                return dmg * 0.125
            end
            if hgroup == "legs" then
                return dmg * 0.25
            end
            if hgroup == "chest" then
                return dmg * 0.67
            end
            if hgroup == "stomach" then
                return dmg
            end

            return 0
        end,

        get_hbox_radius = function(self, hbox)
            if hbox == nil then
                return 0.0
            end
    
            return self.consts.hbox_radius[hbox] * self.consts.hbox_factor[hbox]
        end,

        calculate_hc = function(self, inaccuracy, point, radius) -- [0, 1]
            -- if x -> 0 then tan(x) ~ x therefore R ~ distance * inaccuracy
            -- max distance is 8192 so R <= 8192 * inaccuracy
            -- hc = (radius / R) ^ 2 >= (radius / (8192 * inaccuracy)) ^ 2
            -- so if (radius / (8192 * inaccuracy)) ^ 2 >= 100 then hc >= 100
            -- assume that radius >= 0.1
            -- then inaccuracy <= 1 / 819200 < 1e-6
            -- so if inaccuracy < 1e-6 then hc > 100
            if inaccuracy < 1e-6 then
                return 1.0
            end

            local distance = self.variables.eyepos:dist(point)
            local R = distance * math.tan(inaccuracy * 0.5) -- / 2 cuz of geometry

            return math.min(radius * radius / (R * R), 1.0)
        end,

        max_hc = function(self, point, radius) -- [0, 1]
            if self.variables.weapon_type == self.consts.WEAPONTYPE_SNIPER_RIFLE and (ui_accuracy_autoscope:get() or self.variables.lp["m_bIsScoped"]) then
                if self.variables.cmd.in_duck == 1 then
                    return self:calculate_hc(self.variables.weapon_info["inaccuracy_crouch_alt"], point, radius)
                else
                    return self:calculate_hc(self.variables.weapon_info["inaccuracy_stand_alt"], point, radius)
                end
            else
                if self.variables.cmd.in_duck == 1 then
                    return self:calculate_hc(self.variables.weapon_info["inaccuracy_crouch"], point, radius)
                else
                    return self:calculate_hc(self.variables.weapon_info["inaccuracy_stand"], point, radius)
                end
            end
        end,

        sign = function(self, value)
            return value >= 0.0 and 1 or -1
        end,

        vector_ratio = function(self, vec1, vec2) -- returns nil if vectors arent collinear
            local are_opposite

            if self:sign(vec1.x) == self:sign(vec2.x) and self:sign(vec1.y) == self:sign(vec2.y) and self:sign(vec1.z) == self:sign(vec2.z) then
                are_opposite = false
            elseif self:sign(vec1.x) ~= self:sign(vec2.x) and self:sign(vec1.y) ~= self:sign(vec2.y) and self:sign(vec1.z) ~= self:sign(vec2.z) then
                are_opposite = true
            else
                return nil
            end

            vec1 = vector(math.abs(vec1.x), math.abs(vec1.y), math.abs(vec1.z))
            vec2 = vector(math.abs(vec2.x), math.abs(vec2.y), math.abs(vec2.z))

            local lx = (vec1.x - 0.05) / (vec2.x + 0.05)
            local rx = (vec1.x + 0.05) / (vec2.x - 0.05)
            local ly = (vec1.y - 0.05) / (vec2.y + 0.05)
            local ry = (vec1.y + 0.05) / (vec2.y - 0.05)
            local lz = (vec1.z - 0.05) / (vec2.z + 0.05)
            local rz = (vec1.z + 0.05) / (vec2.z - 0.05)

            local l = math.max(lx, ly, lz)
            local r = math.min(rx, ry, rz)

            if l <= r then
                local ratio = l + (r - l) * 0.5
                return -ratio and are_opposite or ratio
            end
            
            return nil
        end,

        calc_true_damage = function(self, hbox, target_hbox_pos, armor, has_helmet)
            local dmg, trace = utils.trace_bullet(self.variables.lp, self.variables.eyepos, target_hbox_pos)
        
            if dmg == 0 then
                local vec_target = target_hbox_pos - self.variables.eyepos
                local vec_trace  = trace.end_pos - self.variables.eyepos
                local ratio = self:vector_ratio(vec_target, vec_trace) -- vec_target(trace).x(y)(z) > 0.05 (its achieveable only if you stand right next to enemy, but then it's not dormant)

                if ratio ~= nil and ratio < 1.0 then -- if bullet stopped after "hitting" enemy we can shoot and deal some dmg, but cant calculate dmg because API doesnt allow | revolver+nuke fix
                    return -1
                end
            end

            if trace.hitgroup == 0 and dmg > 0.0 then -- if target is dormant then bullet wouldn't hit it therefore will hit CWorld and then hitgroup == generic (0). So we need some adjustments to calculated damage...
                local dist = target_hbox_pos:dist(trace.end_pos)

                dmg = dmg * self:get_damage_multiplier(hbox)                                -- hitgroup fix
                dmg = dmg / math.pow(self.variables.range_modifier, dist / 500.0)           -- distance fix

                if has_helmet and hbox == 1 or armor > 0 and (hbox <= 7 or hbox >= 14) then -- armor fix
                    local absorbed = dmg * self.variables.armor_resist
                    dmg = dmg - math.min(absorbed, 2.0 * armor) -- armor gets damaged by absorbed/2
                end
            end

            return dmg
        end,

        choose_hbox = function(self, target) -- tries to prefer safety over dmg
            local idx = target:get_index()

            self.variables.is_reachable[idx] = false

            local best_hbox
            local highest_w_dmg = 0.0
            
            for hbox = 1, #self.variables.hbox_state do
                if self.variables.hbox_state[hbox] then
                    local target_hbox_pos = target:get_hitbox_position(hbox - 1) -- lua starts array indexes with 1
                    
                    dmg = self:calc_true_damage(hbox, target_hbox_pos, target["m_ArmorValue"], target["m_bHasHelmet"])
                    local is_wrong = dmg == -1
                    if is_wrong then
                        dmg = self.variables.weapon_info["damage"]
                    end
                    
                    if dmg > 0.0 then
                        self.variables.is_reachable[idx] = true
                    end

                    local hc = self:max_hc(target_hbox_pos, self:get_hbox_radius(hbox))

                    if dmg >= self.variables.mindmg and 100 * hc >= self.variables.minhc then
                        local w_dmg = self:get_weighted_damage(hbox, dmg)
                        if w_dmg > highest_w_dmg then
                            best_hbox                   = hbox
                            highest_w_dmg               = w_dmg
                            self.variables.dmg          = dmg
                            self.variables.dmg_is_wrong = is_wrong
                        end
                    end
                end
            end

            return best_hbox
        end,

        lp_check = function(self)
            if not globals.is_connected then
                return false
            end
            if not globals.is_in_game then
                return false
            end

            return true
        end,

        target_check = function(self, target)
            if target == nil then
                return false
            end
    
            if not target["m_bConnected"] == 1 then
                return false
            end
    
            if not target:is_alive() then
                return false
            end
    
            if target:get_network_state() == 0 then -- not dormant
                return false
            end

            if target:get_bbox().alpha < ui_settings_alpha:get() * 0.001 then -- dormant is outdated
                return false
            end

            if self:choose_hbox(target) == nil then -- dmg == 0
                return false
            end
    
            return true
        end,
    
        weapon_check = function(self, target)
            if self.variables.weapon == nil then
                return false
            end
    
            if self.variables.weapon_type == nil or self.variables.weapon_type == self.consts.WEAPONTYPE_KNIFE or self.variables.weapon_type >= self.consts.WEAPONTYPE_C4 then
                return false
            end

            if self.variables.weapon:get_weapon_reload() ~= -1 then -- is reloading
                return false
            end
    
            if self.variables.lp:get_origin():dist(target:get_origin()) > self.variables.weapon_info["range"] then -- out of range
                return false
            end
    
            if self.variables.weapon["m_flNextPrimaryAttack"] > globals.curtime then
                return false
            end

            return true
        end,
    
        choose_target = function(self) -- closest to camera | WARNING!!! FULLY PASTED CODE HERE
            local players = entity.get_players(true)

            local best_player
            local best_distance = math.huge
            for _, player in ipairs(players) do
                if self:lp_check() and self:weapon_check(player) and self:target_check(player) then
                    local origin = player:get_origin()
                    local ray_distance = origin:dist_to_ray(self.variables.camera_position, self.variables.camera_direction)
                    if ray_distance < best_distance then
                        best_distance = ray_distance
                        best_player = player
                    end
                end
            end

            return best_player
        end,
    
        autostop = function(self)
            local min_speed = math.sqrt((self.variables.cmd.forwardmove * self.variables.cmd.forwardmove) + (self.variables.cmd.sidemove * self.variables.cmd.sidemove))
            local goal_speed = self.variables.lp["m_bIsScoped"] and self.variables.weapon_info["max_player_speed_alt"] or self.variables.weapon_info["max_player_speed"]

            if goal_speed > 0 and min_speed > 0 then
                if not self.variables.cmd.in_duck then
                    goal_speed = goal_speed * 0.33 -- if ure standing and ur speed is a third of max_player_speed(_alt) then moving doesnt affect accuracy at all
                end
        
                if min_speed > goal_speed then
                    local factor = goal_speed / min_speed
                    self.variables.cmd.forwardmove = self.variables.cmd.forwardmove * factor
                    self.variables.cmd.sidemove = self.variables.cmd.sidemove * factor
                end
            end
        end,
    
        autoscope = function(self)
            if not self.variables.lp["m_bIsScoped"] then
                self.variables.cmd.in_attack2 = true
            end
        end,

        run = function(self, cmd)
            if not ui_dormant_switch:get() then
                return
            end

            if not self:lp_check() then
                return
            end

            if self.aimbot_shot.tickcount ~= nil and globals.tickcount - self.aimbot_shot.tickcount > 1 and not self.aimbot_shot.handled then
                if ui_dormant_logs:get() then
                    print_raw(("\a00FF00[Dormant Aimbot] \aFFFFFFMissed %s(%d%s) in %s for %d damage"):format(
                    self.aimbot_shot.victim:get_name(),
                    self.aimbot_shot.hitchance,
                    "%",
                    self.aimbot_shot.hitgroup,
                    self.aimbot_shot.damage
                ))
                end
                self.aimbot_shot.handled = true
            end

            self.variables:initialize(cmd)

            local target = self:choose_target()
            if target == nil then
                return
            end

            local hbox       = self:choose_hbox(target)
            local aim_point  = target:get_hitbox_position(hbox - 1)
            local aim_angles = self.variables.eyepos:to(aim_point):angles()

            if ui_accuracy_autostop:get() then
                self:autostop()
            end
            if ui_accuracy_autoscope:get() then
                self:autoscope()
            end

            local hc
            if self.variables.weapon_info["is_revolver"] then
                if self.variables.cmd.in_duck == 1 then
                    hc = self:calculate_hc(self.variables.weapon:get_inaccuracy() * 0.2, aim_point, self:get_hbox_radius(hbox))
                else
                    hc = self:calculate_hc(self.variables.weapon:get_inaccuracy() * 0.166, aim_point, self:get_hbox_radius(hbox))
                end
            else
                hc = self:calculate_hc(self.variables.weapon:get_inaccuracy(), aim_point, self:get_hbox_radius(hbox))
            end

            if 100 * hc >= self.variables.minhc then
                self.variables.cmd.view_angles = aim_angles
                self.variables.cmd.in_attack   = true

                self.aimbot_shot.tickcount     = globals.tickcount
                self.aimbot_shot.victim        = target
                self.aimbot_shot.hitchance     = 100 * hc
                self.aimbot_shot.hitgroup      = self:get_hitgroup_name(hbox)
                self.aimbot_shot.damage        = self.variables.dmg_is_wrong and -1 or self.variables.dmg
                self.aimbot_shot.handled       = false
            end
        end,
        
        update_hboxes = function(self)
            local hbox_list = ui_settings_hitboxes:get()

            local state = {}
            state["Head"]    = false
            state["Chest"]   = false
            state["Stomach"] = false
            state["Arms"]    = false
            state["Legs"]    = false
            state["Feet"]    = false

            for _, value in ipairs(hbox_list) do
                state[value] = true
            end

            for i = 1, 1 do
                self.variables.hbox_state[1] = state["Head"]
            end
            for i = 5, 7 do
                self.variables.hbox_state[i] = state["Chest"]
            end
            for i = 3, 4 do
                self.variables.hbox_state[i] = state["Stomach"]
            end
            for i = 14, 19 do
                self.variables.hbox_state[i] = state["Arms"]
            end
            for i = 8, 11 do
                self.variables.hbox_state[i] = state["Legs"]
            end
            for i = 12, 13 do
                self.variables.hbox_state[i] = state["Feet"]
            end
        end
    }
    
dormant_aimbot.aimbot:update_hboxes()

-- callbacks
events.createmove:set(function(cmd)
    dormant_aimbot.aimbot:run(cmd)
end)

ui_settings_hitboxes:set_callback(function()
    dormant_aimbot.aimbot:update_hboxes()
end)

local esp_dormant_flag = esp.enemy:new_text("Dormant Aimbot", "DA", function(player)
    if ui_dormant_switch:get() and dormant_aimbot.variables.is_reachable[player:get_index()] and player:get_network_state() ~= 0 and player:get_network_state() ~= 5 then
        return "DA"
    end
end)

events.player_hurt:set(function(e)
    local shot_time = dormant_aimbot.aimbot_shot.tickcount
    if shot_time == nil then
        return
    end

    if globals.tickcount - shot_time == 1 then
        local attacker = entity.get(e.attacker, true)

        if dormant_aimbot.variables.lp == attacker then
            local victim = entity.get(e.userid, true)
            local hgroup = dormant_aimbot.consts.hitgroup_str[e.hitgroup]

            if ui_dormant_logs:get() then
                print_raw(("\a00FF00[Dormant Aimbot] \aFFFFFFHit %s(%d%s) in %s(%s) for %d(%d) damage (%d health remaining)"):format(
                    victim:get_name(),
                    dormant_aimbot.aimbot_shot.hitchance,
                    "%",
                    hgroup,
                    dormant_aimbot.aimbot_shot.hitgroup,
                    e.dmg_health,
                    dormant_aimbot.aimbot_shot.damage,
                    e.health
                ))
            end
            dormant_aimbot.aimbot_shot.handled = true
        end
    end
end)
 
Начинающий
Статус
Оффлайн
Регистрация
23 Мар 2023
Сообщения
2
Реакции[?]
0
Поинты[?]
0
а в неверлузе чем он не такой? Или сильно спрятан в меню?
 
Пользователь
Статус
Оффлайн
Регистрация
2 Май 2022
Сообщения
356
Реакции[?]
46
Поинты[?]
24K
Skeet dormant aimbot :CoolCat:
Код:
ui.find("Aimbot", "Ragebot", "Main", "Enabled", "Dormant Aimbot")
не-а

скит дормант:

code_language.lua:
-- local variables for API functions. any changes to the line below will be lost on re-generation
local client_visible, client_eye_position, client_log, client_trace_bullet, entity_get_bounding_box, entity_get_local_player, entity_get_origin, entity_get_player_name, entity_get_player_resource, entity_get_player_weapon, entity_get_prop, entity_is_dormant, entity_is_enemy, globals_curtime, globals_maxplayers, globals_tickcount, math_max, renderer_indicator, string_format, ui_get, ui_new_checkbox, ui_new_hotkey, ui_reference, ui_set_callback, sqrt, unpack, entity_is_alive, plist_get = client.visible, client.eye_position, client.log, client.trace_bullet, entity.get_bounding_box, entity.get_local_player, entity.get_origin, entity.get_player_name, entity.get_player_resource, entity.get_player_weapon, entity.get_prop, entity.is_dormant, entity.is_enemy, globals.curtime, globals.maxplayers, globals.tickcount, math.max, renderer.indicator, string.format, ui.get, ui.new_checkbox, ui.new_hotkey, ui.reference, ui.set_callback, sqrt, unpack, entity.is_alive, plist.get

local ffi = require "ffi"
local vector = require "vector"
local weapons = require "gamesense/csgo_weapons"

local native_GetClientEntity = vtable_bind("client_panorama.dll", "VClientEntityList003", 3, "void*(__thiscall*)(void*,int)")
local native_IsWeapon = vtable_thunk(165, "bool(__thiscall*)(void*)")
local native_GetInaccuracy = vtable_thunk(482, "float(__thiscall*)(void*)")


local ref = {
    mindmg = ui_reference("RAGE", "Aimbot", "Minimum damage"),
    dormantEsp = ui_reference("VISUALS", "Player ESP", "Dormant"),
}

local menu = {
    dormant_switch = ui_new_checkbox("RAGE", "Aimbot", "Dormant aimbot"),
    dormant_key = ui_new_hotkey("RAGE", "Aimbot", "Dormant aimbot", true),
    dormant_mindmg = ui.new_slider("RAGE", "Aimbot", "Dormant minimum damage", 0, 100, 10, true),
    dormant_indicator = ui_new_checkbox("RAGE", "Aimbot", "Dormant indicator"),
}

local player_info_prev = {}
local roundStarted = 0

local function modify_velocity(e, goalspeed)
    local minspeed = math.sqrt((e.forwardmove * e.forwardmove) + (e.sidemove * e.sidemove))
    if goalspeed <= 0 or minspeed <= 0 then
        return
    end

    if e.in_duck == 1 then
        goalspeed = goalspeed * 2.94117647
    end

    if minspeed <= goalspeed then
        return
    end

    local speedfactor = goalspeed / minspeed
    e.forwardmove = e.forwardmove * speedfactor
    e.sidemove = e.sidemove * speedfactor
end

local function on_setup_command(cmd)
    if not ui_get(menu.dormant_switch) then
        return
    end

    local lp = entity_get_local_player()

    local my_weapon = entity_get_player_weapon(lp)
    if not my_weapon then
        return
    end

    local ent = native_GetClientEntity(my_weapon)
    if ent == nil or not native_IsWeapon(ent) then
        return
    end

    local inaccuracy = native_GetInaccuracy(ent)
    if inaccuracy == nil then
        return
    end

    local tickcount = globals_tickcount()
    local player_resource = entity_get_player_resource()
    local eyepos = vector(client_eye_position())
    local simtime = entity_get_prop(lp, "m_flSimulationTime")
    local weapon = weapons(my_weapon)
    local scoped = entity_get_prop(lp, "m_bIsScoped") == 1
    local onground = bit.band(entity_get_prop(lp, 'm_fFlags'), bit.lshift(1, 0))
    if tickcount < roundStarted then return end -- to prevent shooting at ghost dormant esp @ the beginning of round

    local can_shoot
    if weapon.is_revolver then -- for some reason can_shoot returns always false with r8 despite all 3 props being true, no idea why
        can_shoot = simtime > entity_get_prop(my_weapon, "m_flNextPrimaryAttack") -- doing this fixes it ><
    elseif weapon.is_melee_weapon then
        can_shoot = false
    else
        can_shoot = simtime > math_max(entity_get_prop(lp, "m_flNextAttack"), entity_get_prop(my_weapon, "m_flNextPrimaryAttack"), entity_get_prop(my_weapon, "m_flNextSecondaryAttack"))
    end

    -- new player info
    local player_info = {}

    -- loop through all players and continue if they're connected
    for player=1, globals_maxplayers() do
        if entity_get_prop(player_resource, "m_bConnected", player) == 1 then
            if plist_get(player, "Add to whitelist") then goto skip end
            if entity_is_dormant(player) and entity_is_enemy(player) then
                local can_hit

                local origin = vector(entity_get_origin(player))
                local x1, y1, x2, y2, alpha_multiplier = entity_get_bounding_box(player) -- grab alpha of the dormant esp
                
                if player_info_prev[player] ~= nil and origin.x ~= 0 and alpha_multiplier > 0 then -- if origin / dormant esp is valid
                    local old_origin, old_alpha, old_hittable = unpack(player_info_prev[player])

                    -- update check
                    local dormant_accurate = alpha_multiplier > 0.795 -- for debug purposes lower this to 0.1

                    if dormant_accurate then
                        local target = origin + vector(0, 0, 40)
                        local pitch, yaw = eyepos:to(target):angles()
                        local ent, dmg = client_trace_bullet(lp, eyepos.x, eyepos.y, eyepos.z, target.x, target.y, target.z, true)

                        can_hit = (dmg > ui_get(menu.dormant_mindmg)) and (not client_visible(target.x, target.y, target.z)) -- added visibility check to mitigate shooting at anomalies?
                        if can_shoot and can_hit and ui_get(menu.dormant_key) then
                            modify_velocity(cmd, (scoped and weapon.max_player_speed_alt or weapon.max_player_speed)*0.33)

                            -- autoscope
                            if not scoped and weapon.type == "sniperrifle" and cmd.in_jump == 0 and onground == 1 then
                                cmd.in_attack2 = 1
                            end
                            
                            if inaccuracy < 0.009 and cmd.chokedcommands == 0 then
                                cmd.pitch = pitch
                                cmd.yaw = yaw
                                cmd.in_attack = 1

                                -- dont shoot again
                                can_shoot = false
                                --client_log(string_format('Taking a shot at: %s | tickcount: %d | predcited damage: %d | inaccuracy: %.3f | Alpha: %.3f', entity.get_player_name(player), tickcount, dmg, inaccuracy, alpha_multiplier))
                            end
                        end
                    end
                end
                player_info[player] = {origin, alpha_multiplier, can_hit}
            end
        end
        ::skip::
    end
    player_info_prev = player_info
end

client.register_esp_flag("DA", 255, 255, 255, function(player)
    if ui.get(menu.dormant_switch) and entity.is_enemy(player) and player_info_prev[player] ~= nil and entity.is_alive(entity_get_local_player()) then
        local _, _, can_hit = unpack(player_info_prev[player])

        return can_hit
    end
end)
local function painter()
    if not entity_is_alive(entity_get_local_player()) then return end -- dont draw if dead :lowiqq:
    if ui_get(menu.dormant_switch) and ui_get(menu.dormant_key) and ui_get(menu.dormant_indicator) then
        local colors = {132,196,20,245}
        for k, v in pairs(player_info_prev) do
            if k ~= nil then
                if v[3] == true then
                    colors = {252,222,30,245}
                    break
                end
            end
        end
        renderer_indicator(colors[1],colors[2],colors[3],colors[4], "DA")
    end
end
local function resetter()
    local freezetime = (cvar.mp_freezetime:get_float()+1) / globals.tickinterval() -- get freezetime plus 1 second and disable dormantbob for that amount of ticks
    roundStarted = globals_tickcount() + freezetime
end

ui_set_callback(menu.dormant_switch, function()
    local czechbox = ui_get(menu.dormant_switch)
    local update_callback = czechbox and client.set_event_callback or client.unset_event_callback

    if czechbox then ui.set(ref.dormantEsp, czechbox) end -- enable dormant ESP on ui toggle ( dumb proofing )
    update_callback("setup_command", on_setup_command)
    update_callback("paint", painter)
    update_callback("round_prestart", resetter)
    ui.set_visible(menu.dormant_indicator, ui_get(menu.dormant_switch))
    ui.set_visible(menu.dormant_mindmg, ui_get(menu.dormant_switch))
end)
ui.set(menu.dormant_indicator, true)
ui.set_visible(menu.dormant_indicator, ui_get(menu.dormant_switch)) -- yes
ui.set_visible(menu.dormant_mindmg, ui_get(menu.dormant_switch)) -- yes^2

-- We hate blacks & minorities
-- God, Honor, Homeland
-- Heil white Evropa
-- Heil victory
 
Участник
Статус
Оффлайн
Регистрация
18 Фев 2020
Сообщения
394
Реакции[?]
153
Поинты[?]
61K
не-а

скит дормант:

code_language.lua:
-- local variables for API functions. any changes to the line below will be lost on re-generation
local client_visible, client_eye_position, client_log, client_trace_bullet, entity_get_bounding_box, entity_get_local_player, entity_get_origin, entity_get_player_name, entity_get_player_resource, entity_get_player_weapon, entity_get_prop, entity_is_dormant, entity_is_enemy, globals_curtime, globals_maxplayers, globals_tickcount, math_max, renderer_indicator, string_format, ui_get, ui_new_checkbox, ui_new_hotkey, ui_reference, ui_set_callback, sqrt, unpack, entity_is_alive, plist_get = client.visible, client.eye_position, client.log, client.trace_bullet, entity.get_bounding_box, entity.get_local_player, entity.get_origin, entity.get_player_name, entity.get_player_resource, entity.get_player_weapon, entity.get_prop, entity.is_dormant, entity.is_enemy, globals.curtime, globals.maxplayers, globals.tickcount, math.max, renderer.indicator, string.format, ui.get, ui.new_checkbox, ui.new_hotkey, ui.reference, ui.set_callback, sqrt, unpack, entity.is_alive, plist.get

local ffi = require "ffi"
local vector = require "vector"
local weapons = require "gamesense/csgo_weapons"

local native_GetClientEntity = vtable_bind("client_panorama.dll", "VClientEntityList003", 3, "void*(__thiscall*)(void*,int)")
local native_IsWeapon = vtable_thunk(165, "bool(__thiscall*)(void*)")
local native_GetInaccuracy = vtable_thunk(482, "float(__thiscall*)(void*)")


local ref = {
    mindmg = ui_reference("RAGE", "Aimbot", "Minimum damage"),
    dormantEsp = ui_reference("VISUALS", "Player ESP", "Dormant"),
}

local menu = {
    dormant_switch = ui_new_checkbox("RAGE", "Aimbot", "Dormant aimbot"),
    dormant_key = ui_new_hotkey("RAGE", "Aimbot", "Dormant aimbot", true),
    dormant_mindmg = ui.new_slider("RAGE", "Aimbot", "Dormant minimum damage", 0, 100, 10, true),
    dormant_indicator = ui_new_checkbox("RAGE", "Aimbot", "Dormant indicator"),
}

local player_info_prev = {}
local roundStarted = 0

local function modify_velocity(e, goalspeed)
    local minspeed = math.sqrt((e.forwardmove * e.forwardmove) + (e.sidemove * e.sidemove))
    if goalspeed <= 0 or minspeed <= 0 then
        return
    end

    if e.in_duck == 1 then
        goalspeed = goalspeed * 2.94117647
    end

    if minspeed <= goalspeed then
        return
    end

    local speedfactor = goalspeed / minspeed
    e.forwardmove = e.forwardmove * speedfactor
    e.sidemove = e.sidemove * speedfactor
end

local function on_setup_command(cmd)
    if not ui_get(menu.dormant_switch) then
        return
    end

    local lp = entity_get_local_player()

    local my_weapon = entity_get_player_weapon(lp)
    if not my_weapon then
        return
    end

    local ent = native_GetClientEntity(my_weapon)
    if ent == nil or not native_IsWeapon(ent) then
        return
    end

    local inaccuracy = native_GetInaccuracy(ent)
    if inaccuracy == nil then
        return
    end

    local tickcount = globals_tickcount()
    local player_resource = entity_get_player_resource()
    local eyepos = vector(client_eye_position())
    local simtime = entity_get_prop(lp, "m_flSimulationTime")
    local weapon = weapons(my_weapon)
    local scoped = entity_get_prop(lp, "m_bIsScoped") == 1
    local onground = bit.band(entity_get_prop(lp, 'm_fFlags'), bit.lshift(1, 0))
    if tickcount < roundStarted then return end -- to prevent shooting at ghost dormant esp @ the beginning of round

    local can_shoot
    if weapon.is_revolver then -- for some reason can_shoot returns always false with r8 despite all 3 props being true, no idea why
        can_shoot = simtime > entity_get_prop(my_weapon, "m_flNextPrimaryAttack") -- doing this fixes it ><
    elseif weapon.is_melee_weapon then
        can_shoot = false
    else
        can_shoot = simtime > math_max(entity_get_prop(lp, "m_flNextAttack"), entity_get_prop(my_weapon, "m_flNextPrimaryAttack"), entity_get_prop(my_weapon, "m_flNextSecondaryAttack"))
    end

    -- new player info
    local player_info = {}

    -- loop through all players and continue if they're connected
    for player=1, globals_maxplayers() do
        if entity_get_prop(player_resource, "m_bConnected", player) == 1 then
            if plist_get(player, "Add to whitelist") then goto skip end
            if entity_is_dormant(player) and entity_is_enemy(player) then
                local can_hit

                local origin = vector(entity_get_origin(player))
                local x1, y1, x2, y2, alpha_multiplier = entity_get_bounding_box(player) -- grab alpha of the dormant esp
               
                if player_info_prev[player] ~= nil and origin.x ~= 0 and alpha_multiplier > 0 then -- if origin / dormant esp is valid
                    local old_origin, old_alpha, old_hittable = unpack(player_info_prev[player])

                    -- update check
                    local dormant_accurate = alpha_multiplier > 0.795 -- for debug purposes lower this to 0.1

                    if dormant_accurate then
                        local target = origin + vector(0, 0, 40)
                        local pitch, yaw = eyepos:to(target):angles()
                        local ent, dmg = client_trace_bullet(lp, eyepos.x, eyepos.y, eyepos.z, target.x, target.y, target.z, true)

                        can_hit = (dmg > ui_get(menu.dormant_mindmg)) and (not client_visible(target.x, target.y, target.z)) -- added visibility check to mitigate shooting at anomalies?
                        if can_shoot and can_hit and ui_get(menu.dormant_key) then
                            modify_velocity(cmd, (scoped and weapon.max_player_speed_alt or weapon.max_player_speed)*0.33)

                            -- autoscope
                            if not scoped and weapon.type == "sniperrifle" and cmd.in_jump == 0 and onground == 1 then
                                cmd.in_attack2 = 1
                            end
                           
                            if inaccuracy < 0.009 and cmd.chokedcommands == 0 then
                                cmd.pitch = pitch
                                cmd.yaw = yaw
                                cmd.in_attack = 1

                                -- dont shoot again
                                can_shoot = false
                                --client_log(string_format('Taking a shot at: %s | tickcount: %d | predcited damage: %d | inaccuracy: %.3f | Alpha: %.3f', entity.get_player_name(player), tickcount, dmg, inaccuracy, alpha_multiplier))
                            end
                        end
                    end
                end
                player_info[player] = {origin, alpha_multiplier, can_hit}
            end
        end
        ::skip::
    end
    player_info_prev = player_info
end

client.register_esp_flag("DA", 255, 255, 255, function(player)
    if ui.get(menu.dormant_switch) and entity.is_enemy(player) and player_info_prev[player] ~= nil and entity.is_alive(entity_get_local_player()) then
        local _, _, can_hit = unpack(player_info_prev[player])

        return can_hit
    end
end)
local function painter()
    if not entity_is_alive(entity_get_local_player()) then return end -- dont draw if dead :lowiqq:
    if ui_get(menu.dormant_switch) and ui_get(menu.dormant_key) and ui_get(menu.dormant_indicator) then
        local colors = {132,196,20,245}
        for k, v in pairs(player_info_prev) do
            if k ~= nil then
                if v[3] == true then
                    colors = {252,222,30,245}
                    break
                end
            end
        end
        renderer_indicator(colors[1],colors[2],colors[3],colors[4], "DA")
    end
end
local function resetter()
    local freezetime = (cvar.mp_freezetime:get_float()+1) / globals.tickinterval() -- get freezetime plus 1 second and disable dormantbob for that amount of ticks
    roundStarted = globals_tickcount() + freezetime
end

ui_set_callback(menu.dormant_switch, function()
    local czechbox = ui_get(menu.dormant_switch)
    local update_callback = czechbox and client.set_event_callback or client.unset_event_callback

    if czechbox then ui.set(ref.dormantEsp, czechbox) end -- enable dormant ESP on ui toggle ( dumb proofing )
    update_callback("setup_command", on_setup_command)
    update_callback("paint", painter)
    update_callback("round_prestart", resetter)
    ui.set_visible(menu.dormant_indicator, ui_get(menu.dormant_switch))
    ui.set_visible(menu.dormant_mindmg, ui_get(menu.dormant_switch))
end)
ui.set(menu.dormant_indicator, true)
ui.set_visible(menu.dormant_indicator, ui_get(menu.dormant_switch)) -- yes
ui.set_visible(menu.dormant_mindmg, ui_get(menu.dormant_switch)) -- yes^2

-- We hate blacks & minorities
-- God, Honor, Homeland
-- Heil white Evropa
-- Heil victory
Не может быть в скит дорманте
Код:
-- We hate blacks & minorities
-- God, Honor, Homeland
-- Heil white Evropa
-- Heil victory
Скорее там должно быть
Код:
-- We hate russians
-- Sieg Hile
Так что ты меня обманываешь
 
Сверху Снизу