LUA скрипт AW / Widgets (Solus UI)

Начинающий
Статус
Оффлайн
Регистрация
28 Ноя 2020
Сообщения
50
Реакции[?]
12
Поинты[?]
4K
у меня кончилась сабка неверлуза и поэтому от скуки решил сделать типа солусы на аимвар

есть анимации, драг / настройки находятся в Misc.

SYSTEMTIME редефайница так что релоадить луашку нельзя
получение времени можно было сделать через сайт, но это :astonished:

piska.png
code_language.lua:
-- by lozzya1337

-- @ note: апи аимвара самое лучшее!!!
ffi.cdef[[
    typedef unsigned short WORD;

    typedef struct _SYSTEMTIME {
        WORD wYear;
        WORD wMonth;
        WORD wDayOfWeek;
        WORD wDay;
        WORD wHour;
        WORD wMinute;
        WORD wSecond;
        WORD wMilliseconds;
    }
    SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;

    void GetLocalTime(
        LPSYSTEMTIME lpSystemTime
    );
]]

-- @ note: приватка
panorama.RunScript([[
    Username = MyPersonaAPI.GetName();
    GameInterfaceAPI.ConsoleCommand(`r_eyemove "${Username}"`);
]]);

local define = {
    screen = {draw.GetScreenSize()},
    fonts = {
        verdana = draw.CreateFont("Verdana", 12, 100)
    },
    
    references = {
        fakelag = "misc.fakelag.enable",
        pingspike = "misc.fakelatency.enable",
        dt = "misc.speedburst.enable",
        trigger = "lbot.trg.enable",
        customwalk = "lbot.movement.walkcustom",
        autopeek = "rbot.accuracy.walkbot.peek",
        peekkey = "rbot.accuracy.walkbot.peekkey",
        peektype = "rbot.accuracy.walkbot.peektype",
        knifebot = "lbot.extra.knifetrigger",
        slowwalk = "rbot.accuracy.movement.slowkey",
        fd = "rbot.antiaim.extra.fakecrouchkey",
        ej = "misc.edgejump",
        jb = "misc.autojumpbug",
    },
    
    common = {
        ["menu_state"] = function() return gui.Reference("menu"):IsActive() end,
        ["get_username"] = function() return client.GetConVar("r_eyemove") end,
        ["get_mouse_position"] = function() return {input.GetMousePos()} end,
        ["get_time"] = function()
            local system_time = ffi.new('SYSTEMTIME')
            ffi.C.GetLocalTime(system_time)

            return {
                hour = system_time.wHour,
                minute = system_time.wMinute,
                second = system_time.wSecond,
                milliseconds = system_time.wMilliseconds,
            }
        end,
        ["get_spectating"] = function()
            local spectators = {}
            local localPlayer = entities.GetLocalPlayer()
            if localPlayer ~= nil then
                if localPlayer:IsAlive() then
                    local players = entities.FindByClass("CCSPlayer")
                    for _,player in pairs(players) do
                        if player ~= localPlayer then
                            local target = player:GetPropEntity("m_hObserverTarget")
                            if target ~= nil then
                                if target:GetIndex() == client.GetLocalPlayerIndex() then               
                                    table.insert(spectators, {name = player:GetName(), active = true})
                                else
                                    table.insert(spectators, {name = player:GetName(), active = false})
                                end
                            end
                        end
                    end
                end
            end
            return spectators
        end,
    },
}

-- @ note: port from neverlose libraries
local tween=(function()local a={}local b,c,d,e,f,g,h=math.pow,math.sin,math.cos,math.pi,math.sqrt,math.abs,math.asin;local function i(j,k,l,m)return l*j/m+k end;local function n(j,k,l,m)return l*b(j/m,2)+k end;local function o(j,k,l,m)j=j/m;return-l*j*(j-2)+k end;local function p(j,k,l,m)j=j/m*2;if j<1 then return l/2*b(j,2)+k end;return-l/2*((j-1)*(j-3)-1)+k end;local function q(j,k,l,m)if j<m/2 then return o(j*2,k,l/2,m)end;return n(j*2-m,k+l/2,l/2,m)end;local function r(j,k,l,m)return l*b(j/m,3)+k end;local function s(j,k,l,m)return l*(b(j/m-1,3)+1)+k end;local function t(j,k,l,m)j=j/m*2;if j<1 then return l/2*j*j*j+k end;j=j-2;return l/2*(j*j*j+2)+k end;local function u(j,k,l,m)if j<m/2 then return s(j*2,k,l/2,m)end;return r(j*2-m,k+l/2,l/2,m)end;local function v(j,k,l,m)return l*b(j/m,4)+k end;local function w(j,k,l,m)return-l*(b(j/m-1,4)-1)+k end;local function x(j,k,l,m)j=j/m*2;if j<1 then return l/2*b(j,4)+k end;return-l/2*(b(j-2,4)-2)+k end;local function y(j,k,l,m)if j<m/2 then return w(j*2,k,l/2,m)end;return v(j*2-m,k+l/2,l/2,m)end;local function z(j,k,l,m)return l*b(j/m,5)+k end;local function A(j,k,l,m)return l*(b(j/m-1,5)+1)+k end;local function B(j,k,l,m)j=j/m*2;if j<1 then return l/2*b(j,5)+k end;return l/2*(b(j-2,5)+2)+k end;local function C(j,k,l,m)if j<m/2 then return A(j*2,k,l/2,m)end;return z(j*2-m,k+l/2,l/2,m)end;local function D(j,k,l,m)return-l*d(j/m*e/2)+l+k end;local function E(j,k,l,m)return l*c(j/m*e/2)+k end;local function F(j,k,l,m)return-l/2*(d(e*j/m)-1)+k end;local function G(j,k,l,m)if j<m/2 then return E(j*2,k,l/2,m)end;return D(j*2-m,k+l/2,l/2,m)end;local function H(j,k,l,m)if j==0 then return k end;return l*b(2,10*(j/m-1))+k-l*0.001 end;local function I(j,k,l,m)if j==m then return k+l end;return l*1.001*(-b(2,-10*j/m)+1)+k end;local function J(j,k,l,m)if j==0 then return k end;if j==m then return k+l end;j=j/m*2;if j<1 then return l/2*b(2,10*(j-1))+k-l*0.0005 end;return l/2*1.0005*(-b(2,-10*(j-1))+2)+k end;local function K(j,k,l,m)if j<m/2 then return I(j*2,k,l/2,m)end;return H(j*2-m,k+l/2,l/2,m)end;local function L(j,k,l,m)return-l*(f(1-b(j/m,2))-1)+k end;local function M(j,k,l,m)return l*f(1-b(j/m-1,2))+k end;local function N(j,k,l,m)j=j/m*2;if j<1 then return-l/2*(f(1-j*j)-1)+k end;j=j-2;return l/2*(f(1-j*j)+1)+k end;local function O(j,k,l,m)if j<m/2 then return M(j*2,k,l/2,m)end;return L(j*2-m,k+l/2,l/2,m)end;local function P(Q,R,l,m)Q,R=Q or m*0.3,R or 0;if R<g(l)then return Q,l,Q/4 end;return Q,R,Q/(2*e)*h(l/R)end;local function S(j,k,l,m,R,Q)local T;if j==0 then return k end;j=j/m;if j==1 then return k+l end;Q,R,T=P(Q,R,l,m)j=j-1;return-(R*b(2,10*j)*c((j*m-T)*2*e/Q))+k end;local function U(j,k,l,m,R,Q)local T;if j==0 then return k end;j=j/m;if j==1 then return k+l end;Q,R,T=P(Q,R,l,m)return R*b(2,-10*j)*c((j*m-T)*2*e/Q)+l+k end;local function V(j,k,l,m,R,Q)local T;if j==0 then return k end;j=j/m*2;if j==2 then return k+l end;Q,R,T=P(Q,R,l,m)j=j-1;if j<0 then return-0.5*R*b(2,10*j)*c((j*m-T)*2*e/Q)+k end;return R*b(2,-10*j)*c((j*m-T)*2*e/Q)*0.5+l+k end;local function W(j,k,l,m,R,Q)if j<m/2 then return U(j*2,k,l/2,m,R,Q)end;return S(j*2-m,k+l/2,l/2,m,R,Q)end;local function X(j,k,l,m,T)T=T or 1.70158;j=j/m;return l*j*j*((T+1)*j-T)+k end;local function Y(j,k,l,m,T)T=T or 1.70158;j=j/m-1;return l*(j*j*((T+1)*j+T)+1)+k end;local function Z(j,k,l,m,T)T=(T or 1.70158)*1.525;j=j/m*2;if j<1 then return l/2*j*j*((T+1)*j-T)+k end;j=j-2;return l/2*(j*j*((T+1)*j+T)+2)+k end;local function _(j,k,l,m,T)if j<m/2 then return Y(j*2,k,l/2,m,T)end;return X(j*2-m,k+l/2,l/2,m,T)end;local function a0(j,k,l,m)j=j/m;if j<1/2.75 then return l*7.5625*j*j+k end;if j<2/2.75 then j=j-1.5/2.75;return l*(7.5625*j*j+0.75)+k elseif j<2.5/2.75 then j=j-2.25/2.75;return l*(7.5625*j*j+0.9375)+k end;j=j-2.625/2.75;return l*(7.5625*j*j+0.984375)+k end;local function a1(j,k,l,m)return l-a0(m-j,0,l,m)+k end;local function a2(j,k,l,m)if j<m/2 then return a1(j*2,0,l,m)*0.5+k end;return a0(j*2-m,0,l,m)*0.5+l*.5+k end;local function a3(j,k,l,m)if j<m/2 then return a0(j*2,k,l/2,m)end;return a1(j*2-m,k+l/2,l/2,m)end;a.easing={linear=i,inQuad=n,outQuad=o,inOutQuad=p,outInQuad=q,inCubic=r,outCubic=s,inOutCubic=t,outInCubic=u,inQuart=v,outQuart=w,inOutQuart=x,outInQuart=y,inQuint=z,outQuint=A,inOutQuint=B,outInQuint=C,inSine=D,outSine=E,inOutSine=F,outInSine=G,inExpo=H,outExpo=I,inOutExpo=J,outInExpo=K,inCirc=L,outCirc=M,inOutCirc=N,outInCirc=O,inElastic=S,outElastic=U,inOutElastic=V,outInElastic=W,inBack=X,outBack=Y,inOutBack=Z,outInBack=_,inBounce=a1,outBounce=a0,inOutBounce=a2,outInBounce=a3}local function a4(a5,a6,a7)a7=a7 or a6;local a8=getmetatable(a6)if a8 and getmetatable(a5)==nil then setmetatable(a5,a8)end;for a9,aa in pairs(a6)do if type(aa)=="table"then a5[a9]=a4({},aa,a7[a9])else a5[a9]=a7[a9]end end;return a5 end;local function ab(ac,ad,ae)ae=ae or{}local af,ag;for a9,ah in pairs(ad)do af,ag=type(ah),a4({},ae)table.insert(ag,tostring(a9))if af=="number"then assert(type(ac[a9])=="number","Parameter '"..table.concat(ag,"/").."' is missing from subject or isn't a number")elseif af=="table"then ab(ac[a9],ah,ag)else assert(af=="number","Parameter '"..table.concat(ag,"/").."' must be a number or table of numbers")end end end;local function ai(aj,ac,ad,ak)assert(type(aj)=="number"and aj>0,"duration must be a positive number. Was "..tostring(aj))local al=type(ac)assert(al=="table"or al=="userdata","subject must be a table or userdata. Was "..tostring(ac))assert(type(ad)=="table","target must be a table. Was "..tostring(ad))assert(type(ak)=="function","easing must be a function. Was "..tostring(ak))ab(ac,ad)end;local function am(ak)ak=ak or"linear"if type(ak)=="string"then local an=ak;ak=a.easing[an]if type(ak)~="function"then error("The easing function name '"..an.."' is invalid")end end;return ak end;local function ao(ac,ad,ap,aq,aj,ak)local j,k,l,m;for a9,aa in pairs(ad)do if type(aa)=="table"then ao(ac[a9],aa,ap[a9],aq,aj,ak)else j,k,l,m=aq,ap[a9],aa-ap[a9],aj;ac[a9]=ak(j,k,l,m)end end end;local ar={}local as={__index=ar}function ar:set(aq)assert(type(aq)=="number","clock must be a positive number or 0")self.initial=self.initial or a4({},self.target,self.subject)self.clock=aq;if self.clock<=0 then self.clock=0;a4(self.subject,self.initial)elseif self.clock>=self.duration then self.clock=self.duration;a4(self.subject,self.target)else ao(self.subject,self.target,self.initial,self.clock,self.duration,self.easing)end;return self.clock>=self.duration end;function ar:reset()return self:set(0)end;function ar:update(at)assert(type(at)=="number","dt must be a number")return self:set(self.clock+at)end;function a.new(aj,ac,ad,ak)ak=am(ak)ai(aj,ac,ad,ak)return setmetatable({duration=aj,subject=ac,target=ad,easing=ak,clock=0},as)end;return a end)()
local tween_table = {}
local tween_data = {k_width = 0, s_width = 0}
tween_updater = function()
    for _, anim in pairs(tween_table) do
        anim:update(globals.FrameTime()) -- 0.015625
    end
