UI.AddHotkey("Freestanding");
UI.AddCheckbox("Draw indicators");
UI.AddSliderInt("Indicator offset X", 1, 1920);
UI.AddSliderInt("Indicator offset Y", 1, 1080);

function freestanding()
{
    if (UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "Freestanding"))
    {
        UI.SetValue ("Anti-Aim", "Rage Anti-Aim", "Auto direction", true);
        
    }
    else
    {
    
        {
            UI.SetValue ("Anti-Aim", "Rage Anti-Aim", "Auto direction", false);
        }
    }
}

function drawFunction(){
    var shouldDraw = UI.GetValue("Misc", "JAVASCRIPT", "Script Items", "Draw indicators");
    if (shouldDraw) {
        
        var screen_size = Global.GetScreenSize();
        var x = (UI.GetValue("Misc", "JAVASCRIPT", "Script Items","Indicator offset X"))
        var y = (UI.GetValue("Misc", "JAVASCRIPT", "Script Items","Indicator offset Y"))

        var keybindArray = [
            
        ];
        
        if (UI.IsHotkeyActive("JAVASCRIPT", "Script items", "Freestanding")) {
            keybindArray.push("FS")
        }
        
        var text_size = 4

        for (var i=0;i < keybindArray.length;i++) {
            //Global.Print("STD:" + keybindArray[i][0])
            var textHeight = text_size*4.4
            var y_add = (textHeight * i)
            var clr = [124,195,13,255]
            if (keybindArray[i] == "Freestand") {
                clr = [255,255,255,255]
            }     
            Render.String( x, y - y_add, 0, keybindArray[i], clr,text_size);
        }
    }
}
Cheat.RegisterCallback("CreateMove", "freestanding")
Global.RegisterCallback("Draw","drawFunction")