UI.AddSliderInt("y offset", -2500, 2500);
UI.AddCheckbox( "CrimLag (crash)" );
var fakelag = UI.GetValue( "Anti-Aim", "Fake-Lag", "Limit");

var screen_size = Global.GetScreenSize();
var drawLeft = 1;
var drawRight = 0,
    drawBack = 0;
var time, delay, fillbar, shotsfired;
var fakelag, lag_value = 0;
const global = [], globals = [], sound = [], cheat = [], local = [], world = [], input = [], render = [], ui = [], convar = [], event = [], entity = [], trace = [], usercmd = [], antiaim = [], exploit = [], ragebot = [], material = []; global.print = Global.Print, global.print_chat = Global.PrintChat, global.print_color = Global.PrintColor, global.register_callback = Global.RegisterCallback, global.execute_command = Global.ExecuteCommand, global.frame_stage = Global.FrameStage, global.tickcount = Global.Tickcount, global.tickrate = Global.Tickrate, global.tick_interval = Global.TickInterval, global.curtime = Global.Curtime, global.realtime = Global.Realtime, global.frametime = Global.Frametime, global.latency = Global.Latency, global.get_view_angles = Global.GetViewAngles, global.set_view_angles = Global.SetViewAngles, global.get_map_name = Global.GetMapName, global.is_key_pressed = Global.IsKeyPressed, global.get_screen_size = Global.GetScreenSize, global.get_cursor_position = Global.GetCursorPosition, global.play_sound = Global.PlaySound, global.play_microphone = Global.PlayMicrophone, global.stop_microphone = Global.StopMicrophone, global.get_username = Global.GetUsername, global.set_clan_tag = Global.SetClanTag, globals.tickcount = Globals.Tickcount, globals.tickrate = Globals.Tickrate, globals.tick_interval = Globals.TickInterval, globals.curtime = Globals.Curtime, globals.realtime = Globals.Realtime, globals.frametime = Globals.Frametime, sound.play = Sound.Play, sound.play_microphone = Sound.PlayMicrophone, sound.stop_microphone = Sound.StopMicrophone, cheat.get_username = Cheat.GetUsername, cheat.register_callback = function(c, f) { switch (c) { case 'create_move': Cheat.RegisterCallback("CreateMove", f); break; case 'paint': Cheat.RegisterCallback("Draw", f); break; case 'fsn': Cheat.RegisterCallback("FrameStageNotify", f); break; case 'shutdown': Cheat.RegisterCallback("Unload", f); break; default: Cheat.RegisterCallback(c, f); break; } }, cheat.execute_command = Cheat.ExecuteCommand, cheat.frame_stage = Cheat.FrameStage, cheat.print = Cheat.Print, cheat.print_chat = Cheat.PrintChat, cheat.print_color = Cheat.PrintColor, local.latency = Local.Latency, local.get_view_angles = Local.GetViewAngles, local.set_view_angles = Local.SetViewAngles, local.set_clan_tag = Local.SetClanTag, local.get_real_yaw = Local.GetRealYaw, local.get_fake_yaw = Local.GetFakeYaw, local.get_spread = Local.GetSpread, local.get_inaccuracy = Local.GetInaccuracy, world.get_map_name = World.GetMapName, world.get_server_string = World.GetServerString, input.get_cursor_position = Input.GetCursorPosition, input.is_key_pressed = Input.IsKeyPressed, render.string = Render.String, render.text_size = Render.TextSize, render.line = Render.Line, render.rect = Render.Rect, render.filled_rect = Render.FilledRect, render.gradient_rect = Render.GradientRect, render.circle = Render.Circle, render.filled_circle = Render.FilledCircle, render.polygon = Render.Polygon, render.world_to_screen = Render.WorldToScreen, render.add_font = Render.AddFont, render.find_font = Render.FindFont, render.string_custom = Render.StringCustom, render.textured_rect = Render.TexturedRect, render.add_texture = Render.AddTexture, render.text_size_custom = Render.TextSizeCustom, render.get_screen_size = Render.GetScreenSize, ui.get_value = UI.GetValue, ui.set_value = UI.SetValue, ui.add_checkbox = UI.AddCheckbox, ui.add_slider_int = UI.AddSliderInt, ui.add_slider_float = UI.AddSliderFloat, ui.add_hotkey = UI.AddHotkey, ui.add_label = UI.AddLabel, ui.add_dropdown = UI.AddDropdown, ui.add_multi_dropdown = UI.AddMultiDropdown, ui.add_color_picker = UI.AddColorPicker, ui.add_textbox = UI.AddTextbox, ui.set_enabled = UI.SetEnabled, ui.get_string = UI.GetString, ui.get_color = UI.GetColor, ui.set_color = UI.SetColor, ui.is_hotkey_active = UI.IsHotkeyActive, ui.toggle_hotkey = UI.ToggleHotkey, ui.is_menu_open = UI.IsMenuOpen, convar.get_int = Convar.GetInt, convar.set_int = Convar.SetInt, convar.get_float = Convar.GetFloat, convar.set_float = Convar.SetFloat, convar.get_string = Convar.GetString, convar.set_string = Convar.SetString, event.get_int = Event.GetInt, event.get_float = Event.GetFloat, event.get_string = Event.GetString, entity.get_entities = Entity.GetEntities, entity.get_entities_by_class_i_d = Entity.GetEntitiesByClassID, entity.get_players = Entity.GetPlayers, entity.get_enemies = Entity.GetEnemies, entity.get_teammates = Entity.GetTeammates, entity.get_local_player = Entity.GetLocalPlayer, entity.get_game_rules_proxy = Entity.GetGameRulesProxy, entity.get_entity_from_user_i_d = Entity.GetEntityFromUserID, entity.is_teammate = Entity.IsTeammate, entity.is_enemy = Entity.IsEnemy, entity.is_bot = Entity.IsBot, entity.is_local_player = Entity.IsLocalPlayer, entity.is_valid = Entity.IsValid, entity.is_alive = Entity.IsAlive, entity.is_dormant = Entity.IsDormant, entity.get_class_i_d = Entity.GetClassID, entity.get_class_name = Entity.GetClassName, entity.get_name = Entity.GetName, entity.get_weapon = Entity.GetWeapon, entity.get_weapons = Entity.GetWeapons, entity.get_render_origin = Entity.GetRenderOrigin, entity.get_render_box = Entity.GetRenderBox, entity.get_prop = Entity.GetProp, entity.set_prop = Entity.SetProp, entity.get_hitbox_position = Entity.GetHitboxPosition, entity.get_eye_position = Entity.GetEyePosition, trace.line = Trace.Line, trace.bullet = Trace.Bullet, usercmd.set_movement = UserCMD.SetMovement, usercmd.get_movement = UserCMD.GetMovement, usercmd.set_angles = UserCMD.SetAngles, usercmd.force_jump = UserCMD.ForceJump, usercmd.force_crouch = UserCMD.ForceCrouch, antiaim.get_override = AntiAim.GetOverride, antiaim.set_override = AntiAim.SetOverride, antiaim.set_real_offset = AntiAim.SetRealOffset, antiaim.set_fake_offset = AntiAim.SetFakeOffset, antiaim.set_l_b_y_offset = AntiAim.SetLBYOffset, exploit.get_charge = Exploit.GetCharge, exploit.recharge = Exploit.Recharge, exploit.disable_recharge = Exploit.DisableRecharge, exploit.enable_recharge = Exploit.EnableRecharge, ragebot.get_target = Ragebot.GetTarget, ragebot.ignore_target = Ragebot.IgnoreTarget, ragebot.force_target = Ragebot.ForceTarget, ragebot.force_target_safety = Ragebot.ForceTargetSafety, ragebot.force_target_hitchance = Ragebot.ForceTargetHitchance, ragebot.force_target_minimum_damage = Ragebot.ForceTargetMinimumDamage, ragebot.force_hitbox_safety = Ragebot.ForceHitboxSafety, material.create = Material.Create, material.destroy = Material.Destroy, material.get = Material.Get, material.set_key_value = Material.SetKeyValue, material.refresh = Material.Refresh