end
callbacks.Register("Draw", "tween_updater", tween_updater)

local animatables = {
    data = {},
    
    clamp = function(value, min, max)
        return math.min(max, math.max(min, value))
    end,
}
animatables.create = function(speed, state, id, min, max)
    min = min or 0; max = max or 1
    if not animatables.data[id] then
        animatables.data[id] = {}
        animatables.data[id].time = common.Time()
        animatables.data[id].prev_time = common.Time()
        animatables.data[id].frame = 0
        animatables.data[id].value = 0
    end

    animatables.data[id].prev_time = animatables.data[id].time
    animatables.data[id].time = common.Time()
    animatables.data[id].frame = (animatables.data[id].time - animatables.data[id].prev_time) * speed

    local value = animatables.clamp(animatables.data[id].value, min, max)
    value = animatables.clamp(value + (animatables.data[id].frame * (state and -1 or 1)), min, max)

    animatables.data[id].value = value

    return value
end

local draggables = {
    data = {},
    current = nil,
    
    in_bounds = function(pos1, pos2)
        local mouse_pos = define.common["get_mouse_position"]()
        return mouse_pos[1] >= pos1[1] and mouse_pos[1] <= pos2[1] and mouse_pos[2] >= pos1[2] and mouse_pos[2] <= pos2[2]
    end,
}
draggables.create = function(x, y, w, h, id, only_y)
    only_y = only_y or false
    if not draggables.data[id] then
        draggables.data[id] = {}
        draggables.data[id].position = {0, 0}
        draggables.data[id].state = false
    end

    if draggables.in_bounds({x:GetValue(), y:GetValue()}, {x:GetValue() + w, y:GetValue() + h}) and draggables.in_bounds({0, 0}, define.screen) then
        if input.IsButtonDown(1) and draggables.data[id].state == false and (draggables.current == nil or draggables.current == id) then
            draggables.data[id].state = true
            draggables.current = id
            draggables.data[id].position = {x:GetValue() - define.common["get_mouse_position"]()[1], y:GetValue() - define.common["get_mouse_position"]()[2]}
        end
    end

    if not draggables.in_bounds({0, 0}, define.screen) then
        draggables.data[id].state = false
    end

    if not input.IsButtonDown(1) then
        draggables.data[id].state = false
        draggables.current = nil
    end

    if draggables.data[id].state == true and define.common["menu_state"]() then
        if only_y then
            y:SetValue(define.common["get_mouse_position"]()[2] + draggables.data[id].position[2])
        else
            x:SetValue(define.common["get_mouse_position"]()[1] + draggables.data[id].position[1])
            y:SetValue(define.common["get_mouse_position"]()[2] + draggables.data[id].position[2])
        end
    end
end

local solus_tab = gui.Tab(gui.Reference("MISC"), "solus_tab", "Solus Renewed") -- ;D
local group = {
    watermark = gui.Groupbox(solus_tab, "Watermark", 16, 16, 296),
    keybinds = gui.Groupbox(solus_tab, "Keybinds", 328, 16, 296),
    spectators = gui.Groupbox(solus_tab, "Spectators", 328, 116, 296),
}
local water_bool = gui.Checkbox(group.watermark, "water_enable", "Enabled", false);
local accent = gui.ColorPicker(group.watermark, "accent_color", "Accent", 100, 120, 255, 255)
local style = gui.Combobox(group.watermark, "solus_style", "Style", "Metamod", "Rounded", "Rounded Corners")
local key_bool = gui.Checkbox(group.keybinds, "key_enable", "Enabled", false);
local spec_bool = gui.Checkbox(group.spectators, "spec_enable", "Enabled", false);
local drag = {
    key_x = gui.Slider(group.keybinds, "key_x", "Keybinds X", 300, 0, define.screen[1], 1), spec_x = gui.Slider(group.keybinds, "spec_x", "Spectators X", 300, 0, define.screen[1], 1),
    key_y = gui.Slider(group.keybinds, "key_y", "Keybinds Y", 300, 0, define.screen[2], 1), spec_y = gui.Slider(group.keybinds, "spec_y", "Spectators Y", 400, 0, define.screen[2], 1),
}
for _,item in pairs(drag) do item:SetInvisible(true) end

local draw_watermark = function()
    if not water_bool:GetValue() then
        return end
        
    local time = define.common["get_time"]()
    if time.hour < 10 then time.hour = "0"..time.hour end; if time.minute < 10 then time.minute = "0"..time.minute end
    
    local x, y = define.screen[1] - 8, 10
    local color = {accent:GetValue()}
    local label = "bluesky | "..define.common["get_username"]().." | "..time.hour..":"..time.minute
    
    local localPlayer = entities.GetLocalPlayer()
    if localPlayer then
        local resource = entities.GetPlayerResources()
        local latency = resource:GetPropInt("m_iPing", localPlayer:GetIndex())
        label = "bluesky | "..define.common["get_username"]().." | "..latency.."ms | "..time.hour..":"..time.minute
    end
    
    draw.SetFont(define.fonts.verdana); local text_size = {draw.GetTextSize(label)}
    if style:GetValue() == 0 then
        draw.Color(0, 0, 0, color[4]); draw.FilledRect(x - text_size[1] - 10, y, x, y + 18)
        draw.Color(color[1], color[2], color[3], 255); draw.FilledRect(x - text_size[1] - 10, y - 2, x, y)
    elseif style:GetValue() == 1 then
        draw.Color(0, 0, 0, color[4]); draw.RoundedRectFill(x - text_size[1] - 10, y, x, y + 18, 5)
        draw.Color(color[1], color[2], color[3], 255); draw.RoundedRect(x - text_size[1] - 10, y, x, y + 18, 5)
    elseif style:GetValue() == 2 then
        draw.Color(0, 0, 0, color[4]); draw.RoundedRectFill(x - text_size[1] - 10, y, x, y + 18, 5, 0, 5, 5, 0)
        draw.Color(color[1], color[2], color[3], 255); draw.RoundedRect(x - text_size[1] - 10, y, x, y + 18, 5, 0, 5, 5, 0)
    end
    draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255); draw.TextShadow(x - text_size[1] - 5, y + 5, label)
end
callbacks.Register("Draw", "draw_watermark", draw_watermark)

