var CacheManualDirection = UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Manual dir");
var CacheMouseDirection = UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Mouse dir");
var CacheAutoDirection = UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Auto dir");
var CacheJitterOffset = UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Jitter offset");
var CacheYawOffset = UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset");
var CacheAtTargets = UI.GetValue("Anti-Aim", "Rage Anti-Aim", "At targets");
var CachePitch = UI.GetValue("Anti-Aim", "Extra", "Pitch");
var Reset = false;
var Action = false;
function Desync(Fake, Real, LBY) {
AntiAim.SetFakeOffset(Fake);
AntiAim.SetRealOffset(Real);
AntiAim.SetLBYOffset(LBY);
}
function CalculateDistance(Local, Target) {
var lx = Local[0];
var ly = Local[1];
var lz = Local[2];
var tx = Target[0];
var ty = Target[1];
var tz = Target[2];
var dx = lx - tx;
var dy = ly - ty;
var dz = lz - tz;
return Math.sqrt(dx * dx + dy * dy + dz * dz);
}
function LegitAA() {
if (Input.IsKeyPressed(0x45)) {
if (Action) return;
AntiAim.SetOverride(1);
Cheat.ExecuteCommand("-use");
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Manual dir", 0);
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Mouse dir", 0);
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Auto dir", 0);
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Jitter offset", 0);
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", 180);
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "At targets", 1);
UI.SetValue("Anti-Aim", "Extra", "Pitch", 3);
if (UI.IsHotkeyActive("Anti-Aim", "Fake angles", "Inverter")) {
Desync(0, -60, 0);
} else {
Desync(0, 60, 0);
}
Reset = true;
} else {
if (Reset == true) {
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Manual dir", CacheManualDirection);
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Mouse dir", CacheMouseDirection);
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Auto dir", CacheAutoDirection);
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Jitter offset", CacheJitterOffset);
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", CacheYawOffset);
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "At targets", CacheAtTargets);
UI.SetValue("Anti-Aim", "Extra", "Pitch", CachePitch);
AntiAim.SetOverride(0);
AntiAim.SetFakeOffset(0);
AntiAim.SetRealOffset(0);
AntiAim.SetLBYOffset(0);
Reset = false;
}
}
}
function BombTrue() {
var LocalPlayerTeam = Entity.GetProp(Entity.GetLocalPlayer(), "DT_BaseEntity", "m_iTeamNum");
var PlayerUserId = Event.GetInt("userid");
var PlayerIndex = Entity.GetEntityFromUserID(PlayerUserId);
var BombPlanted = Event.GetInt("isplanted");
if (PlayerIndex == Entity.GetLocalPlayer()) {
if (LocalPlayerTeam == 3) {
if (BombPlanted) {
Action = true;
} else {
Action = false;
}
} else {
Action = false;
}
}
}
function BombFalse() {
var PlayerUserId = Event.GetInt("userid");
var PlayerIndex = Entity.GetEntityFromUserID(PlayerUserId);
if (PlayerIndex == Entity.GetLocalPlayer()) {
Action = false;
}
}
function OnUnload() {
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Manual dir", CacheManualDirection);
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Mouse dir", CacheMouseDirection);
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Auto dir", CacheAutoDirection);
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Jitter offset", CacheJitterOffset);
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", CacheYawOffset);
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "At targets", CacheAtTargets);
UI.SetValue("Anti-Aim", "Extra", "Pitch", CachePitch);
AntiAim.SetOverride(0);
AntiAim.SetFakeOffset(0);
AntiAim.SetRealOffset(0);
AntiAim.SetLBYOffset(0);
}
Cheat.RegisterCallback("CreateMove", "LegitAA");
Cheat.RegisterCallback("enter_bombzone", "BombTrue");
Cheat.RegisterCallback("exit_bombzone", "BombFalse");
Cheat.RegisterCallback("Unload", "OnUnload");