localplayer_index = Entity.GetLocalPlayer();
localplayer_weapon = Entity.GetWeapon(localplayer_index);
const global_print = Global.Print,
    global_print_chat = Global.PrintChat,
    global_print_color = Global.PrintColor,
    global_register_callback = Global.RegisterCallback,
    global_execute_command = Global.ExecuteCommand,
    global_frame_stage = Global.FrameStage,
    global_tickcount = Global.Tickcount,
    global_tickrate = Global.Tickrate,
    global_tick_interval = Global.TickInterval,
    global_curtime = Global.Curtime,
    global_realtime = Global.Realtime,
    global_frametime = Global.Frametime,
    global_latency = Global.Latency,
    global_get_view_angles = Global.GetViewAngles,
    global_set_view_angles = Global.SetViewAngles,
    global_get_map_name = Global.GetMapName,
    global_is_key_pressed = Global.IsKeyPressed,
    global_get_screen_size = Global.GetScreenSize,
    global_get_cursor_position = Global.GetCursorPosition,
    global_play_sound = Global.PlaySound,
    global_play_microphone = Global.PlayMicrophone,
    global_stop_microphone = Global.StopMicrophone,
    global_get_username = Global.GetUsername,
    global_set_clan_tag = Global.SetClanTag,
    globals_tickcount = Globals.Tickcount,
    globals_tickrate = Globals.Tickrate,
    globals_tick_interval = Globals.TickInterval,
    globals_curtime = Globals.Curtime,
    globals_realtime = Globals.Realtime,
    globals_frametime = Globals.Frametime,
    sound_play = Sound.Play,
    sound_play_microphone = Sound.PlayMicrophone,
    sound_stop_microphone = Sound.StopMicrophone,
    cheat_get_username = Cheat.GetUsername,
    cheat_register_callback = cheat_register_callback = new Proxy(Cheat.RegisterCallback, {
        apply: function(_, _, args) {
            switch (args[0]) {
                case 'paint':
                    Cheat.RegisterCallback('Draw', args[1]);
                    break;
                case 'create_move':
                    Cheat.RegisterCallback('CreateMove', args[1]);
                    break;
                case 'fsn':
                    Cheat.RegisterCallback('FrameStageNotify', args[1]);
                    break;
                default:
                    Cheat.RegisterCallback(args[0], args[1]);
                    break;
            }
        }
    }),
    cheat_execute_command = Cheat.ExecuteCommand,
    cheat_frame_stage = Cheat.FrameStage,
    cheat_print = Cheat.Print,
    cheat_print_chat = Cheat.PrintChat,
    cheat_print_color = Cheat.PrintColor,
    local_latency = Local.Latency,
    local_get_view_angles = Local.GetViewAngles,
    local_set_view_angles = Local.SetViewAngles,
    local_set_clan_tag = Local.SetClanTag,
    local_get_real_yaw = Local.GetRealYaw,
    local_get_fake_yaw = Local.GetFakeYaw,
    local_get_spread = Local.GetSpread,
    local_get_inaccuracy = Local.GetInaccuracy,
    world_get_map_name = World.GetMapName,
    world_get_server_string = World.GetServerString,
    input_get_cursor_position = Input.GetCursorPosition,
    input_is_key_pressed = Input.IsKeyPressed,
    render_string = Render.String,
    render_text_size = Render.TextSize,
    render_line = Render.Line,
    render_rect = Render.Rect,
    render_filled_rect = Render.FilledRect,
    render_gradient_rect = Render.GradientRect,
    render_circle = Render.Circle,
    render_filled_circle = Render.FilledCircle,
    render_polygon = Render.Polygon,
    render_world_to_screen = Render.WorldToScreen,
    render_add_font = Render.AddFont,
    render_find_font = Render.FindFont,
    render_string_custom = Render.StringCustom,
    render_textured_rect = Render.TexturedRect,
    render_add_texture = Render.AddTexture,
    render_text_size_custom = Render.TextSizeCustom,
    render_get_screen_size = Render.GetScreenSize,
    ui_get_value = UI.GetValue,
    ui_set_value = UI.SetValue,
    ui_add_checkbox = UI.AddCheckbox,
    ui_add_slider_int = UI.AddSliderInt,
    ui_add_slider_float = UI.AddSliderFloat,
    ui_add_hotkey = UI.AddHotkey,
    ui_add_label = UI.AddLabel,
    ui_add_dropdown = UI.AddDropdown,
    ui_add_multi_dropdown = UI.AddMultiDropdown,
    ui_add_color_picker = UI.AddColorPicker,
    ui_add_textbox = UI.AddTextbox,
    ui_set_enabled = UI.SetEnabled,
    ui_get_string = UI.GetString,
    ui_get_color = UI.GetColor,
    ui_set_color = UI.SetColor,
    ui_is_hotkey_active = UI.IsHotkeyActive,
    ui_toggle_hotkey = UI.ToggleHotkey,
    ui_is_menu_open = UI.IsMenuOpen,
    convar_get_int = Convar.GetInt,
    convar_set_int = Convar.SetInt,
    convar_get_float = Convar.GetFloat,
    convar_set_float = Convar.SetFloat,
    convar_get_string = Convar.GetString,
    convar_set_string = Convar.SetString,
    event_get_int = Event.GetInt,
    event_get_float = Event.GetFloat,
    event_get_string = Event.GetString,
    entity_get_entities = Entity.GetEntities,
    entity_get_entities_by_class_i_d = Entity.GetEntitiesByClassID,
    entity_get_players = Entity.GetPlayers,
    entity_get_enemies = Entity.GetEnemies,
    entity_get_teammates = Entity.GetTeammates,
    entity_get_local_player = Entity.GetLocalPlayer,
    entity_get_game_rules_proxy = Entity.GetGameRulesProxy,
    entity_get_entity_from_user_i_d = Entity.GetEntityFromUserID,
    entity_is_teammate = Entity.IsTeammate,
    entity_is_enemy = Entity.IsEnemy,
    entity_is_bot = Entity.IsBot,
    entity_is_local_player = Entity.IsLocalPlayer,
    entity_is_valid = Entity.IsValid,
    entity_is_alive = Entity.IsAlive,
    entity_is_dormant = Entity.IsDormant,
    entity_get_class_i_d = Entity.GetClassID,
    entity_get_class_name = Entity.GetClassName,
    entity_get_name = Entity.GetName,
    entity_get_weapon = Entity.GetWeapon,
    entity_get_weapons = Entity.GetWeapons,
    entity_get_render_origin = Entity.GetRenderOrigin,
    entity_get_prop = Entity.GetProp,
    entity_set_prop = Entity.SetProp,
    entity_get_hitbox_position = Entity.GetHitboxPosition,
    entity_get_eye_position = Entity.GetEyePosition,
    trace_line = Trace.Line,
    trace_bullet = Trace.Bullet,
    usercmd_set_movement = UserCMD.SetMovement,
    usercmd_get_movement = UserCMD.GetMovement,
    usercmd_set_angles = UserCMD.SetAngles,
    usercmd_force_jump = UserCMD.ForceJump,
    usercmd_force_crouch = UserCMD.ForceCrouch,
    antiaim_get_override = AntiAim.GetOverride,
    antiaim_set_override = AntiAim.SetOverride,
    antiaim_set_real_offset = AntiAim.SetRealOffset,
    antiaim_set_fake_offset = AntiAim.SetFakeOffset,
    antiaim_set_l_b_y_offset = AntiAim.SetLBYOffset,
    exploit_get_charge = Exploit.GetCharge,
    exploit_recharge = Exploit.Recharge,
    exploit_disable_recharge = Exploit.DisableRecharge,
    exploit_enable_recharge = Exploit.EnableRecharge,
    ragebot_override_minimum_damage = Ragebot.OverrideMinimumDamage,
    ragebot_override_hitchance = Ragebot.OverrideHitchance,
    ragebot_override_accuracy_boost = Ragebot.OverrideAccuracyBoost,
    ragebot_override_multipoint_scale = Ragebot.OverrideMultipointScale,
    ragebot_force_safety = Ragebot.ForceSafety;
