Помогите достать индикаторы из луа

изображение_2022-07-31_014214724.png

Сделайте отдельную луа с индикаторами
 

Вложения

  • mell.rar
    26.8 KB · Просмотры: 17
Последнее редактирование:
  • Nellored
  • Модератор раздела "Garry's Mod"
  • 831
  • 160
  • 172
ну на типа
Lua:
ffi.cdef[[
    bool CreateDirectoryA(const char* lpPathName, void* lpSecurityAttributes);
    bool DeleteUrlCacheEntryA(const char* lpszUrlName);
    void* __stdcall URLDownloadToFileA(void* LPUNKNOWN, const char* LPCSTR, const char* LPCSTR2, int a, int LPBINDSTATUSCALLBACK);

    int CreateDirectoryA(const char*, void*);
    void* CreateFileA(const char*, uintptr_t, uintptr_t, void*, uintptr_t, uintptr_t, void*);
    uintptr_t GetFileSize(void*, uintptr_t*);
    int ReadFile(void*, void*, uintptr_t, uintptr_t*, void*);
    int CloseHandle(void*);
]]
local animations = {
    anim_list = {}
}
local visuals = {
    indicators = {}
}
local file_downloader = {}
file_downloader.urlmon = ffi.load('UrlMon')
file_downloader.wininet = ffi.load('WinInet')
file_downloader.download_file_from_url = function(from, to)
    file_downloader.wininet.DeleteUrlCacheEntryA(from)
    file_downloader.urlmon.URLDownloadToFileA(nil, from, to, 0,0)
end

file_downloader.ct = ffi.typeof('char[?]')
file_downloader.c_invalid_handle_value = ffi.cast('void*', -1)

package.loaded.readfile = function(filename)
    local fp = ffi.C.CreateFileA(filename, 0x80000000, 3, nil, 3, 128, nil)
    if file_downloader.c_invalid_handle_value ~= fp then
        local size = ffi.C.GetFileSize(fp, nil)
        local buf = file_downloader.ct(size + 1)
        ffi.C.ReadFile(fp, buf, size, nil, nil)
        ffi.C.CloseHandle(fp)
        return ffi.string(buf, size)
    end
end

file_downloader.game_path_str = EngineClient.GetGameDirectory()
file_downloader.game_path = string.gsub(file_downloader.game_path_str, '\\csgo', '\\')
local files_to_download = {
    'nl\\melancholia\\small_pixel.ttf', 'nl\\melancholia\\1.png', 'nl\\melancholia\\2.png', 'nl\\melancholia\\3.png', 'nl\\melancholia\\4.png', 'nl\\melancholia\\5.png', 'nl\\melancholia\\6.png', 'nl\\melancholia\\7.png', 'nl\\melancholia\\8.png', 'nl\\melancholia\\9.png', 'nl\\melancholia\\velocity_warning.png'
}
local image = {}
for i = 1, #files_to_download do
    if package.loaded.readfile(files_to_download[i]) then
        for i=1, 9 do
            image[i] = Render.LoadImageFromFile(('nl\\melancholia\\%s.png'):format(i), Vector2.new(25, 25))
        end
    else
        ffi.C.CreateDirectoryA('nl\\melancholia\\', NULL)
      
        file_downloader.download_file_from_url('https://cdn.discordapp.com/attachments/947429839101624320/952177172557234227/small_pixel.ttf', 'nl\\melancholia\\small_pixel.ttf')
        file_downloader.download_file_from_url('https://cdn.discordapp.com/attachments/967383362241167420/988498559575941130/velocity_warning.png', 'nl\\melancholia\\velocity_warning.png')
        file_downloader.download_file_from_url('https://cdn.discordapp.com/attachments/967383362241167420/989535076482158612/1.png', 'nl\\melancholia\\1.png')
        file_downloader.download_file_from_url('https://cdn.discordapp.com/attachments/967383362241167420/989535089039925308/2.png', 'nl\\melancholia\\2.png')
        file_downloader.download_file_from_url('https://cdn.discordapp.com/attachments/967383362241167420/989535107276759070/3.png', 'nl\\melancholia\\3.png')
        file_downloader.download_file_from_url('https://cdn.discordapp.com/attachments/967383362241167420/989535116068012032/4.png', 'nl\\melancholia\\4.png')
        file_downloader.download_file_from_url('https://cdn.discordapp.com/attachments/967383362241167420/989535127631712266/5.png', 'nl\\melancholia\\5.png')
        file_downloader.download_file_from_url('https://cdn.discordapp.com/attachments/967383362241167420/989535142051708958/6.png', 'nl\\melancholia\\6.png')
        file_downloader.download_file_from_url('https://cdn.discordapp.com/attachments/967383362241167420/989535152923357194/7.png', 'nl\\melancholia\\7.png')
        file_downloader.download_file_from_url('https://cdn.discordapp.com/attachments/967383362241167420/990682553419714631/8.png', 'nl\\melancholia\\8.png')
        file_downloader.download_file_from_url('https://cdn.discordapp.com/attachments/967383362241167420/989535189493485568/9.png', 'nl\\melancholia\\9.png')
      
        table.insert(miscellaneous.stuff, {text2 = {
            name = '',
            hit = '',
            who = Cheat.GetCheatUserName(),
            in_the = ', reload script!',
            where = '',
            for_ = '',
            how_much = '',
            damage = '',
            how_muc_r = '',
            health = ''
        }, alpha = 0, alpha1 = 0, type = 'Hit', time = GlobalVars.realtime})
    end
