//Anti-aims
UI.AddLabel(" Antiaim ");
UI.AddSliderInt("Antiaim_x", 0, Global.GetScreenSize()[0]);
UI.AddSliderInt("Antiaim_y", 0, Global.GetScreenSize()[1]);
UI.AddColorPicker("poloska blya");
var color = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "poloska blya");
if (color[3] == 0)
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "poloska blya", [102, 111, 99, 255]);
function in_bounds(vec, x, y, x2, y2) {
return (vec[0] > x) && (vec[1] > y) && (vec[0] < x2) && (vec[1] < y2)
}
function draw_arc(x, y, radius, start_angle, percent, thickness, color) {
var precision = (2 * Math.PI) / 30;
var step = Math.PI / 180;
var inner = radius - thickness;
var end_angle = (start_angle + percent) * step;
var start_angle = (start_angle * Math.PI) / 180;
for (; radius > inner; --radius) {
for (var angle = start_angle; angle < end_angle; angle += precision) {
var cx = Math.round(x + radius * Math.cos(angle));
var cy = Math.round(y + radius * Math.sin(angle));
var cx2 = Math.round(x + radius * Math.cos(angle + precision));
var cy2 = Math.round(y + radius * Math.sin(angle + precision));
Render.Line(cx, cy, cx2, cy2, color);
}
}
}
function main_aa() {
if (!World.GetServerString()) return;
const x = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Antiaim_x"),
y = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Antiaim_y");
var font = Render.AddFont("Verdana", 7, 100);
var RealYaw = Local.GetRealYaw();
var FakeYaw = Local.GetFakeYaw();
var delta = Math.min(Math.abs(RealYaw - FakeYaw) / 2, 60).toFixed(1);
var safety = Math.min(Math.round(1.7 * Math.abs(delta)), 100);
if (UI.IsHotkeyActive("Anti-Aim", "Fake angles", "Inverter")) {
var side = "<";
} else {
var side = ">";
}
var text = "FAKE (" + delta.toString() + " ) | safety: " + safety.toString() + "% | side: " + side;
var w = Render.TextSizeCustom(text, font)[0] + 8;
var x3 = x - w - 3;
color = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "poloska blya");
Render.FilledRect(x3, y + 2, 2, 18, [ color[0], color[1], color[2], 255 ]);
Render.StringCustom(x + 5 - w, y + 5, 0, text, [0, 0, 0, 180], font);
Render.StringCustom(x + 4 - w, y + 4, 0, text, [255, 255, 255, 255], font);
Render.Circle(x + 5 - w + Render.TextSizeCustom("FAKE (" + delta.toString(), font)[0], y + 8, 1, [255, 255, 255, 255]);
if (Global.IsKeyPressed(1) && UI.IsMenuOpen()) {
const mouse_pos = Global.GetCursorPosition();
if (in_bounds(mouse_pos, x - w, y, x + w, y + 30)) {
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Antiaim_x", mouse_pos[0] + w / 2);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Antiaim_y", mouse_pos[1] - 20);
}
}
}
Global.RegisterCallback("Draw", "main_aa");