LUA скрипт [NL] SOLUS V2

Начинающий
Статус
Оффлайн
Регистрация
2 Фев 2022
Сообщения
46
Реакции[?]
7
Поинты[?]
0
1656375001485.png

https://yougame.biz/threads/258335/#post-2649213 is a base but i made it better:roflanzdarova:

LUA:
local function global()

    local function color(r, g, b, a)
        if a == nil then a = 255 end
        return Color.new(r / 255, g / 255, b / 255, a / 255)
    end

    local function render_conteiner(x, y, w, h, name, line_color, box_alpha, font_size, font)
        local name_size = Render.CalcTextSize(name, font_size, font)
        local line_col = line_color:GetColor()

        Render.Box(Vector2.new(x - 0.5, y - 0.5), Vector2.new(x + w + 0.5, y + h), Color.new(line_color:GetColor().r, line_color:GetColor().g, line_color:GetColor().b, line_color:GetColor().a), 3)
        Render.BoxFilled(Vector2.new(x, y), Vector2.new(x + w, y + h + 1), color(17, 17, 17, box_alpha:GetInt()), 3)
        for i = 1, 5 do
            Render.Box(Vector2.new(x - 0.5 - i, y - 0.5 - i), Vector2.new(x + w + 0.5 + i, y + h + i), Color.new(line_color:GetColor().r, line_color:GetColor().g, line_color:GetColor().b, 0.2 * (1 - i / 5)), 3)
        end
        Render.Text(name, Vector2.new(x + w / 2 - name_size.x / 2, y + 2), color(280, 280, 280), font_size, font, true)
    end


    local screen = EngineClient:GetScreenSize()
    local font_size = 12
    local font = Render.InitFont("Verdana", font_size, {"r"})
 
    local adaprive = {Menu.ColorEdit("General", "Line color", color(150, 150, 255)), Menu.SliderInt("General", "Box alpha", 150, 0, 255)}
    local key = {Menu.SliderInt("General", "keybinds x", 300, 1, screen.x), Menu.SliderInt("General", "keybinds y", 10, 1, screen.y)}
    key[1]:SetVisible(false)
    key[2]:SetVisible(false)

    local drag = false

    local width = 0
    local function keybinds()
        local x, y = key[1]:GetInt(), key[2]:GetInt()
        local max_width = 0

        local add_y = 0
        local function render_binds(binds)
            if not binds:IsActive() then return end
            local bind_name = binds:GetName()
            local bind_state = binds:GetValue()

            local bind_state_size = Render.CalcTextSize(bind_state, font_size, font)
            local bind_name_size = Render.CalcTextSize(bind_name, font_size, font)

            Render.Text(bind_name, Vector2.new(x, y + 20 + add_y), color(280, 280, 280), font_size, font, true)
            Render.Text(bind_state, Vector2.new(x + (width - bind_state_size.x), y + 20 + add_y), color(280, 280, 280), font_size, font, true)

            add_y = add_y + 16

            local bind_width = bind_state_size.x + bind_name_size.x + 10
            if bind_width > 80 then
                if bind_width > max_width then
                    max_width = bind_width
                end
            end
        end

        local binds = Cheat.GetBinds()
        for i = 1, #binds do
            render_binds(binds[i])
        end

        width = math.max(80, max_width)

        if Cheat.IsMenuVisible() or (#binds > 0) then
            render_conteiner(x, y, width, 16, "keybinds", adaprive[1], adaprive[2], font_size, font)

            local mouse = Cheat.GetMousePos()
            if Cheat.IsKeyDown(1) then
                if mouse.x >= x and mouse.y >= y and mouse.x <= x + width and mouse.y <= y + 18 or drag then
                    if not drag then
                        drag=true
                    else
                        key[1]:SetInt(mouse.x - math.floor(width / 2))
                        key[2]:SetInt(mouse.y - 8)
                    end
                end
            else
                drag=false
            end
        end
    end
 
    Cheat.RegisterCallback("draw", function()
        keybinds()
    end)
end

global()
 
Начинающий
Статус
Оффлайн
Регистрация
19 Май 2020
Сообщения
152
Реакции[?]
28
Поинты[?]
0
Вам ещё не надоел этот стиль? Он сейчас много где встречается, потому настолько приелся.
 
Сверху Снизу