var menu = [];
const menu_spacer = "                                                                                  ";

function calcDist(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);
}

var last_time = 0;
function dispDamage() {
    local = Entity.GetLocalPlayer();
	
    if (!Entity.IsAlive(local)) return;

    var c4 = Entity.GetEntitiesByClassID(128)[0];

    if (c4 == undefined) return;

	var defusing;
		defusing = 1;
    var eLoc = Entity.GetRenderOrigin(c4);
    var lLoc = Entity.GetRenderOrigin(local)
    var distance = calcDist(eLoc, lLoc);
    var willKill = false;
    var dmg;
    var armor = Entity.GetProp(local, "CCSPlayerResource", "m_iArmor");
    var health = Entity.GetProp(local, "CBasePlayer", "m_iHealth");
    var length = Entity.GetProp(c4, "CPlantedC4", "m_flTimerLength");
    var timer = (Entity.GetProp(c4, "CPlantedC4", "m_flC4Blow") - Globals.Curtime());
    var bar_length = (((Render.GetScreenSize()[1] - 50) / length) * (timer));
	
	var defbarlength = Entity.GetProp(c4, "CPlantedC4", "m_flDefuseLength");
    var deftimer = (Entity.GetProp(c4, "CPlantedC4", "m_flDefuseCountDown") - Globals.Curtime());
    var defbar_length = (((Render.GetScreenSize()[1] - 50) / defbarlength) * (deftimer));
    var defuse_countdown = Entity.GetProp(local, "CPlantedC4", "m_flDefuseCountDown");
    var isdefused = Entity.GetProp(c4, "CPlantedC4", "m_hBombDefuser");
	
	const y = Render.GetScreenSize()[1];

    const a = 450.7;
    const b = 75.68;
    const c = 789.2;

    const d = (distance - b) / c;

    var damage = a * Math.exp(-d * d);
	
    if (armor > 0) {
        var newDmg = damage * 0.5;
        var armorDmg = (damage - newDmg) * 0.5;

        if (armorDmg > armor) {
            armor = armor * (1 / .5);
            newDmg = damage - armorDmg;
        }
        damage = newDmg;
    }
    dmg = Math.ceil(damage);

    if (dmg >= health)
        willKill = true;
    else
        willKill = false;

    timer = parseInt(timer.toPrecision(2));
    //big_font = Render.AddFont("Arial Black", 16, 50);
    //small_font = Render.AddFont("Arial Black", 12, 50);
	font = Render.AddFont("Verdana", 16, 700);
	var color123;
	color123 = [10, 198, 57, 200];
	if(timer < 5){
		color123 = [192, 32, 17, 200];
	}
	if (isdefused > 0){
		if (timer > bar_length && timer >= 0.01) {
			Render.FilledRect(0, 0, 20, y, [0, 0, 0, 125]);
			Render.FilledRect(0, y - defbar_length, 20, defbar_length, color123);
			Render.StringCustom(1, 1, 0, getSite(c4) + timer + "s", [0, 0, 0, 125], font);
			Render.StringCustom(0, 0, 0, getSite(c4) + timer + "s", [135, 172, 10, 255], font);
			defusing = 0;
		if (willKill) {
			Render.StringCustom(1, 21, 0, "LETHAL", [0, 0, 0, 125], font);
			Render.StringCustom(0, 20, 0, "LETHAL", [192, 32, 17, 255], font);
		} else if (damage > 1) {
			Render.StringCustom(1, 21, 0, "-" + dmg + " HP", [0, 0, 0, 125], font);
			Render.StringCustom(0, 20, 0, "-" + dmg + " HP", [255, 255, 255, 255], font);
		}
	}
	else {
			Render.FilledRect(0, 0, 20, y, [0, 0, 0, 125]);
			Render.FilledRect(0, y - defbar_length, 20, defbar_length, color123);
			Render.StringCustom(1, 1, 0, getSite(c4) + timer + "s", [0, 0, 0, 125], font);
			Render.StringCustom(0, 0, 0, getSite(c4) + timer + "s", [135, 172, 10, 255], font);
			defusing = 0;
		if (willKill) {
			Render.StringCustom(1, 21, 0, "LETHAL", [0, 0, 0, 125], font);
			Render.StringCustom(0, 20, 0, "LETHAL", [192, 32, 17, 255], font);
		} else if (damage > 1) {
			Render.StringCustom(1, 21, 0, "-" + dmg + " HP", [0, 0, 0, 125], font);
			Render.StringCustom(0, 20, 0, "-" + dmg + " HP", [255, 255, 255, 255], font);
		}
	}
	}
	if (timer > 0) {
		Render.FilledRect(0, 0, 20, y*defusing, [0, 0, 0, 125]);
		Render.FilledRect(0, y - bar_length, 20, bar_length*defusing, [10, 198, 57, 200]);
		Render.StringCustom(1, 1, 0, getSite(c4) + timer + "s", [0, 0, 0, 125], font);
        Render.StringCustom(0, 0, 0, getSite(c4) + timer + "s", [135, 172, 10, 255], font);
    if (willKill) {
		Render.StringCustom(1, 21, 0, "LETHAL", [0, 0, 0, 125], font);
        Render.StringCustom(0, 20, 0, "LETHAL", [192, 32, 17, 255], font);
    } else if (damage > 1) {
		Render.StringCustom(1, 21, 0, "-" + dmg + " HP", [0, 0, 0, 125], font);
        Render.StringCustom(0, 20, 0, "-" + dmg + " HP", [255, 255, 255, 255], font);
    }
    }
	
    //Render.GradientRect(5, 10, 8, bar_length + 10, 0, [255, 0, 0, 200], [0, 255, 0, 100]);
}