end
function C_BasePlayer:GetVelocity() first_velocity = self:GetProp('m_vecVelocity[0]') second_velocity = self:GetProp('m_vecVelocity[1]') speed = math.floor(math.sqrt(first_velocity * first_velocity + second_velocity * second_velocity)) return speed end

animations.math_clamp = function(value, min, max)
    return math.min(max, math.max(min, value))
end
local refs = {
    minimum_damage = Menu.FindVar("Aimbot","Ragebot","Accuracy","Minimum Damage"),
    body_aim = Menu.FindVar("Aimbot","Ragebot","Misc","Body Aim"),
    safe_points = Menu.FindVar("Aimbot","Ragebot","Misc","Safe Points"),
    double_tap = Menu.FindVar("Aimbot","Ragebot","Exploits","Double Tap"),
    hide_shots = Menu.FindVar("Aimbot","Ragebot","Exploits","Hide Shots"),
    fakeduck = Menu.FindVar('Aimbot', 'Anti Aim', 'Misc', 'Fake Duck'),
}
local ui = {
    visuals = Menu.Switch("Main", "Enable this hueten", false),
}

animations.math_lerp = function(a, b_, t)
    local t = animations.math_clamp(GlobalVars.frametime * (0.045 * 175), 0, 1)

    if type(a) == 'userdata' then
        r, g, b, a = a.r, a.g, a.b, a.a
        e_r, e_g, e_b, e_a = b_.r, b_.g, b_.b, b_.a
        r = animations.math_lerp(r, e_r, t)
        g = animations.math_lerp(g, e_g, t)
        b = animations.math_lerp(b, e_b, t)
        a = animations.math_lerp(a, e_a, t)
        return Color.new(r, g, b, a)
    end

    local d = b_ - a
    d = d * t
    d = d + a

    if b_ == 0 and d < 0.01 and d > -0.01 then
        d = 0
    elseif b_ == 1 and d < 1.01 and d > 0.99 then
        d = 1
    end

    return d
end

animations.anim_new = function(name, new, remove, speed)
    if not animations.anim_list[name] then
        animations.anim_list[name] = {}
        animations.anim_list[name].color = Color.new(0, 0, 0, 0)
        animations.anim_list[name].number = 0
        animations.anim_list[name].call_frame = true
    end

    if remove == nil then
        animations.anim_list[name].call_frame = true
    end

    if speed == nil then
        speed = 0.010
    end

    if type(new) == 'userdata' then
        lerp = animations.math_lerp(animations.anim_list[name].color, new, speed)
        animations.anim_list[name].color = lerp

        return lerp
    end

    lerp = animations.math_lerp(animations.anim_list[name].number, new, speed)
    animations.anim_list[name].number = lerp

    return lerp
end
local ragebot = {}
ragebot.player_info_prev = {}
for i = 1, 64 do
    ragebot.player_info_prev[i] = {
        origin = Vector.new(0, 0, 0),
    }
end

local screen_size = EngineClient.GetScreenSize()
visuals.indicators.Render_Shadow = function(start_pos, endpos, color)
    Render.GradientBoxFilled(start_pos, Vector2.new(start_pos.x + ((endpos.x - start_pos.x) / 2), endpos.y), Color.RGBA(0.0, 0.0, 0.0, 0.0), color, Color.RGBA(0.0, 0.0, 0.0, 0.0), color)
    Render.GradientBoxFilled(Vector2.new(start_pos.x + ((endpos.x - start_pos.x) / 2), start_pos.y), endpos, color, Color.RGBA(0.0, 0.0, 0.0, 0.0), color, Color.RGBA(0.0, 0.0, 0.0, 0.0))