local draw_keybinds = function()
    if not key_bool:GetValue() then
        return end
        
    local x, y = drag.key_x:GetValue(), drag.key_y:GetValue()
    local color = {accent:GetValue()}
    local state = false
    local alpha = 0
    local binds = {
        {name = "Ping Spike", active = gui.GetValue(define.references.pingspike), mode = 1},
        {name = "Double Tap", active = gui.GetValue(define.references.dt), mode = 1},
        {name = "Triggerbot", active = gui.GetValue(define.references.trigger), mode = 2},
        {name = "Custom Walk", active = gui.GetValue(define.references.customwalk), mode = 2},
        {name = "Knifebot", active = gui.GetValue(define.references.knifebot), mode = 1},
        {name = "Slow Walk", active = gui.GetValue(define.references.slowwalk) ~= 0 and input.IsButtonDown(gui.GetValue(define.references.slowwalk)), mode = 2},
        {name = "Fake Duck", active = gui.GetValue(define.references.fd) ~= 0 and input.IsButtonDown(gui.GetValue(define.references.fd)), mode = 2},
        {name = "Edge Jump", active = gui.GetValue(define.references.ej) ~= 0 and input.IsButtonDown(gui.GetValue(define.references.ej)), mode = 2},
        {name = "Jump Bug", active = gui.GetValue(define.references.jb) ~= 0 and input.IsButtonDown(gui.GetValue(define.references.jb)), mode = 2},
    }
    if gui.GetValue(define.references.peektype) == 0 then
        table.insert(binds, {name = "Auto Peek", active = gui.GetValue(define.references.autopeek) and gui.GetValue(define.references.peekkey) ~= 0 and input.IsButtonDown(gui.GetValue(define.references.peekkey)), mode = 2})
    else
        table.insert(binds, {name = "Auto Peek", active = gui.GetValue(define.references.autopeek) and gui.GetValue(define.references.peekkey) ~= 0, mode = 1})
    end
    
    local offset = 28
    local y_add = 0
    
    for i=1, #binds do local text_size = {draw.GetTextSize(binds[i].name)}
        if binds[i].active then state = true; offset = offset < (text_size[1] - 40) and (text_size[1] - 40) or offset end
    end
    alpha = animatables.create(9, not (state or define.common["menu_state"]()), "k_alpha")

    local w = 90 + offset
    if alpha > 0 then
        tween_table.k_width = tween.new(0.25, tween_data, {k_width = w}, 'outCubic'); w = tween_data.k_width
        
        draw.SetFont(define.fonts.verdana); local text_size = {draw.GetTextSize("keybinds")}
        if style:GetValue() == 0 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.FilledRect(x, y, x + w, y + 18)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.FilledRect(x, y - 2, x + w, y)
        elseif style:GetValue() == 1 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.RoundedRectFill(x, y, x + w, y + 18, 5)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.RoundedRect(x, y, x + w, y + 18, 5)
        elseif style:GetValue() == 2 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.RoundedRectFill(x, y, x + w, y + 18, 5, 0, 5, 5, 0)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.RoundedRect(x, y, x + w, y + 18, 5, 0, 5, 5, 0)
        end
        draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255 * alpha); draw.TextShadow(x + w/2 - text_size[1]/2, y + 5, "keybinds")
        
        for i=1, #binds do
            local alpha = animatables.create(9, not binds[i].active, "k_"..binds[i].name)
            
            local values = {"[toggled]", "[holding]"}
            draw.SetFont(define.fonts.verdana); local text_size = {draw.GetTextSize(values[binds[i].mode])}
            
            draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255 * alpha); draw.TextShadow(x + 2, y + 23 + y_add, binds[i].name)
            draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255 * alpha); draw.TextShadow(x + w - text_size[1] - 2, y + 23 + y_add, values[binds[i].mode])
            y_add = y_add + 15 * alpha
        end
    end
    
    draggables.create(drag.key_x, drag.key_y, w, 18, "keybinds")
end
callbacks.Register("Draw", "draw_keybinds", draw_keybinds)

local draw_spectators = function()
    if not spec_bool:GetValue() then
        return end
    
    local x, y = drag.spec_x:GetValue(), drag.spec_y:GetValue()
    local color = {accent:GetValue()}
    local state = false
    local alpha = 0
    local spectators = define.common["get_spectating"]()
    
    local offset = 28
    local y_add = 0
    
    for i=1, #spectators do
        local name = string.len(spectators[i].name) > 17 and string.sub(spectators[i].name, 0, 17).."..." or spectators[i].name
        local text_size = {draw.GetTextSize(spectators[i].name)}
        if spectators[i].active then state = true; offset = offset < (text_size[1] - 40) and (text_size[1] - 40) or offset end
    end
    alpha = animatables.create(9, not (state or define.common["menu_state"]()), "s_alpha")
    
    local w = 90 + offset
    if alpha > 0 then
        tween_table.s_width = tween.new(0.25, tween_data, {s_width = w}, 'outCubic'); w = tween_data.s_width
        
        draw.SetFont(define.fonts.verdana); local text_size = {draw.GetTextSize("spectators")}
        if style:GetValue() == 0 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.FilledRect(x, y, x + w, y + 18)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.FilledRect(x, y - 2, x + w, y)
        elseif style:GetValue() == 1 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.RoundedRectFill(x, y, x + w, y + 18, 5)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.RoundedRect(x, y, x + w, y + 18, 5)
        elseif style:GetValue() == 2 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.RoundedRectFill(x, y, x + w, y + 18, 5, 0, 5, 5, 0)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.RoundedRect(x, y, x + w, y + 18, 5, 0, 5, 5, 0)
        end
        draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255 * alpha); draw.TextShadow(x + w/2 - text_size[1]/2, y + 5, "spectators")
        
        for i=1, #spectators do
            local alpha = animatables.create(9, not spectators[i].active, "s_"..spectators[i].name)
            
            if alpha > 0 then
                local name = string.len(spectators[i].name) > 17 and string.sub(spectators[i].name, 0, 17).."..." or spectators[i].name
                draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255 * alpha); draw.TextShadow(x + 2, y + 23 + y_add, name)
                y_add = y_add + 15 * alpha
            end
        end
    end
    
    draggables.create(drag.spec_x, drag.spec_y, w, 18, "spectators")
end
callbacks.Register("Draw", "draw_spectators", draw_spectators)
 
Femboy Access
Эксперт
Статус
Оффлайн
Регистрация
11 Ноя 2020
Сообщения
1,335
Реакции[?]
428
Поинты[?]
96K
SYSTEMTIME редефайница так что релоадить луашку нельзя
мне похуй костыль или нет не вам судить суки
Код:
if not pcall(ffi.sizeof, "struct _SYSTEMTIME") then
    ffi.cdef[[
        typedef struct _SYSTEMTIME {
            WORD wYear;
            WORD wMonth;
            WORD wDayOfWeek;
            WORD wDay;
            WORD wHour;
            WORD wMinute;
            WORD wSecond;
            WORD wMilliseconds;
        }
        SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
    ]]
end
 
Пользователь
Статус
Оффлайн
Регистрация
3 Июл 2021
Сообщения
833
Реакции[?]
93
Поинты[?]
10K
у меня кончилась сабка неверлуза и поэтому от скуки решил сделать типа солусы на аимвар

есть анимации, драг / настройки находятся в Misc.

SYSTEMTIME редефайница так что релоадить луашку нельзя
получение времени можно было сделать через сайт, но это :astonished:

Посмотреть вложение 254914
code_language.lua:
-- by lozzya1337

-- @ note: апи аимвара самое лучшее!!!
ffi.cdef[[
    typedef unsigned short WORD;

    typedef struct _SYSTEMTIME {
        WORD wYear;
        WORD wMonth;
        WORD wDayOfWeek;
        WORD wDay;
        WORD wHour;
        WORD wMinute;
        WORD wSecond;
        WORD wMilliseconds;
    }
    SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;

    void GetLocalTime(
        LPSYSTEMTIME lpSystemTime
    );
]]

-- @ note: приватка
panorama.RunScript([[
    Username = MyPersonaAPI.GetName();
    GameInterfaceAPI.ConsoleCommand(`r_eyemove "${Username}"`);
]]);

local define = {
    screen = {draw.GetScreenSize()},
    fonts = {
        verdana = draw.CreateFont("Verdana", 12, 100)
    },
   
    references = {
        fakelag = "misc.fakelag.enable",
        pingspike = "misc.fakelatency.enable",
        dt = "misc.speedburst.enable",
        trigger = "lbot.trg.enable",
        customwalk = "lbot.movement.walkcustom",
        autopeek = "rbot.accuracy.walkbot.peek",
        peekkey = "rbot.accuracy.walkbot.peekkey",
        peektype = "rbot.accuracy.walkbot.peektype",
        knifebot = "lbot.extra.knifetrigger",
        slowwalk = "rbot.accuracy.movement.slowkey",
        fd = "rbot.antiaim.extra.fakecrouchkey",
        ej = "misc.edgejump",
        jb = "misc.autojumpbug",
    },
   
    common = {
        ["menu_state"] = function() return gui.Reference("menu"):IsActive() end,
        ["get_username"] = function() return client.GetConVar("r_eyemove") end,
        ["get_mouse_position"] = function() return {input.GetMousePos()} end,
        ["get_time"] = function()
            local system_time = ffi.new('SYSTEMTIME')
            ffi.C.GetLocalTime(system_time)

            return {
                hour = system_time.wHour,
                minute = system_time.wMinute,
                second = system_time.wSecond,
                milliseconds = system_time.wMilliseconds,
            }
        end,
        ["get_spectating"] = function()
            local spectators = {}
            local localPlayer = entities.GetLocalPlayer()
            if localPlayer ~= nil then
                if localPlayer:IsAlive() then
                    local players = entities.FindByClass("CCSPlayer")
                    for _,player in pairs(players) do
                        if player ~= localPlayer then
                            local target = player:GetPropEntity("m_hObserverTarget")
                            if target ~= nil then
                                if target:GetIndex() == client.GetLocalPlayerIndex() then              
                                    table.insert(spectators, {name = player:GetName(), active = true})
                                else
                                    table.insert(spectators, {name = player:GetName(), active = false})
                                end
                            end
                        end
                    end
                end
            end
            return spectators
        end,
    },
}