function getSite(c4) {
    bombsite = Entity.GetProp(c4, "CPlantedC4", "m_nBombSite");

    if (bombsite == 0) {
        return "A - ";
    } else {
        return "B - ";
    }
}

Cheat.RegisterCallback("Draw", "dispDamage");

function getRandomInt(max) {
  return Math.floor(Math.random() * Math.floor(max));
}

function _TBC_CREATE_MOVE() {
    Exploit.OverrideTolerance(0);
    Exploit.OverrideShift(14);
}

function _TBC_UNLOAD() {
    Exploit.EnableRecharge();
}

//Weapon fire event
function EVENT_WEAPON_FIRE() {
    if (!Entity.GetLocalPlayer() || !Entity.IsAlive(Entity.GetLocalPlayer()) || !Entity.IsValid(Entity.GetLocalPlayer()))
        return;
    iShotsFired = Event.GetInt("userid");
    iShotsFired_index = Entity.GetEntityFromUserID(iShotsFired);

    if (Entity.GetLocalPlayer() == iShotsFired_index) {
        if (UI.IsHotkeyActive("Rage", "GENERAL", "Exploits", "Doubletap")) {

            time = Globals.Curtime();
            delay = time + 1.2;
            fillbar = 0;
        }
    }
}

function normalize_yaw(angle) {
    var adjusted_yaw = angle;

    if (adjusted_yaw < -180)
        adjusted_yaw += 360;

    if (adjusted_yaw > 180)
        adjusted_yaw -= 360;

    return adjusted_yaw;
}