end
visuals.indicators.Render_Indicator = function(i, col, cur)
    local position = Vector2.new(20, (screen_size.y / 1.55) + (39 * cur))

    visuals.indicators.Render_Shadow(Vector2.new(position.x - 10, position.y - 7), Vector2.new(position.x + 22, position.y + 26), Color.new(0, 0, 0, 0.21 * col.a))

    Render.Image(image[i], Vector2.new(20, ((screen_size.y / 1.55) + (39 * cur))-3), Vector2.new(25, 25), col)
    --Render.Text(text, positionS, Color.new(0.13, 0.13, 0.13, 0.49 * col.a), 24, fonts.calibrib24)
    --Render.Text(text, position, col, 24, fonts.calibrib24)
end

visuals.indicators.indicator2 = function()
    if not EngineClient.IsConnected() or not EntityList.GetLocalPlayer():IsAlive() or EntityList.GetLocalPlayer() == nil then
        return
    end
    local cur_dmg = refs.minimum_damage:GetInt()
    if cur_dmg > 100 then cur_dmg = '+'..cur_dmg-100 end
    local isDmg = false
    local isPing = false
    local binds = Cheat.GetBinds()
    for i = 1, #binds do
        bind = binds[i]
        if bind:GetName() == 'Minimum Damage' and bind:IsActive() then
            isDmg = true
        end
        if bind:GetName() == 'Fake Ping' and bind:IsActive() then
            isPing = true
        end
    end
    local anims2 = {
        indicators_stylel = animations.anim_new('ui.visuals:Get()', ui.visuals:Get() and 1 or 0)
    }

    if anims2.indicators_stylel >= 0.01 then
        local current_pos = 1
        --if ui.additional_ind:GetBool(1) then
        --    indicators.Render_Indicator(tostring(cur_dmg), Color.RGBA(213, 213, 214, 255 * indicators_style4), current_pos); current_pos = current_pos - 1;
        --else
        --    if isDmg then
        --        indicators.Render_Indicator('Damage: '..tostring(cur_dmg), Color.RGBA(213, 213, 214, 255 * indicators_style4), current_pos); current_pos = current_pos - 1;
        --    end
        --end
        local colors = Color.new(.51, .76, .07)
        for k, v in pairs(ragebot.player_info_prev) do
            if k ~= nil then
                if v[3] then
                    colors = Color.new(.98, .87, .11)
                    break
                end
            end
        end
        local s_indicators =
        {
            {
                img = 3,
                color = Exploits.GetCharge() == 1 and Color.new(.83, .83, .83) or Color.new(1, 0, 0),
                bool = refs.double_tap:Get(),
            },
            {
                img = 4,
                color = Color.new(.51, .76, .07),
                bool = refs.hide_shots:Get()
            },
            {
                img = 9,
                color = Color.new(.83, .83, .83),
                bool = isDmg
            },
            {
                img = 1,
                color = Color.new(.83, .83, .83),
                bool = refs.safe_points:Get() == 2
            },
            {
                img = 6,
                color = Color.new(.83, .83, .83),
                bool = refs.body_aim:Get() == 2
            },
            {
                img = 2,
                color = Color.new(.51, .76, .07),
                bool = isPing
            },
            {
                img = 5,
                color = EntityList.GetLocalPlayer():GetVelocity() > 260 and Color.new(.51, .76, .07) or Color.new(1, 0, 0),
                bool = bit.band(EntityList.GetLocalPlayer():GetProp('m_fFlags'), bit.lshift(1,0)) == 0
            },
            {
                img = 7,
                color = Color.new(.83, .83, .83),
                bool = refs.fakeduck:Get()
            },
            -- {
              
            --     img = 8,
            --     color = colors,
            --     bool = ui.dormant_aimbot:Get()
            -- }
        }
        --visuals.indicators.Render_Indicator('DUCK', Color.new(.83, .83, .83), current_pos); current_pos = current_pos - 1;
        for idx, value in pairs(s_indicators) do
            --local width = Render.CalcTextSize(v.text, 9, fonts.pixel9)
            anims2.alpha2 = animations.anim_new(('alpha2 %s'):format(idx), value.bool and 1 or 0)
            anims2.color2 = animations.anim_new(('color2 %s'):format(idx), Color.new(value.color.r, value.color.g, value.color.b, anims2.alpha2*anims2.indicators_stylel))

            if anims2.alpha2 > 0.01 then
                --Render.Text(v.text, Vector2.new(screen_size.x/2-width.x/2 + 3 + anims.add_x, screen_size.y/2+add_y), anims.color, 9, fonts.pixel9, true)
                --visuals.indicators.Render_Indicator(tostring(cur_dmg), Color.RGBA(213, 213, 214, 255 * indicators_style4), current_pos); current_pos = current_pos - 1;
                visuals.indicators.Render_Indicator(value.img, anims2.color2, current_pos); current_pos = current_pos - 1;
            end
        end
    end
end
Cheat.RegisterCallback("draw", function()
    visuals.indicators.indicator2()
end)
 
Сверху Снизу