-- @ note: port from neverlose libraries
local tween=(function()local a={}local b,c,d,e,f,g,h=math.pow,math.sin,math.cos,math.pi,math.sqrt,math.abs,math.asin;local function i(j,k,l,m)return l*j/m+k end;local function n(j,k,l,m)return l*b(j/m,2)+k end;local function o(j,k,l,m)j=j/m;return-l*j*(j-2)+k end;local function p(j,k,l,m)j=j/m*2;if j<1 then return l/2*b(j,2)+k end;return-l/2*((j-1)*(j-3)-1)+k end;local function q(j,k,l,m)if j<m/2 then return o(j*2,k,l/2,m)end;return n(j*2-m,k+l/2,l/2,m)end;local function r(j,k,l,m)return l*b(j/m,3)+k end;local function s(j,k,l,m)return l*(b(j/m-1,3)+1)+k end;local function t(j,k,l,m)j=j/m*2;if j<1 then return l/2*j*j*j+k end;j=j-2;return l/2*(j*j*j+2)+k end;local function u(j,k,l,m)if j<m/2 then return s(j*2,k,l/2,m)end;return r(j*2-m,k+l/2,l/2,m)end;local function v(j,k,l,m)return l*b(j/m,4)+k end;local function w(j,k,l,m)return-l*(b(j/m-1,4)-1)+k end;local function x(j,k,l,m)j=j/m*2;if j<1 then return l/2*b(j,4)+k end;return-l/2*(b(j-2,4)-2)+k end;local function y(j,k,l,m)if j<m/2 then return w(j*2,k,l/2,m)end;return v(j*2-m,k+l/2,l/2,m)end;local function z(j,k,l,m)return l*b(j/m,5)+k end;local function A(j,k,l,m)return l*(b(j/m-1,5)+1)+k end;local function B(j,k,l,m)j=j/m*2;if j<1 then return l/2*b(j,5)+k end;return l/2*(b(j-2,5)+2)+k end;local function C(j,k,l,m)if j<m/2 then return A(j*2,k,l/2,m)end;return z(j*2-m,k+l/2,l/2,m)end;local function D(j,k,l,m)return-l*d(j/m*e/2)+l+k end;local function E(j,k,l,m)return l*c(j/m*e/2)+k end;local function F(j,k,l,m)return-l/2*(d(e*j/m)-1)+k end;local function G(j,k,l,m)if j<m/2 then return E(j*2,k,l/2,m)end;return D(j*2-m,k+l/2,l/2,m)end;local function H(j,k,l,m)if j==0 then return k end;return l*b(2,10*(j/m-1))+k-l*0.001 end;local function I(j,k,l,m)if j==m then return k+l end;return l*1.001*(-b(2,-10*j/m)+1)+k end;local function J(j,k,l,m)if j==0 then return k end;if j==m then return k+l end;j=j/m*2;if j<1 then return l/2*b(2,10*(j-1))+k-l*0.0005 end;return l/2*1.0005*(-b(2,-10*(j-1))+2)+k end;local function K(j,k,l,m)if j<m/2 then return I(j*2,k,l/2,m)end;return H(j*2-m,k+l/2,l/2,m)end;local function L(j,k,l,m)return-l*(f(1-b(j/m,2))-1)+k end;local function M(j,k,l,m)return l*f(1-b(j/m-1,2))+k end;local function N(j,k,l,m)j=j/m*2;if j<1 then return-l/2*(f(1-j*j)-1)+k end;j=j-2;return l/2*(f(1-j*j)+1)+k end;local function O(j,k,l,m)if j<m/2 then return M(j*2,k,l/2,m)end;return L(j*2-m,k+l/2,l/2,m)end;local function P(Q,R,l,m)Q,R=Q or m*0.3,R or 0;if R<g(l)then return Q,l,Q/4 end;return Q,R,Q/(2*e)*h(l/R)end;local function S(j,k,l,m,R,Q)local T;if j==0 then return k end;j=j/m;if j==1 then return k+l end;Q,R,T=P(Q,R,l,m)j=j-1;return-(R*b(2,10*j)*c((j*m-T)*2*e/Q))+k end;local function U(j,k,l,m,R,Q)local T;if j==0 then return k end;j=j/m;if j==1 then return k+l end;Q,R,T=P(Q,R,l,m)return R*b(2,-10*j)*c((j*m-T)*2*e/Q)+l+k end;local function V(j,k,l,m,R,Q)local T;if j==0 then return k end;j=j/m*2;if j==2 then return k+l end;Q,R,T=P(Q,R,l,m)j=j-1;if j<0 then return-0.5*R*b(2,10*j)*c((j*m-T)*2*e/Q)+k end;return R*b(2,-10*j)*c((j*m-T)*2*e/Q)*0.5+l+k end;local function W(j,k,l,m,R,Q)if j<m/2 then return U(j*2,k,l/2,m,R,Q)end;return S(j*2-m,k+l/2,l/2,m,R,Q)end;local function X(j,k,l,m,T)T=T or 1.70158;j=j/m;return l*j*j*((T+1)*j-T)+k end;local function Y(j,k,l,m,T)T=T or 1.70158;j=j/m-1;return l*(j*j*((T+1)*j+T)+1)+k end;local function Z(j,k,l,m,T)T=(T or 1.70158)*1.525;j=j/m*2;if j<1 then return l/2*j*j*((T+1)*j-T)+k end;j=j-2;return l/2*(j*j*((T+1)*j+T)+2)+k end;local function _(j,k,l,m,T)if j<m/2 then return Y(j*2,k,l/2,m,T)end;return X(j*2-m,k+l/2,l/2,m,T)end;local function a0(j,k,l,m)j=j/m;if j<1/2.75 then return l*7.5625*j*j+k end;if j<2/2.75 then j=j-1.5/2.75;return l*(7.5625*j*j+0.75)+k elseif j<2.5/2.75 then j=j-2.25/2.75;return l*(7.5625*j*j+0.9375)+k end;j=j-2.625/2.75;return l*(7.5625*j*j+0.984375)+k end;local function a1(j,k,l,m)return l-a0(m-j,0,l,m)+k end;local function a2(j,k,l,m)if j<m/2 then return a1(j*2,0,l,m)*0.5+k end;return a0(j*2-m,0,l,m)*0.5+l*.5+k end;local function a3(j,k,l,m)if j<m/2 then return a0(j*2,k,l/2,m)end;return a1(j*2-m,k+l/2,l/2,m)end;a.easing={linear=i,inQuad=n,outQuad=o,inOutQuad=p,outInQuad=q,inCubic=r,outCubic=s,inOutCubic=t,outInCubic=u,inQuart=v,outQuart=w,inOutQuart=x,outInQuart=y,inQuint=z,outQuint=A,inOutQuint=B,outInQuint=C,inSine=D,outSine=E,inOutSine=F,outInSine=G,inExpo=H,outExpo=I,inOutExpo=J,outInExpo=K,inCirc=L,outCirc=M,inOutCirc=N,outInCirc=O,inElastic=S,outElastic=U,inOutElastic=V,outInElastic=W,inBack=X,outBack=Y,inOutBack=Z,outInBack=_,inBounce=a1,outBounce=a0,inOutBounce=a2,outInBounce=a3}local function a4(a5,a6,a7)a7=a7 or a6;local a8=getmetatable(a6)if a8 and getmetatable(a5)==nil then setmetatable(a5,a8)end;for a9,aa in pairs(a6)do if type(aa)=="table"then a5[a9]=a4({},aa,a7[a9])else a5[a9]=a7[a9]end end;return a5 end;local function ab(ac,ad,ae)ae=ae or{}local af,ag;for a9,ah in pairs(ad)do af,ag=type(ah),a4({},ae)table.insert(ag,tostring(a9))if af=="number"then assert(type(ac[a9])=="number","Parameter '"..table.concat(ag,"/").."' is missing from subject or isn't a number")elseif af=="table"then ab(ac[a9],ah,ag)else assert(af=="number","Parameter '"..table.concat(ag,"/").."' must be a number or table of numbers")end end end;local function ai(aj,ac,ad,ak)assert(type(aj)=="number"and aj>0,"duration must be a positive number. Was "..tostring(aj))local al=type(ac)assert(al=="table"or al=="userdata","subject must be a table or userdata. Was "..tostring(ac))assert(type(ad)=="table","target must be a table. Was "..tostring(ad))assert(type(ak)=="function","easing must be a function. Was "..tostring(ak))ab(ac,ad)end;local function am(ak)ak=ak or"linear"if type(ak)=="string"then local an=ak;ak=a.easing[an]if type(ak)~="function"then error("The easing function name '"..an.."' is invalid")end end;return ak end;local function ao(ac,ad,ap,aq,aj,ak)local j,k,l,m;for a9,aa in pairs(ad)do if type(aa)=="table"then ao(ac[a9],aa,ap[a9],aq,aj,ak)else j,k,l,m=aq,ap[a9],aa-ap[a9],aj;ac[a9]=ak(j,k,l,m)end end end;local ar={}local as={__index=ar}function ar:set(aq)assert(type(aq)=="number","clock must be a positive number or 0")self.initial=self.initial or a4({},self.target,self.subject)self.clock=aq;if self.clock<=0 then self.clock=0;a4(self.subject,self.initial)elseif self.clock>=self.duration then self.clock=self.duration;a4(self.subject,self.target)else ao(self.subject,self.target,self.initial,self.clock,self.duration,self.easing)end;return self.clock>=self.duration end;function ar:reset()return self:set(0)end;function ar:update(at)assert(type(at)=="number","dt must be a number")return self:set(self.clock+at)end;function a.new(aj,ac,ad,ak)ak=am(ak)ai(aj,ac,ad,ak)return setmetatable({duration=aj,subject=ac,target=ad,easing=ak,clock=0},as)end;return a end)()
local tween_table = {}
local tween_data = {k_width = 0, s_width = 0}
tween_updater = function()
    for _, anim in pairs(tween_table) do
        anim:update(globals.FrameTime()) -- 0.015625
    end