render.arc = function(x, y, r1, r2, s, d, col)
{
    for (var i = s; i < s + d; i++)
    {

        const rad = i * Math.PI / 180;

        render.line(x + Math.cos(rad) * r1, y + Math.sin(rad) * r1, x + Math.cos(rad) * r2, y + Math.sin(rad) * r2, col);
    }
}

function in_air(index) {
    fv = Entity.GetProp(index, "CBasePlayer", "m_flFallVelocity");
    return (fv < -1 || fv > 1);
}

function on_bomb_planted()
{
    planted = true;
    bombsite = -1;
    offset = 15;
}

var up;
var up1;
function do_indicators1() {
	    if (!Entity.GetLocalPlayer() || !Entity.IsAlive(Entity.GetLocalPlayer()) || !Entity.IsValid(Entity.GetLocalPlayer()))
        return;
	var Air;
	var local = Entity.GetLocalPlayer();
	Air = 0
	var sint = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "y offset")
    
    if (!Entity.GetLocalPlayer() || !Entity.IsAlive(Entity.GetLocalPlayer()) || !Entity.IsValid(Entity.GetLocalPlayer()))
        return;
		var local = Entity.GetLocalPlayer();
	font = Render.AddFont("Verdana", 16, 700);
	var lp = Entity.GetLocalPlayer();
	var velocity = Math.round(getVelocity(lp));
	var velstr = velocity.toString();
	var sint = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "y offset")
	var color = [192, 32, 17, 255];
	if (velocity > 100 && !UI.IsHotkeyActive("Rage", "GENERAL", "Exploits", "Double tap") &&!UI.IsHotkeyActive("Rage", "GENERAL", "Exploits", "Hide shots") && UI.GetValue("Anti-Aim", "Fake-Lag", "Enabled") && (UI.GetValue("Anti-Aim", "Fake-Lag", "Limit") > 6))
    {
		color = [144, 176, 27, 255]
	}
	if( UI.GetValue("Anti-Aim", "Fake-Lag", "Enabled") && !UI.GetValue("CrimLag (crash)")){
	Air = 8;
	Render.StringCustom(9, 1051-up1+sint , 0, "LC", [0, 0, 0, 125], font);
	Render.StringCustom(8, 1050-up1+sint , 0, "LC", color, font);
	}
	var time_to_ticks = function(a)
    {
        return Math.floor(0.5 + a / Globals.TickInterval())
    }
	fakelag = time_to_ticks(Globals.Curtime() - Entity.GetProp(Entity.GetLocalPlayer(), "DT_CSPlayer", "m_flSimulationTime")) + 1

	var local = Entity.GetLocalPlayer();
	font = Render.AddFont("Verdana", 16, 700);
	var lp = Entity.GetLocalPlayer();
	var velocity = Math.round(getVelocity(lp));
	var velstr = velocity.toString();
	var sint = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "y offset")
				up = 0;
				up1 = 5;
		    font = Render.AddFont("Verdana", 16, 700);
			font2 = Render.AddFont("Small Fonts", 5, 100)
			var pings = Math.round(Local.Latency( ) * 1000 - 16),
			ping = Math.abs(pings);
			const y = render_get_screen_size()[1];
			if(UI.GetValue("Misc", "GENERAL", "Miscellaneous", "Extended backtracking"))
			{
			Render.StringCustom(9, y - 45+sint-Air, 0, "PING", [0, 0, 0, 125], font);
			Render.StringCustom(8, y - 46+sint-Air, 0, "PING", [192 - (ping * 23 / 110), 32 + (ping * 83 / 110), 17, 255], font);
			up = 20;
			up1 = 0;
			}		
