UI.AddHotkey("Left");
UI.AddHotkey("Right");
UI.AddHotkey("Back");
UI.AddColorPicker("Desync color");
UI.AddColorPicker("Manual color");
UI.AddColorPicker("Default color");
var desync = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Desync color");
var active = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Manual color");
var defolt = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Default color");
function onCreateMove() {
    if (UI.IsHotkeyActive("JAVASCRIPT", "Left")) {
        UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", -90);
    }
    if (UI.IsHotkeyActive("JAVASCRIPT", "Right")) {
        UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", 90);
    }
    if (UI.IsHotkeyActive("JAVASCRIPT", "Back")) {
        UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", 0);
        UI.SetEnabled('Anti-Aim', 'Rage Anti-Aim', 'At targets'), 0;
    }
}

function onDraw() {
    var screen = Global.GetScreenSize();
    x = screen[0];
    y = screen[1];

    var font = Render.AddFont("Acta Symbols W95 Arrows", 20, 100);
    var offset = UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset");
	var invert = UI.IsHotkeyActive("Anti-Aim", "Fake angels", "Inverter");

    Render.StringCustom(x / 2 + 65, y / 2 * 0.982, 1, "R", [defolt[0], defolt[1], defolt[2], 150], font);
    Render.StringCustom(x / 2 -65, y / 2 * 0.982, 1, "Q", [defolt[0], defolt[1], defolt[2], 150], font);

    if (offset == 90) {
        Render.StringCustom(x / 2 + 65, y / 2 * 0.982, 1, "R", [active[0], active[1], active[2], 225], font);
    }
    else if (offset == -90) {
        Render.StringCustom(x / 2 -65, y / 2 * 0.982, 1, "Q", [active[0], active[1], active[2], 225], font);
    }
	
	if (invert) {
        Render.FilledRect(x / 2 + 51, y / 2 * 0.982, 2, 20, [desync[0], desync[1], desync[2], 225]);
        Render.FilledRect(x / 2 - 55, y / 2 * 0.982, 2, 20, [defolt[0], defolt[1], defolt[2], 150]);
    }
    else if (!invert) {
        Render.FilledRect(x / 2 - 55, y / 2 * 0.982, 2, 20, [desync[0], desync[1], desync[2], 225]);
        Render.FilledRect(x / 2 + 51, y / 2 * 0.982, 2, 20, [defolt[0], defolt[1], defolt[2], 150]);
    }
}

Global.RegisterCallback("CreateMove", "onCreateMove");
Global.RegisterCallback("Draw", "onDraw");