JS hotkeys and speck list ( avatars) ot4

Статус
В этой теме нельзя размещать новые ответы.
  • 431
  • 94
Код:
UI.AddSubTab(["Visuals", "SUBTAB_MGR"], "Hotkeys + Spec")
const x1 = UI.AddSliderInt(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Hotkeys x", 0, Global.GetScreenSize()[0]);
const y1 = UI.AddSliderInt(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Hotkeys y", 0, Global.GetScreenSize()[1]);
const window_x = UI.AddSliderInt(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Spec x", 0, Global.GetScreenSize()[0])
const window_y = UI.AddSliderInt(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Spec y", 0, Global.GetScreenSize()[1])
UI.AddColorPicker(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Hotkeys");
UI.AddCheckbox(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"], "Hotkeys Gradient");
UI.AddColorPicker(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Spec");
UI.AddCheckbox(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"], "Spec Gradient");

var colorhotkeys = UI.GetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys"]);
var colorspec = UI.GetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec"]);
if (colorhotkeys[3] == 0) {
    UI.SetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec","SHEET_MGR", "Hotkeys + Spec","Hotkeys"], [96, 255, 193, 3]);
}
if (colorspec[3] == 0) {
    UI.SetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec","SHEET_MGR", "Hotkeys + Spec","Spec"], [96, 255, 193, 3]);
}
var alpha = 0;
var salpha = 0;
var maxwidth = 0;
var swalpha = 0;
var fdalpha = 0;
var apalpha = 0;
var aialpha = 0;
var spalpha = 0;
var fbalpha = 0;
var dtalpha = 0;
var hsalpha = 0;
var doalpha = 0;
var username = Cheat.GetUsername();
var textalpha = 0;
var h = new Array();

function in_bounds(vec, x, y, x2, y2) {
    return (vec[0] > x) && (vec[1] > y) && (vec[0] < x2) && (vec[1] < y2)
}

function HSVtoRGB(h, s, v) {
    var r, g, b, i, f, p, q, t;
    if (arguments.length === 1) {
        s = h.s, v = h.v, h = h.h;
    }
    i = Math.floor(h * 6);
    f = h * 6 - i;
    p = v * (1 - s);
    q = v * (1 - f * s);
    t = v * (1 - (1 - f) * s);
    switch (i % 6) {
        case 0: r = v, g = t, b = p; break;
        case 1: r = q, g = v, b = p; break;
        case 2: r = p, g = v, b = t; break;
        case 3: r = p, g = q, b = v; break;
        case 4: r = t, g = p, b = v; break;
        case 5: r = v, g = p, b = q; break;
    }
    return {
        r: Math.round(r * 255),
        g: Math.round(g * 255),
        b: Math.round(b * 255)
    };
}

function get_spectators()
{
    var specs = [];
    const players = Entity.GetPlayers();

    for (i = 0; i < players.length; i++)
    {
        const cur = players[i];

        if (Entity.GetProp(cur, "CBasePlayer", "m_hObserverTarget") != "m_hObserverTarget") {
            const obs = Entity.GetProp(cur, "CBasePlayer", "m_hObserverTarget")

            if (obs === Entity.GetLocalPlayer())
            {
                const name = Entity.GetName(cur);
                specs.push(name);
            }
        }
    }

    return specs;
}

function main_spec() {
        if (!World.GetServerString()) return;
        const x = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec x"]),
            y = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec y"]);
        const text = get_spectators();
        colorspec = UI.GetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec"]);
        var font = Render.GetFont("Verdana.ttf", 9, true);
        var frames = 8 * Globals.Frametime();
        var width2 = 84;
        var maxwidth2 = 0;
        var Gradient = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec", "Spec Gradient"]);
        var rgb = HSVtoRGB(Global.Tickcount() % 350 / 350,1,1);
      
        if (text.length > 0) {
            salpha = Math.min(salpha + frames, 1);
        } else {
            salpha = salpha - frames;
            if (salpha < 0) salpha = 0;
        }
      
        for (i = 0; i < text.length; i++) {
            if (Render.TextSize(text[i], font)[0] > maxwidth2) {
                maxwidth2 = Render.TextSize(text[i], font)[0];
            }
        }
        if (maxwidth2 == 0) maxwidth2 = 50;
        width2 = width2 + maxwidth2;
      
        if(Gradient){
            Render.GradientRect(x, y + 3, width2 , 2, 1 , [rgb.r,rgb.g,rgb.b,salpha * 255] , [rgb.g,rgb.b,rgb.r,salpha * 255]);
        }else{
            Render.FilledRect(x, y + 3, width2 , 2, [colorspec[0], colorspec[1], colorspec[2], salpha * 255]);
        }
            Render.FilledRect(x, y + 5, width2, 18, [17, 17, 17, salpha * 255]);
            Render.String(x + width2 / 2 - (Render.TextSize("spectators", font)[0] / 2) + 2, y + 9, 0, "spectators", [0, 0, 0, salpha * 255 / 1.3], font);
            Render.String(x + width2 / 2 - (Render.TextSize("spectators", font)[0] / 2) + 1, y + 8, 0, "spectators", [255, 255, 255, salpha * 255], font);
        for (i = 0; i < text.length; i++)
        {
        Render.FilledRect(x + 72 + width2  - (Render.TextSize(toString(text), font)[0] ), y + 24 + 15 * i, 12,12, [20, 20, 20, 255]);
        Render.String(x + 77 + width2  - (Render.TextSize(toString(text), font)[0] ), y + 24 + 15 * i, 1, "?", [255, 255, 255, 255 / 1.3], font);
        Render.String(x + (Render.TextSize((text[i]), font)[0] /2 ) , y + 24 + 15 * i, 1, text[i], [0, 0, 0, 255 / 1.3], font);
        Render.String(x + (Render.TextSize((text[i]), font)[0] /2 ), y + 24 + 15 * i, 1, text[i], [255, 255, 255, 255], font);
        }

              
      
        if (Global.IsKeyPressed(1) && UI.IsMenuOpen()) {
            const mouse_pos = Global.GetCursorPosition();
            if (in_bounds(mouse_pos, x, y, x + width2, y + 30)) {
                UI.SetValue(["Visuals", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec x"], mouse_pos[0] - width2 / 2);
                UI.SetValue(["Visuals", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec y"], mouse_pos[1] - 20);
            }
        }
}


function main_hotkeys() {
        if (!World.GetServerString()) return;
        const x = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys x"]),
            y = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys y"]);
        colorhotkeys = UI.GetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys"]);
        var font = Render.GetFont("Verdana.ttf", 9, true);
        var frames = 8 * Globals.Frametime();
        var width = 75;
        var maxwidth = 0;
        var Gradient = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec", "Hotkeys Gradient"]);
        var rgb = HSVtoRGB(Global.Tickcount() % 350 / 350,1,1);
        if (UI.GetValue(["Rage", "Anti Aim", "General", "Key assignment", "Slow walk"])) {
            swalpha = Math.min(swalpha + frames, 1);
        } else {
            swalpha = swalpha - frames;
            if (swalpha < 0) swalpha = 0;
            if (swalpha == 0) {
                h.splice(h.indexOf("Slow walk"));
            }
        }

        if (UI.GetValue(["Rage", "Anti Aim", "General", "Key assignment", "Fake duck"])) {
            fdalpha = Math.min(fdalpha + frames, 1);
        } else {
            fdalpha = fdalpha - frames;
            if (fdalpha < 0) fdalpha = 0;
            if (fdalpha == 0) {
                h.splice(h.indexOf("Duck peek assist"));
            }
        }

        if (UI.GetValue(["Misc.", "Keys", "Auto peek"])) {
            apalpha = Math.min(apalpha + frames, 1);
        } else {
            apalpha = apalpha - frames;
            if (apalpha < 0) apalpha = 0;
            if (apalpha == 0) {
                h.splice(h.indexOf("Auto peek"));
            }
        }

        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Invert Custom AA"])) {
            aialpha = Math.min(aialpha + frames, 1);
        } else {
            aialpha = aialpha - frames;
            if (aialpha < 0) aialpha = 0;
            if (aialpha == 0) {
                h.splice(h.indexOf("Anti-aim inverter"));
            }
        }

        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Force safe point"])) {
            spalpha = Math.min(spalpha + frames, 1);
        } else {
            spalpha = spalpha - frames;
            if (spalpha < 0) spalpha = 0;
            if (spalpha == 0) {
                h.splice(h.indexOf("Safe point override"));
            }
        }

        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Force body aim"])) {
            fbalpha = Math.min(fbalpha + frames, 1);
        } else {
            fbalpha = fbalpha - frames;
            if (fbalpha < 0) fbalpha = 0;
            if (fbalpha == 0) {
                h.splice(h.indexOf("Force body aim"));
            }
        }

        if (UI.GetValue(["Rage", "Exploits", "Keys", "Double tap"])) {
            dtalpha = Math.min(dtalpha + frames, 1);
        } else {
            dtalpha = dtalpha - frames;
            if (dtalpha < 0) dtalpha = 0;
            if (dtalpha == 0) {
                h.splice(h.indexOf("Double tap"));
            }
        }

        if (UI.GetValue(["Rage", "Exploits", "Keys", "Hide shots"])) {
            hsalpha = Math.min(hsalpha + frames, 1);
        } else {
            hsalpha = hsalpha - frames;
            if (hsalpha < 0) hsalpha = 0;
            if (hsalpha == 0) {
                h.splice(h.indexOf("On shot anti-aim"));
            }
        }
        if (UI.GetValue(["Rage", "General", "General", "Key assignment","Minimum damage override"])) {
            doalpha = Math.min(doalpha + frames, 1);
        } else {
           doalpha = doalpha - frames;
            if (doalpha < 0) doalpha = 0;
            if (doalpha == 0) {
                h.splice(h.indexOf("Minimum damage override"));
            }
        }

        if (UI.GetValue(["Rage", "Anti Aim", "General", "Key assignment", "Slow walk"])) {
            if (h.indexOf("Slow walk") == -1)
                h.push("Slow walk")
        }

        if (UI.GetValue(["Rage", "Anti Aim", "General", "Key assignment", "Fake duck"])) {
            if (h.indexOf("Duck peek assist") == -1)
                h.push("Duck peek assist")
        }
        if (UI.GetValue(["Misc.", "Keys", "Auto peek"])) {
            if (h.indexOf("Auto peek") == -1)
                h.push("Auto peek")
        }
        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Invert Custom AA"])) {
            if (h.indexOf("Anti-aim inverter") == -1)
                h.push("Anti-aim inverter")
        }
        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Force safe point"])) {
            if (h.indexOf("Safe point override") == -1)
                h.push("Safe point override")
        }
        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Force body aim"])) {
            if (h.indexOf("Force body aim") == -1)
                h.push("Force body aim")
        }
        if (UI.GetValue(["Rage", "Exploits", "Keys", "Double tap"])) {
            if (h.indexOf("Double tap") == -1)
                h.push("Double tap")
        }
        if (UI.GetValue(["Rage", "Exploits", "Keys", "Hide shots"])) {
            if (h.indexOf("On shot anti-aim") == -1)
                h.push("On shot anti-aim")
        }
        if (UI.GetValue(["Rage", "General", "General", "Key assignment","Minimum damage override"])) {
            if (h.indexOf("Minimum damage override") == -1)
                h.push("Minimum damage override")
        }
      

        if (h.length > 0) {
            alpha = Math.min(alpha + frames, 1);
        } else {
            alpha = alpha - frames;
            if (alpha < 0) alpha = 0;
        }
        for (i = 0; i < h.length; i++) {
            if (Render.TextSize(h[i], font)[0] > maxwidth) {
                maxwidth = Render.TextSize(h[i], font)[0];
            }
        }
        if (maxwidth == 0) maxwidth = 50;
        width = width + maxwidth;
        if (alpha > 0) {
            if(Gradient){
                Render.GradientRect(x, y + 3, width, 2, 1 , [rgb.r,rgb.g,rgb.b,alpha * 255] , [rgb.g,rgb.b,rgb.r,alpha * 255]);
            }else{
                Render.FilledRect(x, y + 3, width, 2, [colorhotkeys[0], colorhotkeys[1], colorhotkeys[2], alpha * 255]);
            }
                Render.FilledRect(x, y + 5, width, 18, [17, 17, 17, alpha * 255]);
                Render.String(x + width / 2 - (Render.TextSize("keybinds", font)[0] / 2) + 2, y + 9, 0, "keybinds", [0, 0, 0, alpha * 255 / 1.3], font);
                Render.String(x + width / 2 - (Render.TextSize("keybinds", font)[0] / 2) + 1, y + 8, 0, "keybinds", [255, 255, 255, alpha * 255], font);
                for (i = 0; i < h.length; i++) {
                    switch (h[i]) {
                        case 'Slow walk':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(swalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, swalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, swalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [0, 0, 0, swalpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [255, 255, 255, swalpha * 255], font);
                            break;
                        case 'Duck peek assist':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(fdalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, fdalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, fdalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [0, 0, 0, fdalpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [255, 255, 255, fdalpha * 255], font);
                            break;
                        case 'Auto peek':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(apalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, apalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, apalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [0, 0, 0, apalpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [255, 255, 255, apalpha * 255], font);
                            break;
                        case 'Anti-aim inverter':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(aialpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, aialpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, aialpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [0, 0, 0, aialpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [255, 255, 255, aialpha * 255], font);
                            break;
                        case 'Safe point override':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(spalpha * 0 , colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, spalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, spalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [0, 0, 0, spalpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [255, 255, 255, spalpha * 255], font);
                            break;
                        case 'Force body aim':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(fbalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, fbalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, fbalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [0, 0, 0, fbalpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [255, 255, 255, fbalpha * 255], font);
                            break;
                        case 'Double tap':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(dtalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, dtalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, dtalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [0, 0, 0, dtalpha * 255 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [255, 255, 255, dtalpha * 255], font);
                            break;
                        case 'On shot anti-aim':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(hsalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, hsalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, hsalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [0, 0, 0, hsalpha * 255 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [255, 255, 255, hsalpha * 255], font);
                            break;
                        case 'Minimum damage override':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(doalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, doalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, doalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [0, 0, 0, doalpha * 255 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [255, 255, 255, doalpha * 255], font);
                            break;
                    }

                }
        }
        if (Global.IsKeyPressed(0x01) && UI.IsMenuOpen()) {
            const mouse_pos = Global.GetCursorPosition();
            if (in_bounds(mouse_pos, x, y, x + width, y + 30)) {
                UI.SetValue(["Visuals", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys x"], mouse_pos[0] - width / 2);
                UI.SetValue(["Visuals", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys y"], mouse_pos[1] - 20);
            }
        }
}

Global.RegisterCallback("Draw", "main_spec")
Global.RegisterCallback("Draw", "main_hotkeys")
Заебали мои js постить ,и не указывать автора.
 
  • 30
  • 11
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
на кряк организуй xd
 
  • 160
  • 6
Код:
UI.AddSubTab(["Visuals", "SUBTAB_MGR"], "Hotkeys + Spec")
const x1 = UI.AddSliderInt(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Hotkeys x", 0, Global.GetScreenSize()[0]);
const y1 = UI.AddSliderInt(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Hotkeys y", 0, Global.GetScreenSize()[1]);
const window_x = UI.AddSliderInt(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Spec x", 0, Global.GetScreenSize()[0])
const window_y = UI.AddSliderInt(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Spec y", 0, Global.GetScreenSize()[1])
UI.AddColorPicker(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Hotkeys");
UI.AddCheckbox(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"], "Hotkeys Gradient");
UI.AddColorPicker(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Spec");
UI.AddCheckbox(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"], "Spec Gradient");

var colorhotkeys = UI.GetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys"]);
var colorspec = UI.GetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec"]);
if (colorhotkeys[3] == 0) {
    UI.SetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec","SHEET_MGR", "Hotkeys + Spec","Hotkeys"], [96, 255, 193, 3]);
}
if (colorspec[3] == 0) {
    UI.SetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec","SHEET_MGR", "Hotkeys + Spec","Spec"], [96, 255, 193, 3]);
}
var alpha = 0;
var salpha = 0;
var maxwidth = 0;
var swalpha = 0;
var fdalpha = 0;
var apalpha = 0;
var aialpha = 0;
var spalpha = 0;
var fbalpha = 0;
var dtalpha = 0;
var hsalpha = 0;
var doalpha = 0;
var username = Cheat.GetUsername();
var textalpha = 0;
var h = new Array();

function in_bounds(vec, x, y, x2, y2) {
    return (vec[0] > x) && (vec[1] > y) && (vec[0] < x2) && (vec[1] < y2)
}

function HSVtoRGB(h, s, v) {
    var r, g, b, i, f, p, q, t;
    if (arguments.length === 1) {
        s = h.s, v = h.v, h = h.h;
    }
    i = Math.floor(h * 6);
    f = h * 6 - i;
    p = v * (1 - s);
    q = v * (1 - f * s);
    t = v * (1 - (1 - f) * s);
    switch (i % 6) {
        case 0: r = v, g = t, b = p; break;
        case 1: r = q, g = v, b = p; break;
        case 2: r = p, g = v, b = t; break;
        case 3: r = p, g = q, b = v; break;
        case 4: r = t, g = p, b = v; break;
        case 5: r = v, g = p, b = q; break;
    }
    return {
        r: Math.round(r * 255),
        g: Math.round(g * 255),
        b: Math.round(b * 255)
    };
}

function get_spectators()
{
    var specs = [];
    const players = Entity.GetPlayers();

    for (i = 0; i < players.length; i++)
    {
        const cur = players[i];

        if (Entity.GetProp(cur, "CBasePlayer", "m_hObserverTarget") != "m_hObserverTarget") {
            const obs = Entity.GetProp(cur, "CBasePlayer", "m_hObserverTarget")

            if (obs === Entity.GetLocalPlayer())
            {
                const name = Entity.GetName(cur);
                specs.push(name);
            }
        }
    }

    return specs;
}

function main_spec() {
        if (!World.GetServerString()) return;
        const x = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec x"]),
            y = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec y"]);
        const text = get_spectators();
        colorspec = UI.GetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec"]);
        var font = Render.GetFont("Verdana.ttf", 9, true);
        var frames = 8 * Globals.Frametime();
        var width2 = 84;
        var maxwidth2 = 0;
        var Gradient = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec", "Spec Gradient"]);
        var rgb = HSVtoRGB(Global.Tickcount() % 350 / 350,1,1);
     
        if (text.length > 0) {
            salpha = Math.min(salpha + frames, 1);
        } else {
            salpha = salpha - frames;
            if (salpha < 0) salpha = 0;
        }
     
        for (i = 0; i < text.length; i++) {
            if (Render.TextSize(text[i], font)[0] > maxwidth2) {
                maxwidth2 = Render.TextSize(text[i], font)[0];
            }
        }
        if (maxwidth2 == 0) maxwidth2 = 50;
        width2 = width2 + maxwidth2;
     
        if(Gradient){
            Render.GradientRect(x, y + 3, width2 , 2, 1 , [rgb.r,rgb.g,rgb.b,salpha * 255] , [rgb.g,rgb.b,rgb.r,salpha * 255]);
        }else{
            Render.FilledRect(x, y + 3, width2 , 2, [colorspec[0], colorspec[1], colorspec[2], salpha * 255]);
        }
            Render.FilledRect(x, y + 5, width2, 18, [17, 17, 17, salpha * 255]);
            Render.String(x + width2 / 2 - (Render.TextSize("spectators", font)[0] / 2) + 2, y + 9, 0, "spectators", [0, 0, 0, salpha * 255 / 1.3], font);
            Render.String(x + width2 / 2 - (Render.TextSize("spectators", font)[0] / 2) + 1, y + 8, 0, "spectators", [255, 255, 255, salpha * 255], font);
        for (i = 0; i < text.length; i++)
        {
        Render.FilledRect(x + 72 + width2  - (Render.TextSize(toString(text), font)[0] ), y + 24 + 15 * i, 12,12, [20, 20, 20, 255]);
        Render.String(x + 77 + width2  - (Render.TextSize(toString(text), font)[0] ), y + 24 + 15 * i, 1, "?", [255, 255, 255, 255 / 1.3], font);
        Render.String(x + (Render.TextSize((text[i]), font)[0] /2 ) , y + 24 + 15 * i, 1, text[i], [0, 0, 0, 255 / 1.3], font);
        Render.String(x + (Render.TextSize((text[i]), font)[0] /2 ), y + 24 + 15 * i, 1, text[i], [255, 255, 255, 255], font);
        }

             
     
        if (Global.IsKeyPressed(1) && UI.IsMenuOpen()) {
            const mouse_pos = Global.GetCursorPosition();
            if (in_bounds(mouse_pos, x, y, x + width2, y + 30)) {
                UI.SetValue(["Visuals", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec x"], mouse_pos[0] - width2 / 2);
                UI.SetValue(["Visuals", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec y"], mouse_pos[1] - 20);
            }
        }
}


function main_hotkeys() {
        if (!World.GetServerString()) return;
        const x = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys x"]),
            y = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys y"]);
        colorhotkeys = UI.GetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys"]);
        var font = Render.GetFont("Verdana.ttf", 9, true);
        var frames = 8 * Globals.Frametime();
        var width = 75;
        var maxwidth = 0;
        var Gradient = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec", "Hotkeys Gradient"]);
        var rgb = HSVtoRGB(Global.Tickcount() % 350 / 350,1,1);
        if (UI.GetValue(["Rage", "Anti Aim", "General", "Key assignment", "Slow walk"])) {
            swalpha = Math.min(swalpha + frames, 1);
        } else {
            swalpha = swalpha - frames;
            if (swalpha < 0) swalpha = 0;
            if (swalpha == 0) {
                h.splice(h.indexOf("Slow walk"));
            }
        }

        if (UI.GetValue(["Rage", "Anti Aim", "General", "Key assignment", "Fake duck"])) {
            fdalpha = Math.min(fdalpha + frames, 1);
        } else {
            fdalpha = fdalpha - frames;
            if (fdalpha < 0) fdalpha = 0;
            if (fdalpha == 0) {
                h.splice(h.indexOf("Duck peek assist"));
            }
        }

        if (UI.GetValue(["Misc.", "Keys", "Auto peek"])) {
            apalpha = Math.min(apalpha + frames, 1);
        } else {
            apalpha = apalpha - frames;
            if (apalpha < 0) apalpha = 0;
            if (apalpha == 0) {
                h.splice(h.indexOf("Auto peek"));
            }
        }

        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Invert Custom AA"])) {
            aialpha = Math.min(aialpha + frames, 1);
        } else {
            aialpha = aialpha - frames;
            if (aialpha < 0) aialpha = 0;
            if (aialpha == 0) {
                h.splice(h.indexOf("Anti-aim inverter"));
            }
        }

        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Force safe point"])) {
            spalpha = Math.min(spalpha + frames, 1);
        } else {
            spalpha = spalpha - frames;
            if (spalpha < 0) spalpha = 0;
            if (spalpha == 0) {
                h.splice(h.indexOf("Safe point override"));
            }
        }

        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Force body aim"])) {
            fbalpha = Math.min(fbalpha + frames, 1);
        } else {
            fbalpha = fbalpha - frames;
            if (fbalpha < 0) fbalpha = 0;
            if (fbalpha == 0) {
                h.splice(h.indexOf("Force body aim"));
            }
        }

        if (UI.GetValue(["Rage", "Exploits", "Keys", "Double tap"])) {
            dtalpha = Math.min(dtalpha + frames, 1);
        } else {
            dtalpha = dtalpha - frames;
            if (dtalpha < 0) dtalpha = 0;
            if (dtalpha == 0) {
                h.splice(h.indexOf("Double tap"));
            }
        }

        if (UI.GetValue(["Rage", "Exploits", "Keys", "Hide shots"])) {
            hsalpha = Math.min(hsalpha + frames, 1);
        } else {
            hsalpha = hsalpha - frames;
            if (hsalpha < 0) hsalpha = 0;
            if (hsalpha == 0) {
                h.splice(h.indexOf("On shot anti-aim"));
            }
        }
        if (UI.GetValue(["Rage", "General", "General", "Key assignment","Minimum damage override"])) {
            doalpha = Math.min(doalpha + frames, 1);
        } else {
           doalpha = doalpha - frames;
            if (doalpha < 0) doalpha = 0;
            if (doalpha == 0) {
                h.splice(h.indexOf("Minimum damage override"));
            }
        }

        if (UI.GetValue(["Rage", "Anti Aim", "General", "Key assignment", "Slow walk"])) {
            if (h.indexOf("Slow walk") == -1)
                h.push("Slow walk")
        }

        if (UI.GetValue(["Rage", "Anti Aim", "General", "Key assignment", "Fake duck"])) {
            if (h.indexOf("Duck peek assist") == -1)
                h.push("Duck peek assist")
        }
        if (UI.GetValue(["Misc.", "Keys", "Auto peek"])) {
            if (h.indexOf("Auto peek") == -1)
                h.push("Auto peek")
        }
        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Invert Custom AA"])) {
            if (h.indexOf("Anti-aim inverter") == -1)
                h.push("Anti-aim inverter")
        }
        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Force safe point"])) {
            if (h.indexOf("Safe point override") == -1)
                h.push("Safe point override")
        }
        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Force body aim"])) {
            if (h.indexOf("Force body aim") == -1)
                h.push("Force body aim")
        }
        if (UI.GetValue(["Rage", "Exploits", "Keys", "Double tap"])) {
            if (h.indexOf("Double tap") == -1)
                h.push("Double tap")
        }
        if (UI.GetValue(["Rage", "Exploits", "Keys", "Hide shots"])) {
            if (h.indexOf("On shot anti-aim") == -1)
                h.push("On shot anti-aim")
        }
        if (UI.GetValue(["Rage", "General", "General", "Key assignment","Minimum damage override"])) {
            if (h.indexOf("Minimum damage override") == -1)
                h.push("Minimum damage override")
        }
     

        if (h.length > 0) {
            alpha = Math.min(alpha + frames, 1);
        } else {
            alpha = alpha - frames;
            if (alpha < 0) alpha = 0;
        }
        for (i = 0; i < h.length; i++) {
            if (Render.TextSize(h[i], font)[0] > maxwidth) {
                maxwidth = Render.TextSize(h[i], font)[0];
            }
        }
        if (maxwidth == 0) maxwidth = 50;
        width = width + maxwidth;
        if (alpha > 0) {
            if(Gradient){
                Render.GradientRect(x, y + 3, width, 2, 1 , [rgb.r,rgb.g,rgb.b,alpha * 255] , [rgb.g,rgb.b,rgb.r,alpha * 255]);
            }else{
                Render.FilledRect(x, y + 3, width, 2, [colorhotkeys[0], colorhotkeys[1], colorhotkeys[2], alpha * 255]);
            }
                Render.FilledRect(x, y + 5, width, 18, [17, 17, 17, alpha * 255]);
                Render.String(x + width / 2 - (Render.TextSize("keybinds", font)[0] / 2) + 2, y + 9, 0, "keybinds", [0, 0, 0, alpha * 255 / 1.3], font);
                Render.String(x + width / 2 - (Render.TextSize("keybinds", font)[0] / 2) + 1, y + 8, 0, "keybinds", [255, 255, 255, alpha * 255], font);
                for (i = 0; i < h.length; i++) {
                    switch (h[i]) {
                        case 'Slow walk':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(swalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, swalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, swalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [0, 0, 0, swalpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [255, 255, 255, swalpha * 255], font);
                            break;
                        case 'Duck peek assist':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(fdalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, fdalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, fdalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [0, 0, 0, fdalpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [255, 255, 255, fdalpha * 255], font);
                            break;
                        case 'Auto peek':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(apalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, apalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, apalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [0, 0, 0, apalpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [255, 255, 255, apalpha * 255], font);
                            break;
                        case 'Anti-aim inverter':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(aialpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, aialpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, aialpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [0, 0, 0, aialpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [255, 255, 255, aialpha * 255], font);
                            break;
                        case 'Safe point override':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(spalpha * 0 , colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, spalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, spalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [0, 0, 0, spalpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [255, 255, 255, spalpha * 255], font);
                            break;
                        case 'Force body aim':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(fbalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, fbalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, fbalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [0, 0, 0, fbalpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [255, 255, 255, fbalpha * 255], font);
                            break;
                        case 'Double tap':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(dtalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, dtalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, dtalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [0, 0, 0, dtalpha * 255 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [255, 255, 255, dtalpha * 255], font);
                            break;
                        case 'On shot anti-aim':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(hsalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, hsalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, hsalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [0, 0, 0, hsalpha * 255 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [255, 255, 255, hsalpha * 255], font);
                            break;
                        case 'Minimum damage override':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(doalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, doalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, doalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [0, 0, 0, doalpha * 255 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [255, 255, 255, doalpha * 255], font);
                            break;
                    }

                }
        }
        if (Global.IsKeyPressed(0x01) && UI.IsMenuOpen()) {
            const mouse_pos = Global.GetCursorPosition();
            if (in_bounds(mouse_pos, x, y, x + width, y + 30)) {
                UI.SetValue(["Visuals", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys x"], mouse_pos[0] - width / 2);
                UI.SetValue(["Visuals", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys y"], mouse_pos[1] - 20);
            }
        }
}

Global.RegisterCallback("Draw", "main_spec")
Global.RegisterCallback("Draw", "main_hotkeys")
Заебали мои js постить ,и не указывать автора.
На в3 сделай еще хх
 
  • 445
  • 1
  • 90
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
UI.AddSubTab(["Visuals", "SUBTAB_MGR"], "Hotkeys + Spec")
const x1 = UI.AddSliderInt(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Hotkeys x", 0, Global.GetScreenSize()[0]);
const y1 = UI.AddSliderInt(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Hotkeys y", 0, Global.GetScreenSize()[1]);
const window_x = UI.AddSliderInt(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Spec x", 0, Global.GetScreenSize()[0])
const window_y = UI.AddSliderInt(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Spec y", 0, Global.GetScreenSize()[1])
UI.AddColorPicker(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Hotkeys");
UI.AddCheckbox(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"], "Hotkeys Gradient");
UI.AddColorPicker(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"],"Spec");
UI.AddCheckbox(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec"], "Spec Gradient");

var colorhotkeys = UI.GetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys"]);
var colorspec = UI.GetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec"]);
if (colorhotkeys[3] == 0) {
    UI.SetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec","SHEET_MGR", "Hotkeys + Spec","Hotkeys"], [96, 255, 193, 3]);
}
if (colorspec[3] == 0) {
    UI.SetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec","SHEET_MGR", "Hotkeys + Spec","Spec"], [96, 255, 193, 3]);
}
var alpha = 0;
var salpha = 0;
var maxwidth = 0;
var swalpha = 0;
var fdalpha = 0;
var apalpha = 0;
var aialpha = 0;
var spalpha = 0;
var fbalpha = 0;
var dtalpha = 0;
var hsalpha = 0;
var doalpha = 0;
var username = Cheat.GetUsername();
var textalpha = 0;
var h = new Array();

function in_bounds(vec, x, y, x2, y2) {
    return (vec[0] > x) && (vec[1] > y) && (vec[0] < x2) && (vec[1] < y2)
}

function HSVtoRGB(h, s, v) {
    var r, g, b, i, f, p, q, t;
    if (arguments.length === 1) {
        s = h.s, v = h.v, h = h.h;
    }
    i = Math.floor(h * 6);
    f = h * 6 - i;
    p = v * (1 - s);
    q = v * (1 - f * s);
    t = v * (1 - (1 - f) * s);
    switch (i % 6) {
        case 0: r = v, g = t, b = p; break;
        case 1: r = q, g = v, b = p; break;
        case 2: r = p, g = v, b = t; break;
        case 3: r = p, g = q, b = v; break;
        case 4: r = t, g = p, b = v; break;
        case 5: r = v, g = p, b = q; break;
    }
    return {
        r: Math.round(r * 255),
        g: Math.round(g * 255),
        b: Math.round(b * 255)
    };
}

function get_spectators()
{
    var specs = [];
    const players = Entity.GetPlayers();

    for (i = 0; i < players.length; i++)
    {
        const cur = players[i];

        if (Entity.GetProp(cur, "CBasePlayer", "m_hObserverTarget") != "m_hObserverTarget") {
            const obs = Entity.GetProp(cur, "CBasePlayer", "m_hObserverTarget")

            if (obs === Entity.GetLocalPlayer())
            {
                const name = Entity.GetName(cur);
                specs.push(name);
            }
        }
    }

    return specs;
}

function main_spec() {
        if (!World.GetServerString()) return;
        const x = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec x"]),
            y = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec y"]);
        const text = get_spectators();
        colorspec = UI.GetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec"]);
        var font = Render.GetFont("Verdana.ttf", 9, true);
        var frames = 8 * Globals.Frametime();
        var width2 = 84;
        var maxwidth2 = 0;
        var Gradient = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec", "Spec Gradient"]);
        var rgb = HSVtoRGB(Global.Tickcount() % 350 / 350,1,1);
     
        if (text.length > 0) {
            salpha = Math.min(salpha + frames, 1);
        } else {
            salpha = salpha - frames;
            if (salpha < 0) salpha = 0;
        }
     
        for (i = 0; i < text.length; i++) {
            if (Render.TextSize(text[i], font)[0] > maxwidth2) {
                maxwidth2 = Render.TextSize(text[i], font)[0];
            }
        }
        if (maxwidth2 == 0) maxwidth2 = 50;
        width2 = width2 + maxwidth2;
     
        if(Gradient){
            Render.GradientRect(x, y + 3, width2 , 2, 1 , [rgb.r,rgb.g,rgb.b,salpha * 255] , [rgb.g,rgb.b,rgb.r,salpha * 255]);
        }else{
            Render.FilledRect(x, y + 3, width2 , 2, [colorspec[0], colorspec[1], colorspec[2], salpha * 255]);
        }
            Render.FilledRect(x, y + 5, width2, 18, [17, 17, 17, salpha * 255]);
            Render.String(x + width2 / 2 - (Render.TextSize("spectators", font)[0] / 2) + 2, y + 9, 0, "spectators", [0, 0, 0, salpha * 255 / 1.3], font);
            Render.String(x + width2 / 2 - (Render.TextSize("spectators", font)[0] / 2) + 1, y + 8, 0, "spectators", [255, 255, 255, salpha * 255], font);
        for (i = 0; i < text.length; i++)
        {
        Render.FilledRect(x + 72 + width2  - (Render.TextSize(toString(text), font)[0] ), y + 24 + 15 * i, 12,12, [20, 20, 20, 255]);
        Render.String(x + 77 + width2  - (Render.TextSize(toString(text), font)[0] ), y + 24 + 15 * i, 1, "?", [255, 255, 255, 255 / 1.3], font);
        Render.String(x + (Render.TextSize((text[i]), font)[0] /2 ) , y + 24 + 15 * i, 1, text[i], [0, 0, 0, 255 / 1.3], font);
        Render.String(x + (Render.TextSize((text[i]), font)[0] /2 ), y + 24 + 15 * i, 1, text[i], [255, 255, 255, 255], font);
        }

             
     
        if (Global.IsKeyPressed(1) && UI.IsMenuOpen()) {
            const mouse_pos = Global.GetCursorPosition();
            if (in_bounds(mouse_pos, x, y, x + width2, y + 30)) {
                UI.SetValue(["Visuals", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec x"], mouse_pos[0] - width2 / 2);
                UI.SetValue(["Visuals", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Spec y"], mouse_pos[1] - 20);
            }
        }
}


function main_hotkeys() {
        if (!World.GetServerString()) return;
        const x = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys x"]),
            y = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys y"]);
        colorhotkeys = UI.GetColor(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys"]);
        var font = Render.GetFont("Verdana.ttf", 9, true);
        var frames = 8 * Globals.Frametime();
        var width = 75;
        var maxwidth = 0;
        var Gradient = UI.GetValue(["Visuals", "SUBTAB_MGR", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec", "Hotkeys Gradient"]);
        var rgb = HSVtoRGB(Global.Tickcount() % 350 / 350,1,1);
        if (UI.GetValue(["Rage", "Anti Aim", "General", "Key assignment", "Slow walk"])) {
            swalpha = Math.min(swalpha + frames, 1);
        } else {
            swalpha = swalpha - frames;
            if (swalpha < 0) swalpha = 0;
            if (swalpha == 0) {
                h.splice(h.indexOf("Slow walk"));
            }
        }

        if (UI.GetValue(["Rage", "Anti Aim", "General", "Key assignment", "Fake duck"])) {
            fdalpha = Math.min(fdalpha + frames, 1);
        } else {
            fdalpha = fdalpha - frames;
            if (fdalpha < 0) fdalpha = 0;
            if (fdalpha == 0) {
                h.splice(h.indexOf("Duck peek assist"));
            }
        }

        if (UI.GetValue(["Misc.", "Keys", "Auto peek"])) {
            apalpha = Math.min(apalpha + frames, 1);
        } else {
            apalpha = apalpha - frames;
            if (apalpha < 0) apalpha = 0;
            if (apalpha == 0) {
                h.splice(h.indexOf("Auto peek"));
            }
        }

        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Invert Custom AA"])) {
            aialpha = Math.min(aialpha + frames, 1);
        } else {
            aialpha = aialpha - frames;
            if (aialpha < 0) aialpha = 0;
            if (aialpha == 0) {
                h.splice(h.indexOf("Anti-aim inverter"));
            }
        }

        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Force safe point"])) {
            spalpha = Math.min(spalpha + frames, 1);
        } else {
            spalpha = spalpha - frames;
            if (spalpha < 0) spalpha = 0;
            if (spalpha == 0) {
                h.splice(h.indexOf("Safe point override"));
            }
        }

        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Force body aim"])) {
            fbalpha = Math.min(fbalpha + frames, 1);
        } else {
            fbalpha = fbalpha - frames;
            if (fbalpha < 0) fbalpha = 0;
            if (fbalpha == 0) {
                h.splice(h.indexOf("Force body aim"));
            }
        }

        if (UI.GetValue(["Rage", "Exploits", "Keys", "Double tap"])) {
            dtalpha = Math.min(dtalpha + frames, 1);
        } else {
            dtalpha = dtalpha - frames;
            if (dtalpha < 0) dtalpha = 0;
            if (dtalpha == 0) {
                h.splice(h.indexOf("Double tap"));
            }
        }

        if (UI.GetValue(["Rage", "Exploits", "Keys", "Hide shots"])) {
            hsalpha = Math.min(hsalpha + frames, 1);
        } else {
            hsalpha = hsalpha - frames;
            if (hsalpha < 0) hsalpha = 0;
            if (hsalpha == 0) {
                h.splice(h.indexOf("On shot anti-aim"));
            }
        }
        if (UI.GetValue(["Rage", "General", "General", "Key assignment","Minimum damage override"])) {
            doalpha = Math.min(doalpha + frames, 1);
        } else {
           doalpha = doalpha - frames;
            if (doalpha < 0) doalpha = 0;
            if (doalpha == 0) {
                h.splice(h.indexOf("Minimum damage override"));
            }
        }

        if (UI.GetValue(["Rage", "Anti Aim", "General", "Key assignment", "Slow walk"])) {
            if (h.indexOf("Slow walk") == -1)
                h.push("Slow walk")
        }

        if (UI.GetValue(["Rage", "Anti Aim", "General", "Key assignment", "Fake duck"])) {
            if (h.indexOf("Duck peek assist") == -1)
                h.push("Duck peek assist")
        }
        if (UI.GetValue(["Misc.", "Keys", "Auto peek"])) {
            if (h.indexOf("Auto peek") == -1)
                h.push("Auto peek")
        }
        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Invert Custom AA"])) {
            if (h.indexOf("Anti-aim inverter") == -1)
                h.push("Anti-aim inverter")
        }
        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Force safe point"])) {
            if (h.indexOf("Safe point override") == -1)
                h.push("Safe point override")
        }
        if (UI.GetValue(["Rage", "General", "General", "Key assignment", "Force body aim"])) {
            if (h.indexOf("Force body aim") == -1)
                h.push("Force body aim")
        }
        if (UI.GetValue(["Rage", "Exploits", "Keys", "Double tap"])) {
            if (h.indexOf("Double tap") == -1)
                h.push("Double tap")
        }
        if (UI.GetValue(["Rage", "Exploits", "Keys", "Hide shots"])) {
            if (h.indexOf("On shot anti-aim") == -1)
                h.push("On shot anti-aim")
        }
        if (UI.GetValue(["Rage", "General", "General", "Key assignment","Minimum damage override"])) {
            if (h.indexOf("Minimum damage override") == -1)
                h.push("Minimum damage override")
        }
     

        if (h.length > 0) {
            alpha = Math.min(alpha + frames, 1);
        } else {
            alpha = alpha - frames;
            if (alpha < 0) alpha = 0;
        }
        for (i = 0; i < h.length; i++) {
            if (Render.TextSize(h[i], font)[0] > maxwidth) {
                maxwidth = Render.TextSize(h[i], font)[0];
            }
        }
        if (maxwidth == 0) maxwidth = 50;
        width = width + maxwidth;
        if (alpha > 0) {
            if(Gradient){
                Render.GradientRect(x, y + 3, width, 2, 1 , [rgb.r,rgb.g,rgb.b,alpha * 255] , [rgb.g,rgb.b,rgb.r,alpha * 255]);
            }else{
                Render.FilledRect(x, y + 3, width, 2, [colorhotkeys[0], colorhotkeys[1], colorhotkeys[2], alpha * 255]);
            }
                Render.FilledRect(x, y + 5, width, 18, [17, 17, 17, alpha * 255]);
                Render.String(x + width / 2 - (Render.TextSize("keybinds", font)[0] / 2) + 2, y + 9, 0, "keybinds", [0, 0, 0, alpha * 255 / 1.3], font);
                Render.String(x + width / 2 - (Render.TextSize("keybinds", font)[0] / 2) + 1, y + 8, 0, "keybinds", [255, 255, 255, alpha * 255], font);
                for (i = 0; i < h.length; i++) {
                    switch (h[i]) {
                        case 'Slow walk':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(swalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, swalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, swalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [0, 0, 0, swalpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [255, 255, 255, swalpha * 255], font);
                            break;
                        case 'Duck peek assist':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(fdalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, fdalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, fdalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [0, 0, 0, fdalpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [255, 255, 255, fdalpha * 255], font);
                            break;
                        case 'Auto peek':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(apalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, apalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, apalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [0, 0, 0, apalpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [255, 255, 255, apalpha * 255], font);
                            break;
                        case 'Anti-aim inverter':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(aialpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, aialpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, aialpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [0, 0, 0, aialpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [255, 255, 255, aialpha * 255], font);
                            break;
                        case 'Safe point override':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(spalpha * 0 , colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, spalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, spalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [0, 0, 0, spalpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [255, 255, 255, spalpha * 255], font);
                            break;
                        case 'Force body aim':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(fbalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, fbalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, fbalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [0, 0, 0, fbalpha * 0 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[holding]", font)[0], y + 26 + 18 * i, 0, "[holding]", [255, 255, 255, fbalpha * 255], font);
                            break;
                        case 'Double tap':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(dtalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, dtalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, dtalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [0, 0, 0, dtalpha * 255 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [255, 255, 255, dtalpha * 255], font);
                            break;
                        case 'On shot anti-aim':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(hsalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, hsalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, hsalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [0, 0, 0, hsalpha * 255 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [255, 255, 255, hsalpha * 255], font);
                            break;
                        case 'Minimum damage override':
                            Render.FilledRect(x, y + 23 + 18 * i, width, 18, [17, 17, 17, Math.min(colorhotkeys[3], Math.min(doalpha * 0, colorhotkeys[3]))]);
                            Render.String(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, doalpha * 255 / 1.3], font);
                            Render.String(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, doalpha * 255], font);

                            Render.String(x - 3 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [0, 0, 0, doalpha * 255 / 1.3], font);
                            Render.String(x - 2 + width - Render.TextSize("[toggled]", font)[0], y + 26 + 18 * i, 0, "[toggled]", [255, 255, 255, doalpha * 255], font);
                            break;
                    }

                }
        }
        if (Global.IsKeyPressed(0x01) && UI.IsMenuOpen()) {
            const mouse_pos = Global.GetCursorPosition();
            if (in_bounds(mouse_pos, x, y, x + width, y + 30)) {
                UI.SetValue(["Visuals", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys x"], mouse_pos[0] - width / 2);
                UI.SetValue(["Visuals", "Hotkeys + Spec", "SHEET_MGR","Hotkeys + Spec","Hotkeys y"], mouse_pos[1] - 20);
            }
        }
}

Global.RegisterCallback("Draw", "main_spec")
Global.RegisterCallback("Draw", "main_hotkeys")
Заебали мои js постить ,и не указывать автора.
Но это лежит на форуме вантапа с февраля..
 
  • 431
  • 94
Но это лежит на форуме вантапа с февраля..
1625852255101.png
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу