function clamp(num, min, max) {return num <= min ? min : num >= max ? max : num;}
UI.AddColorPicker("color");
function draw() {
var desyncvalue = clamp(Math.abs(Math.round(Local.GetRealYaw() - Local.GetFakeYaw())), 0, 58)
var col = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "color");
var font = Render.AddFont("Calibri", 11, 200);
var font2 = Render.AddFont("Calibri", 20, 20);
var font3 = Render.AddFont("Calibri", 11, 200);
if (desyncvalue > 10) {
Render.StringCustom(Global.GetScreenSize()[0] / 2 - 7, Global.GetScreenSize()[1] / 2 + 20, 0, "" + desyncvalue, [col[0], col[1], col[2], 255], font3);
Render.StringCustom(Global.GetScreenSize()[0] / 2 + 7, Global.GetScreenSize()[1] / 2 - 1, 0, ".", [col[0], col[1], col[2], 255], font2);
}
else {
Render.StringCustom(Global.GetScreenSize()[0] / 2 - 3, Global.GetScreenSize()[1] / 2 + 20, 0, "" + desyncvalue, [col[0], col[1], col[2], 255], font);
Render.StringCustom(Global.GetScreenSize()[0] / 2 + 3, Global.GetScreenSize()[1] / 2 - 1, 0, ".", [col[0], col[1], col[2], 255], font2);
}
Render.GradientRect((Global.GetScreenSize()[0] / 2 + -desyncvalue * 2) + desyncvalue + 2, Global.GetScreenSize()[1] / 2 + 40, desyncvalue, 3, 1, [col[0], col[1], col[2], 0], [col[0], col[1], col[2], 255]);
Render.GradientRect((Global.GetScreenSize()[0] / 2 + -desyncvalue * 2) + (desyncvalue * 2), Global.GetScreenSize()[1] / 2 + 40, desyncvalue, 3, 1, [col[0], col[1], col[2], 255], [col[0], col[1], col[2], 0]);
}
Cheat.RegisterCallback("Draw", "draw");