var screen_size = Render.GetScreenSize();
var isInverted = UI.IsHotkeyActive("Anti-Aim", "Fake angles", "Inverter");
UI.AddCheckbox("Indicator");
UI.AddColorPicker("Indicator color");
UI.AddColorPicker("Arrows color" );
UI.AddColorPicker("Selected arrow color" );
function draw() {
local = Entity.GetLocalPlayer();
if (!UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Indicator") || !Entity.IsValid(local) || !Entity.IsAlive(local)) return;
font = Render.AddFont("Verdana", 8, 400);
x = screen_size[0];
y = screen_size[1];
col = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Indicator color");
arrows_color = UI.GetColor( "Misc", "JAVASCRIPT", "Script items", "Arrows color" );
s_arrow_color = UI.GetColor( "Misc", "JAVASCRIPT", "Script items", "Selected arrow color" );
real_yaw = Local.GetRealYaw();
fake_yaw = Local.GetFakeYaw();
delta = Math.min(Math.abs(real_yaw - fake_yaw) / 2, 60).toFixed(0);
delta_size = Render.TextSizeCustom(delta, font);
Render.StringCustom(x / 2, y / 2 + 20, 1, delta, [255, 255, 255, 255], font);
Render.GradientRect(x / 2, y / 2 + 40, (65 / 60) * delta, 5, 1, col, [0, 0, 0, 0]);
Render.GradientRect(x / 2 - (65 / 60) * delta + 1, y / 2 + 40, (65 / 60) * delta, 5, 1, [0, 0, 0, 0], col);
Render.String(screen_size[0] /2 -50, screen_size[1] /2 -20, 1, "<", isInverted ? s_arrow_color : arrows_color, 4 );
Render.String(screen_size[0] /2 +50, screen_size[1] /2 -20, 1, ">", isInverted ? arrows_color : s_arrow_color, 4 );
}
Cheat.RegisterCallback("Draw", "draw");