if (UI.GetValue("CrimLag (crash)")){
font = Render.AddFont("Verdana", 16, 700);
var lp = Entity.GetLocalPlayer();
var velocity = Math.round(getVelocity(lp));
var velstr = velocity.toString();
var alpha = Math.sin(Math.abs(-Math.PI + (Globals.Realtime() * (1 / .75)) % (Math.PI * 2))) * 320;
var alpha1 = Math.sin(Math.abs(-Math.PI + (Globals.Realtime() * (1 / .75)) % (Math.PI * 2))) * 255;
var alpha2 = Math.sin(Math.abs(-Math.PI + (Globals.Realtime() * (1 / .75)) % (Math.PI * 2))) * 125;
var color = [255,255,255,alpha1]
var color1 = [0,0,0,alpha2]
var color3 = [164,198,57,alpha1]
var adaptive = (14 / (velstr/320));
cl = 0;
if (velstr > 3){
	if (alpha < 50)
	UI.SetValue( "Anti-Aim", "Fake-Lag", "Limit", fakelag);
if (alpha >= 50){
	UI.SetValue( "Anti-Aim", "Fake-Lag", "Limit", 14);
	UI.SetValue( "Anti-Aim", "Fake-Lag", "Jitter", 0);
	cl = 0;
}
if (alpha >= 100){
	UI.SetValue( "Anti-Aim", "Fake-Lag", "Limit", getRandomInt(14));
	UI.SetValue( "Anti-Aim", "Fake-Lag", "Jitter", 0)
	cl = 2;
}
if (alpha >= 150){
	UI.SetValue( "Anti-Aim", "Fake-Lag", "Limit", 14);
	UI.SetValue( "Anti-Aim", "Fake-Lag", "Jitter", 36)
	cl = cl+5;
}
if (alpha >= 200){
	UI.SetValue( "Anti-Aim", "Fake-Lag", "Limit", getRandomInt(14));
	UI.SetValue( "Anti-Aim", "Fake-Lag", "Jitter", 0)
	cl = cl+5;
}
if (alpha >= 250){
	UI.SetValue( "Anti-Aim", "Fake-Lag", "Limit", 14);
	UI.SetValue( "Anti-Aim", "Fake-Lag", "Jitter", 68)
	cl = cl+5;
}
if (alpha >= 300){
	UI.SetValue( "Anti-Aim", "Fake-Lag", "Limit", getRandomInt(14));
	UI.SetValue( "Anti-Aim", "Fake-Lag", "Jitter", 0)
	cl = cl+5;
}
if (alpha >= 310){
	UI.SetValue( "Anti-Aim", "Fake-Lag", "Limit", adaptive);
	UI.SetValue( "Anti-Aim", "Fake-Lag", "Jitter", 0)
	cl = cl+5;
}

if (alpha1 >= 60){
Render.FilledRect(14, 1081-up1+sint, 29, 4, color1);
Render.FilledRect(15, 1082-up1+sint, 1*cl, 2, color3);
Render.StringCustom(15, 1058-up1+sint, 0, "CL", color1, font);
Render.StringCustom(14, 1058-up1+sint, 0, "CL", color, font);
}
}
else{
UI.SetValue( "Anti-Aim", "Fake-Lag", "Limit", fakelag);
}
}
    if (UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Enabled") || UI.GetValue("Anti-Aim", "Legit Anti-Aim", "Enabled")) {
        if (UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Enabled")) {
            font = Render.AddFont("Verdana", 16, 700);
            font1 = Render.AddFont("Verdana", 5, 100);
            font2 = Render.AddFont("Small Fonts", 5, 100);
			font3 = Render.AddFont("Verdana", 18, 700)

            // Get our local player.
            const me = entity_get_local_player();

            // Get our drawing properties.
            const y = render_get_screen_size()[1];

            // Get our anti-aim info.
            const yaw = local_get_real_yaw(),
                fake = local_get_fake_yaw();
            var delta = Math.round(normalize_yaw(yaw - fake) / 2),
                abs = Math.abs(delta);

			if (abs > 60){
				abs = 60;
			}
			
            var keybinds = [];
            var dasada;

            dasada = 0;
            if (abs.toString() < 10) {
                dasada = 2;
            }
			
			if (delta > 0) {
				pings = 200
			}
		
			
            Render.StringCustom(9, y - 65 + 16 - up+sint-Air, 0, "FAKE", [0, 0, 0, 125], font);
            Render.StringCustom(8, y - 65 + 15 - up+sint-Air, 0, "FAKE", [192 - (abs * 37 / 53), 32 + (abs * 136 / 53), 17, 255], font);
			if (abs > 1){
			render.arc(83, y - 65 + 29 - up+sint-Air, 3, 9, 0, 360, [0,0,0,50]);
			render.arc(83, y - 65 + 29 - up+sint-Air, 4, 8, 0, 6 * abs, [192 - (abs * 37 / 53), 32 + (abs * 136 / 53), 17, 255]);	
			}
               
			}
            return;
        } else {


            var keybinds = [];
            if (UI.GetValue("Anti-Aim", "Legit Anti-Aim", "Enabled")) {
                delta *= -1;
            }
            // Get our local player.
            const me = entity_get_local_player();


            // Get our drawing properties.
            const y = render_get_screen_size()[1];

            // Get our anti-aim info.
            const yaw = local_get_real_yaw(),
                fake = local_get_fake_yaw();
            var delta = Math.round(normalize_yaw(yaw - fake) / 2),
                abs = Math.abs(delta);
			if (abs > 60){
				abs = 60;
			}
				            dasada = 0;
            if (abs.toString() < 10) {
                dasada = 2;
            }
				
            font = Render.AddFont("Verdana", 16, 700);
            font2 = Render.AddFont("Verdana", 5, 100);
            font3 = Render.AddFont("Small Fonts", 5, 0);
			font4 = Render.AddFont("Verdana", 18, 700)
            Render.StringCustom(9, y - 65 + 16 - up+sint-Air, 0, "FAKE", [0, 0, 0, 125], font);
            Render.StringCustom(8, y - 65 + 15 - up+sint-Air, 0, "FAKE", [192 - (abs * 37 / 53), 32 + (abs * 136 / 53), 17, 255], font);
			if (abs > 1 || UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Enabled")){
			render.arc(90, y - 65 + 29 - up+sint-Air, 3, 9, 0, 360, [0,0,0,50]);
			render.arc(90, y - 65 + 29 - up+sint-Air, 4, 8, 0, 6 * abs, [192 - (abs * 37 / 53), 32 + (abs * 136 / 53), 17, 255]);	
			}



    }	
		
}
function draw_outline_text (x, y, align, string, color, fontname) { //this is really messy but it does the job
	Render.StringCustom(x - 1, y - 1, align, string, [0, 0, 0, 255], fontname);
	Render.StringCustom(x - 1, y, align, string, [0, 0, 0, 255], fontname);
	Render.StringCustom(x - 1, y + 1, align, string, [0, 0, 0, 255], fontname);
	
	Render.StringCustom(x, y + 1, align, string, [0, 0, 0, 255], fontname);
	Render.StringCustom(x, y - 1, align, string, [0, 0, 0, 255], fontname);
	
	Render.StringCustom(x + 1, y - 1, align, string, [0, 0, 0, 255], fontname);
	Render.StringCustom(x + 1, y, align, string, [0, 0, 0, 255], fontname);
	Render.StringCustom(x + 1, y + 1, align, string, [0, 0, 0, 255], fontname);
	
	Render.StringCustom(x, y, align, string, color, fontname);
}

