

UI.AddMultiDropdown( "Indicators", [ "DT Indicator", "Hide Indicator", "FD Indicator", "BAIM Indicator", "Inverter Indicator" ] );
UI.AddSliderInt("Font Size", 10, 13);
UI.AddSliderInt("Boldness", 100, 1000);
UI.AddTextbox("Font");

function draw_circle(x, y, radius, thickness, color)
{
    var inner = radius - thickness;

    for(; radius > inner; --radius)
    {
        Render.Circle(x, y, radius, color);
    }
}

function render() {
    changefont = (UI.GetString('Misc', 'JAVASCRIPT', 'Script items', "Font"))
    fontsize = (UI.GetValue('Misc', 'JAVASCRIPT', 'Script items', "Font Size"))
    boldness = (UI.GetValue('Misc', 'JAVASCRIPT', 'Script items', "Boldness"))
    font = Render.AddFont(changefont, fontsize, boldness);
    charge = Exploit.GetCharge()
    selected = (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Indicators")).toString(2).split("").reverse().map(Number);
    var Center = Render.GetScreenSize();
    var CenterX = Center[0] / 2
    var CenterY = Center[1] / 2

    //Doubletap Indicator

    if (selected[0]) {

        if (UI.IsHotkeyActive("Rage", "GENERAL", "Exploits", "Doubletap")) {
            Render.StringCustom(CenterX, CenterY + 74.5, 1, "DT", [0, 0, 0, 255], font);
            Render.StringCustom(CenterX, CenterY + 75, 1, "DT", [163, 240, 41, 255], font);
            if (charge < 1){
                draw_circle(CenterX + 19, CenterY + 82, 6, 2, [120, 120, 120, 190]);
                Render.FilledCircle(CenterX + 19, CenterY + 82, charge * 5, [163, 240, 41, 255]);
            }
        } else {
            Render.StringCustom(CenterX, CenterY + 74.5, 1, "DT", [0, 0, 0, 255], font);
            Render.StringCustom(CenterX, CenterY + 75, 1, "DT", [242, 29, 29, 255], font);
        }
    }

    //Hide Indicator

    if (selected[1]) {
        if (UI.IsHotkeyActive("Rage", "GENERAL", "Exploits", "Hide shots")) {
            Render.StringCustom(CenterX, CenterY + 89.5, 1, "HIDE", [0, 0, 0, 255], font);
            Render.StringCustom(CenterX, CenterY + 90, 1, "HIDE", [163, 240, 41, 255], font);
        } else {
            Render.StringCustom(CenterX, CenterY + 89.5, 1, "HIDE", [0, 0, 0, 255], font);
            Render.StringCustom(CenterX, CenterY + 90, 1, "HIDE", [242, 29, 29, 255], font);
        }
    }

    //Fakeduck Indicator

    if (selected[2]) {
        if (UI.IsHotkeyActive("Anti-Aim", "Extra", "Fake duck")) {
            Render.StringCustom(CenterX, CenterY + 104.5, 1, "DUCK", [0, 0, 0, 255], font);
            Render.StringCustom(CenterX, CenterY + 105, 1, "DUCK", [163, 240, 41, 255], font);
        } else {
            Render.StringCustom(CenterX, CenterY + 104.5, 1, "DUCK", [0, 0, 0, 255], font);
            Render.StringCustom(CenterX, CenterY + 105, 1, "DUCK", [242, 29, 29, 255], font);
        }
    }

    //Bodyaim Indicator

    if (selected[3]) {

        if (UI.IsHotkeyActive("Rage", "General", "Force body aim")) {
            Render.StringCustom(CenterX, CenterY + 119.5, 1, "BODY", [0, 0, 0, 255], font);
            Render.StringCustom(CenterX, CenterY + 120, 1, "BODY", [163, 240, 41, 255], font);
        } else {
            Render.StringCustom(CenterX, CenterY + 119.5, 1, "BODY", [0, 0, 0, 255], font);
            Render.StringCustom(CenterX, CenterY + 120, 1, "BODY", [242, 29, 29, 255], font);
        }
    }

    //Inverter Indicator

    if (selected[4]) {
        if (UI.IsHotkeyActive("Anti-Aim", "Fake angles", "Inverter")) {
            Render.StringCustom(CenterX, CenterY + 134.5, 1, "RIGHT", [0, 0, 0, 255], font);
            Render.StringCustom(CenterX, CenterY + 135, 1, "RIGHT", [255, 255, 255, 255], font);
        } else {
            Render.StringCustom(CenterX, CenterY + 134.5, 1, "LEFT", [0, 0, 0, 255], font);
            Render.StringCustom(CenterX, CenterY + 135, 1, "LEFT", [255, 255, 255, 255], font);
        }
    }
}

Cheat.RegisterCallback("Draw", "render")