end
callbacks.Register("Draw", "tween_updater", tween_updater)

local animatables = {
    data = {},
   
    clamp = function(value, min, max)
        return math.min(max, math.max(min, value))
    end,
}
animatables.create = function(speed, state, id, min, max)
    min = min or 0; max = max or 1
    if not animatables.data[id] then
        animatables.data[id] = {}
        animatables.data[id].time = common.Time()
        animatables.data[id].prev_time = common.Time()
        animatables.data[id].frame = 0
        animatables.data[id].value = 0
    end

    animatables.data[id].prev_time = animatables.data[id].time
    animatables.data[id].time = common.Time()
    animatables.data[id].frame = (animatables.data[id].time - animatables.data[id].prev_time) * speed

    local value = animatables.clamp(animatables.data[id].value, min, max)
    value = animatables.clamp(value + (animatables.data[id].frame * (state and -1 or 1)), min, max)

    animatables.data[id].value = value

    return value
end

local draggables = {
    data = {},
    current = nil,
   
    in_bounds = function(pos1, pos2)
        local mouse_pos = define.common["get_mouse_position"]()
        return mouse_pos[1] >= pos1[1] and mouse_pos[1] <= pos2[1] and mouse_pos[2] >= pos1[2] and mouse_pos[2] <= pos2[2]
    end,
}
draggables.create = function(x, y, w, h, id, only_y)
    only_y = only_y or false
    if not draggables.data[id] then
        draggables.data[id] = {}
        draggables.data[id].position = {0, 0}
        draggables.data[id].state = false
    end

    if draggables.in_bounds({x:GetValue(), y:GetValue()}, {x:GetValue() + w, y:GetValue() + h}) and draggables.in_bounds({0, 0}, define.screen) then
        if input.IsButtonDown(1) and draggables.data[id].state == false and (draggables.current == nil or draggables.current == id) then
            draggables.data[id].state = true
            draggables.current = id
            draggables.data[id].position = {x:GetValue() - define.common["get_mouse_position"]()[1], y:GetValue() - define.common["get_mouse_position"]()[2]}
        end
    end

    if not draggables.in_bounds({0, 0}, define.screen) then
        draggables.data[id].state = false
    end

    if not input.IsButtonDown(1) then
        draggables.data[id].state = false
        draggables.current = nil
    end

    if draggables.data[id].state == true and define.common["menu_state"]() then
        if only_y then
            y:SetValue(define.common["get_mouse_position"]()[2] + draggables.data[id].position[2])
        else
            x:SetValue(define.common["get_mouse_position"]()[1] + draggables.data[id].position[1])
            y:SetValue(define.common["get_mouse_position"]()[2] + draggables.data[id].position[2])
        end
    end
end

local solus_tab = gui.Tab(gui.Reference("MISC"), "solus_tab", "Solus Renewed") -- ;D
local group = {
    watermark = gui.Groupbox(solus_tab, "Watermark", 16, 16, 296),
    keybinds = gui.Groupbox(solus_tab, "Keybinds", 328, 16, 296),
    spectators = gui.Groupbox(solus_tab, "Spectators", 328, 116, 296),
}
local water_bool = gui.Checkbox(group.watermark, "water_enable", "Enabled", false);
local accent = gui.ColorPicker(group.watermark, "accent_color", "Accent", 100, 120, 255, 255)
local style = gui.Combobox(group.watermark, "solus_style", "Style", "Metamod", "Rounded", "Rounded Corners")
local key_bool = gui.Checkbox(group.keybinds, "key_enable", "Enabled", false);
local spec_bool = gui.Checkbox(group.spectators, "spec_enable", "Enabled", false);
local drag = {
    key_x = gui.Slider(group.keybinds, "key_x", "Keybinds X", 300, 0, define.screen[1], 1), spec_x = gui.Slider(group.keybinds, "spec_x", "Spectators X", 300, 0, define.screen[1], 1),
    key_y = gui.Slider(group.keybinds, "key_y", "Keybinds Y", 300, 0, define.screen[2], 1), spec_y = gui.Slider(group.keybinds, "spec_y", "Spectators Y", 400, 0, define.screen[2], 1),
}
for _,item in pairs(drag) do item:SetInvisible(true) end

local draw_watermark = function()
    if not water_bool:GetValue() then
        return end
       
    local time = define.common["get_time"]()
    if time.hour < 10 then time.hour = "0"..time.hour end; if time.minute < 10 then time.minute = "0"..time.minute end
   
    local x, y = define.screen[1] - 8, 10
    local color = {accent:GetValue()}
    local label = "bluesky | "..define.common["get_username"]().." | "..time.hour..":"..time.minute
   
    local localPlayer = entities.GetLocalPlayer()
    if localPlayer then
        local resource = entities.GetPlayerResources()
        local latency = resource:GetPropInt("m_iPing", localPlayer:GetIndex())
        label = "bluesky | "..define.common["get_username"]().." | "..latency.."ms | "..time.hour..":"..time.minute
    end
   
    draw.SetFont(define.fonts.verdana); local text_size = {draw.GetTextSize(label)}
    if style:GetValue() == 0 then
        draw.Color(0, 0, 0, color[4]); draw.FilledRect(x - text_size[1] - 10, y, x, y + 18)
        draw.Color(color[1], color[2], color[3], 255); draw.FilledRect(x - text_size[1] - 10, y - 2, x, y)
    elseif style:GetValue() == 1 then
        draw.Color(0, 0, 0, color[4]); draw.RoundedRectFill(x - text_size[1] - 10, y, x, y + 18, 5)
        draw.Color(color[1], color[2], color[3], 255); draw.RoundedRect(x - text_size[1] - 10, y, x, y + 18, 5)
    elseif style:GetValue() == 2 then
        draw.Color(0, 0, 0, color[4]); draw.RoundedRectFill(x - text_size[1] - 10, y, x, y + 18, 5, 0, 5, 5, 0)
        draw.Color(color[1], color[2], color[3], 255); draw.RoundedRect(x - text_size[1] - 10, y, x, y + 18, 5, 0, 5, 5, 0)
    end
    draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255); draw.TextShadow(x - text_size[1] - 5, y + 5, label)
end
callbacks.Register("Draw", "draw_watermark", draw_watermark)

local draw_keybinds = function()
    if not key_bool:GetValue() then
        return end
       
    local x, y = drag.key_x:GetValue(), drag.key_y:GetValue()
    local color = {accent:GetValue()}
    local state = false
    local alpha = 0
    local binds = {
        {name = "Ping Spike", active = gui.GetValue(define.references.pingspike), mode = 1},
        {name = "Double Tap", active = gui.GetValue(define.references.dt), mode = 1},
        {name = "Triggerbot", active = gui.GetValue(define.references.trigger), mode = 2},
        {name = "Custom Walk", active = gui.GetValue(define.references.customwalk), mode = 2},
        {name = "Knifebot", active = gui.GetValue(define.references.knifebot), mode = 1},
        {name = "Slow Walk", active = gui.GetValue(define.references.slowwalk) ~= 0 and input.IsButtonDown(gui.GetValue(define.references.slowwalk)), mode = 2},
        {name = "Fake Duck", active = gui.GetValue(define.references.fd) ~= 0 and input.IsButtonDown(gui.GetValue(define.references.fd)), mode = 2},
        {name = "Edge Jump", active = gui.GetValue(define.references.ej) ~= 0 and input.IsButtonDown(gui.GetValue(define.references.ej)), mode = 2},
        {name = "Jump Bug", active = gui.GetValue(define.references.jb) ~= 0 and input.IsButtonDown(gui.GetValue(define.references.jb)), mode = 2},
    }
    if gui.GetValue(define.references.peektype) == 0 then
        table.insert(binds, {name = "Auto Peek", active = gui.GetValue(define.references.autopeek) and gui.GetValue(define.references.peekkey) ~= 0 and input.IsButtonDown(gui.GetValue(define.references.peekkey)), mode = 2})
    else
        table.insert(binds, {name = "Auto Peek", active = gui.GetValue(define.references.autopeek) and gui.GetValue(define.references.peekkey) ~= 0, mode = 1})
    end
   
    local offset = 28
    local y_add = 0
   
    for i=1, #binds do local text_size = {draw.GetTextSize(binds[i].name)}
        if binds[i].active then state = true; offset = offset < (text_size[1] - 40) and (text_size[1] - 40) or offset end
    end
    alpha = animatables.create(9, not (state or define.common["menu_state"]()), "k_alpha")

    local w = 90 + offset
    if alpha > 0 then
        tween_table.k_width = tween.new(0.25, tween_data, {k_width = w}, 'outCubic'); w = tween_data.k_width
       
        draw.SetFont(define.fonts.verdana); local text_size = {draw.GetTextSize("keybinds")}
        if style:GetValue() == 0 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.FilledRect(x, y, x + w, y + 18)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.FilledRect(x, y - 2, x + w, y)
        elseif style:GetValue() == 1 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.RoundedRectFill(x, y, x + w, y + 18, 5)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.RoundedRect(x, y, x + w, y + 18, 5)
        elseif style:GetValue() == 2 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.RoundedRectFill(x, y, x + w, y + 18, 5, 0, 5, 5, 0)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.RoundedRect(x, y, x + w, y + 18, 5, 0, 5, 5, 0)
        end
        draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255 * alpha); draw.TextShadow(x + w/2 - text_size[1]/2, y + 5, "keybinds")
       
        for i=1, #binds do
            local alpha = animatables.create(9, not binds[i].active, "k_"..binds[i].name)
           
            local values = {"[toggled]", "[holding]"}
            draw.SetFont(define.fonts.verdana); local text_size = {draw.GetTextSize(values[binds[i].mode])}
           
            draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255 * alpha); draw.TextShadow(x + 2, y + 23 + y_add, binds[i].name)
            draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255 * alpha); draw.TextShadow(x + w - text_size[1] - 2, y + 23 + y_add, values[binds[i].mode])
            y_add = y_add + 15 * alpha
        end
    end
   
    draggables.create(drag.key_x, drag.key_y, w, 18, "keybinds")
end
callbacks.Register("Draw", "draw_keybinds", draw_keybinds)

local draw_spectators = function()
    if not spec_bool:GetValue() then
        return end
   
    local x, y = drag.spec_x:GetValue(), drag.spec_y:GetValue()
    local color = {accent:GetValue()}
    local state = false
    local alpha = 0
    local spectators = define.common["get_spectating"]()
   
    local offset = 28
    local y_add = 0
   
    for i=1, #spectators do
        local name = string.len(spectators[i].name) > 17 and string.sub(spectators[i].name, 0, 17).."..." or spectators[i].name
        local text_size = {draw.GetTextSize(spectators[i].name)}
        if spectators[i].active then state = true; offset = offset < (text_size[1] - 40) and (text_size[1] - 40) or offset end
    end
    alpha = animatables.create(9, not (state or define.common["menu_state"]()), "s_alpha")
   
    local w = 90 + offset
    if alpha > 0 then
        tween_table.s_width = tween.new(0.25, tween_data, {s_width = w}, 'outCubic'); w = tween_data.s_width
       
        draw.SetFont(define.fonts.verdana); local text_size = {draw.GetTextSize("spectators")}
        if style:GetValue() == 0 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.FilledRect(x, y, x + w, y + 18)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.FilledRect(x, y - 2, x + w, y)
        elseif style:GetValue() == 1 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.RoundedRectFill(x, y, x + w, y + 18, 5)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.RoundedRect(x, y, x + w, y + 18, 5)
        elseif style:GetValue() == 2 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.RoundedRectFill(x, y, x + w, y + 18, 5, 0, 5, 5, 0)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.RoundedRect(x, y, x + w, y + 18, 5, 0, 5, 5, 0)
        end
        draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255 * alpha); draw.TextShadow(x + w/2 - text_size[1]/2, y + 5, "spectators")
       
        for i=1, #spectators do
            local alpha = animatables.create(9, not spectators[i].active, "s_"..spectators[i].name)
           
            if alpha > 0 then
                local name = string.len(spectators[i].name) > 17 and string.sub(spectators[i].name, 0, 17).."..." or spectators[i].name
                draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255 * alpha); draw.TextShadow(x + 2, y + 23 + y_add, name)
                y_add = y_add + 15 * alpha
            end
        end
    end
   
    draggables.create(drag.spec_x, drag.spec_y, w, 18, "spectators")
end
callbacks.Register("Draw", "draw_spectators", draw_spectators)
за код стайл респект
 
Пользователь
Статус
Оффлайн
Регистрация
3 Июл 2021
Сообщения
833
Реакции[?]
93
Поинты[?]
10K
Juicy
Участник
Статус
Оффлайн
Регистрация
5 Май 2021
Сообщения
677
Реакции[?]
158
Поинты[?]
17K
у меня кончилась сабка неверлуза и поэтому от скуки решил сделать типа солусы на аимвар

есть анимации, драг / настройки находятся в Misc.

SYSTEMTIME редефайница так что релоадить луашку нельзя
получение времени можно было сделать через сайт, но это :astonished:

Посмотреть вложение 254914
code_language.lua:
-- by lozzya1337

-- @ note: апи аимвара самое лучшее!!!
ffi.cdef[[
    typedef unsigned short WORD;

    typedef struct _SYSTEMTIME {
        WORD wYear;
        WORD wMonth;
        WORD wDayOfWeek;
        WORD wDay;
        WORD wHour;
        WORD wMinute;
        WORD wSecond;
        WORD wMilliseconds;
    }
    SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;

    void GetLocalTime(
        LPSYSTEMTIME lpSystemTime
    );
]]

-- @ note: приватка
panorama.RunScript([[
    Username = MyPersonaAPI.GetName();
    GameInterfaceAPI.ConsoleCommand(`r_eyemove "${Username}"`);
]]);

local define = {
    screen = {draw.GetScreenSize()},
    fonts = {
        verdana = draw.CreateFont("Verdana", 12, 100)
    },
   
    references = {
        fakelag = "misc.fakelag.enable",
        pingspike = "misc.fakelatency.enable",
        dt = "misc.speedburst.enable",
        trigger = "lbot.trg.enable",
        customwalk = "lbot.movement.walkcustom",
        autopeek = "rbot.accuracy.walkbot.peek",
        peekkey = "rbot.accuracy.walkbot.peekkey",
        peektype = "rbot.accuracy.walkbot.peektype",
        knifebot = "lbot.extra.knifetrigger",
        slowwalk = "rbot.accuracy.movement.slowkey",
        fd = "rbot.antiaim.extra.fakecrouchkey",
        ej = "misc.edgejump",
        jb = "misc.autojumpbug",
    },
   
    common = {
        ["menu_state"] = function() return gui.Reference("menu"):IsActive() end,
        ["get_username"] = function() return client.GetConVar("r_eyemove") end,
        ["get_mouse_position"] = function() return {input.GetMousePos()} end,
        ["get_time"] = function()
            local system_time = ffi.new('SYSTEMTIME')
            ffi.C.GetLocalTime(system_time)

            return {
                hour = system_time.wHour,
                minute = system_time.wMinute,
                second = system_time.wSecond,
                milliseconds = system_time.wMilliseconds,
            }
        end,
        ["get_spectating"] = function()
            local spectators = {}
            local localPlayer = entities.GetLocalPlayer()
            if localPlayer ~= nil then
                if localPlayer:IsAlive() then
                    local players = entities.FindByClass("CCSPlayer")
                    for _,player in pairs(players) do
                        if player ~= localPlayer then
                            local target = player:GetPropEntity("m_hObserverTarget")
                            if target ~= nil then
                                if target:GetIndex() == client.GetLocalPlayerIndex() then              
                                    table.insert(spectators, {name = player:GetName(), active = true})
                                else
                                    table.insert(spectators, {name = player:GetName(), active = false})
                                end
                            end
                        end
                    end
                end
            end
            return spectators
        end,
    },
}