function getVelocity(index)
{
    var velocity = Entity.GetProp( index, "CBasePlayer", "m_vecVelocity[0]" );
    return Math.sqrt( velocity[0] * velocity[0] + velocity[1] * velocity[1] );
}



//Draw
function HUD_REDRAW() {
		    if (!Entity.GetLocalPlayer() || !Entity.IsAlive(Entity.GetLocalPlayer()) || !Entity.IsValid(Entity.GetLocalPlayer()))
        return;
	var local = Entity.GetLocalPlayer();
		var sint = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "y offset")
	var Air;
	Air = 0;
	if(in_air(local) || Global.IsKeyPressed((0x20))){
	Air = 8;
	}
	if(UI.GetValue("CrimLag (crash)")){
	Air = 0;
	}
    if (UI.GetValue("Rage", "GENERAL", "Enabled")) {
        if (UI.GetValue("Rage", "GENERAL", "Exploits", "Doubletap")) {
            font = Render.AddFont("Verdana", 18, 700);

            var antiaim;
            if (UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Enabled") || UI.GetValue("Anti-Aim", "Legit Anti-Aim", "Enabled")) {
                antiaim = 0;
            } else {
                antiaim = 31;
            }
			
			const yaw = local_get_real_yaw(),
            fake = local_get_fake_yaw();
            var delta = Math.round(normalize_yaw(yaw - fake) / 2),
                abs = Math.abs(delta);
			var up1;
			up1 = 0;
           if (!UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Enabled") && !UI.GetValue("Anti-Aim", "Legit Anti-Aim", "Enabled")){
                up1 = 31;
           }
			dick = 0;
			 if (!UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Enabled") && !UI.GetValue("Anti-Aim", "Legit Anti-Aim", "Enabled")) {
				 dick = 7;
			 }
				 
			 const y = render_get_screen_size()[1];
            //Enabled
    }
}
	
    iLocalPlayer = Entity.GetLocalPlayer();

    if (!Entity.IsValid(iLocalPlayer)) return;

    //Weapons
    iWeapon = Entity.GetWeapon(iLocalPlayer);
    iWeapon_name = Entity.GetName(iWeapon);

    framerate = 1 / Global.Frametime();
    fps = Math.floor(framerate);

    current_map = World.GetMapName();
}
function Main() {
    //  callbacks
    Global.RegisterCallback("Draw", "HUD_REDRAW");
    //Global.RegisterCallback("Draw", "draw_timer");
    Global.RegisterCallback("Draw", "do_indicators1");
    Global.RegisterCallback("weapon_fire", "EVENT_WEAPON_FIRE");
    Cheat.RegisterCallback("CreateMove", "_TBC_CREATE_MOVE");
    Cheat.RegisterCallback("Unload", "_TBC_UNLOAD");
}
Main();