-- @ note: port from neverlose libraries
local tween=(function()local a={}local b,c,d,e,f,g,h=math.pow,math.sin,math.cos,math.pi,math.sqrt,math.abs,math.asin;local function i(j,k,l,m)return l*j/m+k end;local function n(j,k,l,m)return l*b(j/m,2)+k end;local function o(j,k,l,m)j=j/m;return-l*j*(j-2)+k end;local function p(j,k,l,m)j=j/m*2;if j<1 then return l/2*b(j,2)+k end;return-l/2*((j-1)*(j-3)-1)+k end;local function q(j,k,l,m)if j<m/2 then return o(j*2,k,l/2,m)end;return n(j*2-m,k+l/2,l/2,m)end;local function r(j,k,l,m)return l*b(j/m,3)+k end;local function s(j,k,l,m)return l*(b(j/m-1,3)+1)+k end;local function t(j,k,l,m)j=j/m*2;if j<1 then return l/2*j*j*j+k end;j=j-2;return l/2*(j*j*j+2)+k end;local function u(j,k,l,m)if j<m/2 then return s(j*2,k,l/2,m)end;return r(j*2-m,k+l/2,l/2,m)end;local function v(j,k,l,m)return l*b(j/m,4)+k end;local function w(j,k,l,m)return-l*(b(j/m-1,4)-1)+k end;local function x(j,k,l,m)j=j/m*2;if j<1 then return l/2*b(j,4)+k end;return-l/2*(b(j-2,4)-2)+k end;local function y(j,k,l,m)if j<m/2 then return w(j*2,k,l/2,m)end;return v(j*2-m,k+l/2,l/2,m)end;local function z(j,k,l,m)return l*b(j/m,5)+k end;local function A(j,k,l,m)return l*(b(j/m-1,5)+1)+k end;local function B(j,k,l,m)j=j/m*2;if j<1 then return l/2*b(j,5)+k end;return l/2*(b(j-2,5)+2)+k end;local function C(j,k,l,m)if j<m/2 then return A(j*2,k,l/2,m)end;return z(j*2-m,k+l/2,l/2,m)end;local function D(j,k,l,m)return-l*d(j/m*e/2)+l+k end;local function E(j,k,l,m)return l*c(j/m*e/2)+k end;local function F(j,k,l,m)return-l/2*(d(e*j/m)-1)+k end;local function G(j,k,l,m)if j<m/2 then return E(j*2,k,l/2,m)end;return D(j*2-m,k+l/2,l/2,m)end;local function H(j,k,l,m)if j==0 then return k end;return l*b(2,10*(j/m-1))+k-l*0.001 end;local function I(j,k,l,m)if j==m then return k+l end;return l*1.001*(-b(2,-10*j/m)+1)+k end;local function J(j,k,l,m)if j==0 then return k end;if j==m then return k+l end;j=j/m*2;if j<1 then return l/2*b(2,10*(j-1))+k-l*0.0005 end;return l/2*1.0005*(-b(2,-10*(j-1))+2)+k end;local function K(j,k,l,m)if j<m/2 then return I(j*2,k,l/2,m)end;return H(j*2-m,k+l/2,l/2,m)end;local function L(j,k,l,m)return-l*(f(1-b(j/m,2))-1)+k end;local function M(j,k,l,m)return l*f(1-b(j/m-1,2))+k end;local function N(j,k,l,m)j=j/m*2;if j<1 then return-l/2*(f(1-j*j)-1)+k end;j=j-2;return l/2*(f(1-j*j)+1)+k end;local function O(j,k,l,m)if j<m/2 then return M(j*2,k,l/2,m)end;return L(j*2-m,k+l/2,l/2,m)end;local function P(Q,R,l,m)Q,R=Q or m*0.3,R or 0;if R<g(l)then return Q,l,Q/4 end;return Q,R,Q/(2*e)*h(l/R)end;local function S(j,k,l,m,R,Q)local T;if j==0 then return k end;j=j/m;if j==1 then return k+l end;Q,R,T=P(Q,R,l,m)j=j-1;return-(R*b(2,10*j)*c((j*m-T)*2*e/Q))+k end;local function U(j,k,l,m,R,Q)local T;if j==0 then return k end;j=j/m;if j==1 then return k+l end;Q,R,T=P(Q,R,l,m)return R*b(2,-10*j)*c((j*m-T)*2*e/Q)+l+k end;local function V(j,k,l,m,R,Q)local T;if j==0 then return k end;j=j/m*2;if j==2 then return k+l end;Q,R,T=P(Q,R,l,m)j=j-1;if j<0 then return-0.5*R*b(2,10*j)*c((j*m-T)*2*e/Q)+k end;return R*b(2,-10*j)*c((j*m-T)*2*e/Q)*0.5+l+k end;local function W(j,k,l,m,R,Q)if j<m/2 then return U(j*2,k,l/2,m,R,Q)end;return S(j*2-m,k+l/2,l/2,m,R,Q)end;local function X(j,k,l,m,T)T=T or 1.70158;j=j/m;return l*j*j*((T+1)*j-T)+k end;local function Y(j,k,l,m,T)T=T or 1.70158;j=j/m-1;return l*(j*j*((T+1)*j+T)+1)+k end;local function Z(j,k,l,m,T)T=(T or 1.70158)*1.525;j=j/m*2;if j<1 then return l/2*j*j*((T+1)*j-T)+k end;j=j-2;return l/2*(j*j*((T+1)*j+T)+2)+k end;local function _(j,k,l,m,T)if j<m/2 then return Y(j*2,k,l/2,m,T)end;return X(j*2-m,k+l/2,l/2,m,T)end;local function a0(j,k,l,m)j=j/m;if j<1/2.75 then return l*7.5625*j*j+k end;if j<2/2.75 then j=j-1.5/2.75;return l*(7.5625*j*j+0.75)+k elseif j<2.5/2.75 then j=j-2.25/2.75;return l*(7.5625*j*j+0.9375)+k end;j=j-2.625/2.75;return l*(7.5625*j*j+0.984375)+k end;local function a1(j,k,l,m)return l-a0(m-j,0,l,m)+k end;local function a2(j,k,l,m)if j<m/2 then return a1(j*2,0,l,m)*0.5+k end;return a0(j*2-m,0,l,m)*0.5+l*.5+k end;local function a3(j,k,l,m)if j<m/2 then return a0(j*2,k,l/2,m)end;return a1(j*2-m,k+l/2,l/2,m)end;a.easing={linear=i,inQuad=n,outQuad=o,inOutQuad=p,outInQuad=q,inCubic=r,outCubic=s,inOutCubic=t,outInCubic=u,inQuart=v,outQuart=w,inOutQuart=x,outInQuart=y,inQuint=z,outQuint=A,inOutQuint=B,outInQuint=C,inSine=D,outSine=E,inOutSine=F,outInSine=G,inExpo=H,outExpo=I,inOutExpo=J,outInExpo=K,inCirc=L,outCirc=M,inOutCirc=N,outInCirc=O,inElastic=S,outElastic=U,inOutElastic=V,outInElastic=W,inBack=X,outBack=Y,inOutBack=Z,outInBack=_,inBounce=a1,outBounce=a0,inOutBounce=a2,outInBounce=a3}local function a4(a5,a6,a7)a7=a7 or a6;local a8=getmetatable(a6)if a8 and getmetatable(a5)==nil then setmetatable(a5,a8)end;for a9,aa in pairs(a6)do if type(aa)=="table"then a5[a9]=a4({},aa,a7[a9])else a5[a9]=a7[a9]end end;return a5 end;local function ab(ac,ad,ae)ae=ae or{}local af,ag;for a9,ah in pairs(ad)do af,ag=type(ah),a4({},ae)table.insert(ag,tostring(a9))if af=="number"then assert(type(ac[a9])=="number","Parameter '"..table.concat(ag,"/").."' is missing from subject or isn't a number")elseif af=="table"then ab(ac[a9],ah,ag)else assert(af=="number","Parameter '"..table.concat(ag,"/").."' must be a number or table of numbers")end end end;local function ai(aj,ac,ad,ak)assert(type(aj)=="number"and aj>0,"duration must be a positive number. Was "..tostring(aj))local al=type(ac)assert(al=="table"or al=="userdata","subject must be a table or userdata. Was "..tostring(ac))assert(type(ad)=="table","target must be a table. Was "..tostring(ad))assert(type(ak)=="function","easing must be a function. Was "..tostring(ak))ab(ac,ad)end;local function am(ak)ak=ak or"linear"if type(ak)=="string"then local an=ak;ak=a.easing[an]if type(ak)~="function"then error("The easing function name '"..an.."' is invalid")end end;return ak end;local function ao(ac,ad,ap,aq,aj,ak)local j,k,l,m;for a9,aa in pairs(ad)do if type(aa)=="table"then ao(ac[a9],aa,ap[a9],aq,aj,ak)else j,k,l,m=aq,ap[a9],aa-ap[a9],aj;ac[a9]=ak(j,k,l,m)end end end;local ar={}local as={__index=ar}function ar:set(aq)assert(type(aq)=="number","clock must be a positive number or 0")self.initial=self.initial or a4({},self.target,self.subject)self.clock=aq;if self.clock<=0 then self.clock=0;a4(self.subject,self.initial)elseif self.clock>=self.duration then self.clock=self.duration;a4(self.subject,self.target)else ao(self.subject,self.target,self.initial,self.clock,self.duration,self.easing)end;return self.clock>=self.duration end;function ar:reset()return self:set(0)end;function ar:update(at)assert(type(at)=="number","dt must be a number")return self:set(self.clock+at)end;function a.new(aj,ac,ad,ak)ak=am(ak)ai(aj,ac,ad,ak)return setmetatable({duration=aj,subject=ac,target=ad,easing=ak,clock=0},as)end;return a end)()
local tween_table = {}
local tween_data = {k_width = 0, s_width = 0}
tween_updater = function()
    for _, anim in pairs(tween_table) do
        anim:update(globals.FrameTime()) -- 0.015625
    end
end
callbacks.Register("Draw", "tween_updater", tween_updater)

local animatables = {
    data = {},
   
    clamp = function(value, min, max)
        return math.min(max, math.max(min, value))
    end,
}
animatables.create = function(speed, state, id, min, max)
    min = min or 0; max = max or 1
    if not animatables.data[id] then
        animatables.data[id] = {}
        animatables.data[id].time = common.Time()
        animatables.data[id].prev_time = common.Time()
        animatables.data[id].frame = 0
        animatables.data[id].value = 0
    end

    animatables.data[id].prev_time = animatables.data[id].time
    animatables.data[id].time = common.Time()
    animatables.data[id].frame = (animatables.data[id].time - animatables.data[id].prev_time) * speed

    local value = animatables.clamp(animatables.data[id].value, min, max)
    value = animatables.clamp(value + (animatables.data[id].frame * (state and -1 or 1)), min, max)

    animatables.data[id].value = value

    return value
end

local draggables = {
    data = {},
    current = nil,
   
    in_bounds = function(pos1, pos2)
        local mouse_pos = define.common["get_mouse_position"]()
        return mouse_pos[1] >= pos1[1] and mouse_pos[1] <= pos2[1] and mouse_pos[2] >= pos1[2] and mouse_pos[2] <= pos2[2]
    end,
}
draggables.create = function(x, y, w, h, id, only_y)
    only_y = only_y or false
    if not draggables.data[id] then
        draggables.data[id] = {}
        draggables.data[id].position = {0, 0}
        draggables.data[id].state = false
    end

    if draggables.in_bounds({x:GetValue(), y:GetValue()}, {x:GetValue() + w, y:GetValue() + h}) and draggables.in_bounds({0, 0}, define.screen) then
        if input.IsButtonDown(1) and draggables.data[id].state == false and (draggables.current == nil or draggables.current == id) then
            draggables.data[id].state = true
            draggables.current = id
            draggables.data[id].position = {x:GetValue() - define.common["get_mouse_position"]()[1], y:GetValue() - define.common["get_mouse_position"]()[2]}
        end
    end

    if not draggables.in_bounds({0, 0}, define.screen) then
        draggables.data[id].state = false
    end

    if not input.IsButtonDown(1) then
        draggables.data[id].state = false
        draggables.current = nil
    end

    if draggables.data[id].state == true and define.common["menu_state"]() then
        if only_y then
            y:SetValue(define.common["get_mouse_position"]()[2] + draggables.data[id].position[2])
        else
            x:SetValue(define.common["get_mouse_position"]()[1] + draggables.data[id].position[1])
            y:SetValue(define.common["get_mouse_position"]()[2] + draggables.data[id].position[2])
        end
    end
end

local solus_tab = gui.Tab(gui.Reference("MISC"), "solus_tab", "Solus Renewed") -- ;D
local group = {
    watermark = gui.Groupbox(solus_tab, "Watermark", 16, 16, 296),
    keybinds = gui.Groupbox(solus_tab, "Keybinds", 328, 16, 296),
    spectators = gui.Groupbox(solus_tab, "Spectators", 328, 116, 296),
}
local water_bool = gui.Checkbox(group.watermark, "water_enable", "Enabled", false);
local accent = gui.ColorPicker(group.watermark, "accent_color", "Accent", 100, 120, 255, 255)
local style = gui.Combobox(group.watermark, "solus_style", "Style", "Metamod", "Rounded", "Rounded Corners")
local key_bool = gui.Checkbox(group.keybinds, "key_enable", "Enabled", false);
local spec_bool = gui.Checkbox(group.spectators, "spec_enable", "Enabled", false);
local drag = {
    key_x = gui.Slider(group.keybinds, "key_x", "Keybinds X", 300, 0, define.screen[1], 1), spec_x = gui.Slider(group.keybinds, "spec_x", "Spectators X", 300, 0, define.screen[1], 1),
    key_y = gui.Slider(group.keybinds, "key_y", "Keybinds Y", 300, 0, define.screen[2], 1), spec_y = gui.Slider(group.keybinds, "spec_y", "Spectators Y", 400, 0, define.screen[2], 1),
}
for _,item in pairs(drag) do item:SetInvisible(true) end

local draw_watermark = function()
    if not water_bool:GetValue() then
        return end
       
    local time = define.common["get_time"]()
    if time.hour < 10 then time.hour = "0"..time.hour end; if time.minute < 10 then time.minute = "0"..time.minute end
   
    local x, y = define.screen[1] - 8, 10
    local color = {accent:GetValue()}
    local label = "bluesky | "..define.common["get_username"]().." | "..time.hour..":"..time.minute
   
    local localPlayer = entities.GetLocalPlayer()
    if localPlayer then
        local resource = entities.GetPlayerResources()
        local latency = resource:GetPropInt("m_iPing", localPlayer:GetIndex())
        label = "bluesky | "..define.common["get_username"]().." | "..latency.."ms | "..time.hour..":"..time.minute
    end
   
    draw.SetFont(define.fonts.verdana); local text_size = {draw.GetTextSize(label)}
    if style:GetValue() == 0 then
        draw.Color(0, 0, 0, color[4]); draw.FilledRect(x - text_size[1] - 10, y, x, y + 18)
        draw.Color(color[1], color[2], color[3], 255); draw.FilledRect(x - text_size[1] - 10, y - 2, x, y)
    elseif style:GetValue() == 1 then
        draw.Color(0, 0, 0, color[4]); draw.RoundedRectFill(x - text_size[1] - 10, y, x, y + 18, 5)
        draw.Color(color[1], color[2], color[3], 255); draw.RoundedRect(x - text_size[1] - 10, y, x, y + 18, 5)
    elseif style:GetValue() == 2 then
        draw.Color(0, 0, 0, color[4]); draw.RoundedRectFill(x - text_size[1] - 10, y, x, y + 18, 5, 0, 5, 5, 0)
        draw.Color(color[1], color[2], color[3], 255); draw.RoundedRect(x - text_size[1] - 10, y, x, y + 18, 5, 0, 5, 5, 0)
    end
    draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255); draw.TextShadow(x - text_size[1] - 5, y + 5, label)
end
callbacks.Register("Draw", "draw_watermark", draw_watermark)

local draw_keybinds = function()
    if not key_bool:GetValue() then
        return end
       
    local x, y = drag.key_x:GetValue(), drag.key_y:GetValue()
    local color = {accent:GetValue()}
    local state = false
    local alpha = 0
    local binds = {
        {name = "Ping Spike", active = gui.GetValue(define.references.pingspike), mode = 1},
        {name = "Double Tap", active = gui.GetValue(define.references.dt), mode = 1},
        {name = "Triggerbot", active = gui.GetValue(define.references.trigger), mode = 2},
        {name = "Custom Walk", active = gui.GetValue(define.references.customwalk), mode = 2},
        {name = "Knifebot", active = gui.GetValue(define.references.knifebot), mode = 1},
        {name = "Slow Walk", active = gui.GetValue(define.references.slowwalk) ~= 0 and input.IsButtonDown(gui.GetValue(define.references.slowwalk)), mode = 2},
        {name = "Fake Duck", active = gui.GetValue(define.references.fd) ~= 0 and input.IsButtonDown(gui.GetValue(define.references.fd)), mode = 2},
        {name = "Edge Jump", active = gui.GetValue(define.references.ej) ~= 0 and input.IsButtonDown(gui.GetValue(define.references.ej)), mode = 2},
        {name = "Jump Bug", active = gui.GetValue(define.references.jb) ~= 0 and input.IsButtonDown(gui.GetValue(define.references.jb)), mode = 2},
    }
    if gui.GetValue(define.references.peektype) == 0 then
        table.insert(binds, {name = "Auto Peek", active = gui.GetValue(define.references.autopeek) and gui.GetValue(define.references.peekkey) ~= 0 and input.IsButtonDown(gui.GetValue(define.references.peekkey)), mode = 2})
    else
        table.insert(binds, {name = "Auto Peek", active = gui.GetValue(define.references.autopeek) and gui.GetValue(define.references.peekkey) ~= 0, mode = 1})
    end
   
    local offset = 28
    local y_add = 0
   
    for i=1, #binds do local text_size = {draw.GetTextSize(binds[i].name)}
        if binds[i].active then state = true; offset = offset < (text_size[1] - 40) and (text_size[1] - 40) or offset end
    end
    alpha = animatables.create(9, not (state or define.common["menu_state"]()), "k_alpha")

    local w = 90 + offset
    if alpha > 0 then
        tween_table.k_width = tween.new(0.25, tween_data, {k_width = w}, 'outCubic'); w = tween_data.k_width
       
        draw.SetFont(define.fonts.verdana); local text_size = {draw.GetTextSize("keybinds")}
        if style:GetValue() == 0 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.FilledRect(x, y, x + w, y + 18)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.FilledRect(x, y - 2, x + w, y)
        elseif style:GetValue() == 1 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.RoundedRectFill(x, y, x + w, y + 18, 5)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.RoundedRect(x, y, x + w, y + 18, 5)
        elseif style:GetValue() == 2 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.RoundedRectFill(x, y, x + w, y + 18, 5, 0, 5, 5, 0)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.RoundedRect(x, y, x + w, y + 18, 5, 0, 5, 5, 0)
        end
        draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255 * alpha); draw.TextShadow(x + w/2 - text_size[1]/2, y + 5, "keybinds")
       
        for i=1, #binds do
            local alpha = animatables.create(9, not binds[i].active, "k_"..binds[i].name)
           
            local values = {"[toggled]", "[holding]"}
            draw.SetFont(define.fonts.verdana); local text_size = {draw.GetTextSize(values[binds[i].mode])}
           
            draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255 * alpha); draw.TextShadow(x + 2, y + 23 + y_add, binds[i].name)
            draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255 * alpha); draw.TextShadow(x + w - text_size[1] - 2, y + 23 + y_add, values[binds[i].mode])
            y_add = y_add + 15 * alpha
        end
    end
   
    draggables.create(drag.key_x, drag.key_y, w, 18, "keybinds")
end
callbacks.Register("Draw", "draw_keybinds", draw_keybinds)

local draw_spectators = function()
    if not spec_bool:GetValue() then
        return end
   
    local x, y = drag.spec_x:GetValue(), drag.spec_y:GetValue()
    local color = {accent:GetValue()}
    local state = false
    local alpha = 0
    local spectators = define.common["get_spectating"]()
   
    local offset = 28
    local y_add = 0
   
    for i=1, #spectators do
        local name = string.len(spectators[i].name) > 17 and string.sub(spectators[i].name, 0, 17).."..." or spectators[i].name
        local text_size = {draw.GetTextSize(spectators[i].name)}
        if spectators[i].active then state = true; offset = offset < (text_size[1] - 40) and (text_size[1] - 40) or offset end
    end
    alpha = animatables.create(9, not (state or define.common["menu_state"]()), "s_alpha")
   
    local w = 90 + offset
    if alpha > 0 then
        tween_table.s_width = tween.new(0.25, tween_data, {s_width = w}, 'outCubic'); w = tween_data.s_width
       
        draw.SetFont(define.fonts.verdana); local text_size = {draw.GetTextSize("spectators")}
        if style:GetValue() == 0 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.FilledRect(x, y, x + w, y + 18)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.FilledRect(x, y - 2, x + w, y)
        elseif style:GetValue() == 1 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.RoundedRectFill(x, y, x + w, y + 18, 5)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.RoundedRect(x, y, x + w, y + 18, 5)
        elseif style:GetValue() == 2 then
            draw.Color(0, 0, 0, color[4] * alpha); draw.RoundedRectFill(x, y, x + w, y + 18, 5, 0, 5, 5, 0)
            draw.Color(color[1], color[2], color[3], 255 * alpha); draw.RoundedRect(x, y, x + w, y + 18, 5, 0, 5, 5, 0)
        end
        draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255 * alpha); draw.TextShadow(x + w/2 - text_size[1]/2, y + 5, "spectators")
       
        for i=1, #spectators do
            local alpha = animatables.create(9, not spectators[i].active, "s_"..spectators[i].name)
           
            if alpha > 0 then
                local name = string.len(spectators[i].name) > 17 and string.sub(spectators[i].name, 0, 17).."..." or spectators[i].name
                draw.SetFont(define.fonts.verdana); draw.Color(255, 255, 255, 255 * alpha); draw.TextShadow(x + 2, y + 23 + y_add, name)
                y_add = y_add + 15 * alpha
            end
        end
    end
   
    draggables.create(drag.spec_x, drag.spec_y, w, 18, "spectators")
end
callbacks.Register("Draw", "draw_spectators", draw_spectators)
бля вот где ты был 2 года назад....
 
Сверху Снизу