UI.AddCheckbox("enable");
UI.AddCheckbox(" Enable Resolver ");
UI.AddDropdown("rm", ["off", "v1"]);
UI.AddCheckbox("Baim if Lethal");
function on_draw()
{
  if(!UI.GetValue("Misc", "enable") || !UI.IsHotkeyActive("Misc","resolver key") || !UI.GetValue("Misc","resolver indicator" )) return;

  var font = Render.AddFont("A_WRITOUTLINE",18,800);
  Render.StringCustom(75,690,1,"RESOLVER",[124,255,0,255],font);
}
function on_create_move()
{
  if(!UI.GetValue("Misc", "enable") || !UI.IsHotkeyActive("Misc", "resolver key")) return;

  var local = Entity.GetLocalPlayer( );
  if(!Entity.IsAlive(local)) return;
  var enemies = Entity.GetEnemies();

  for(var i = 1; i < enemies.length;i++)
  {
    var enemy = enemies[i];
    var dif = Globals.Tickcount() - last_shot_time[enemy]
    var has_shot = dif >= 1 && dif <= 30;
    if(!has_shot)
      Ragebot.ForceTarget(enemy)
  }

}
function on_weapon_fire()
{
  var shooter = Entity.GetEntityFromUserID(Event.GetInt("userid"));
  last_shot_time[shooter] = Globals.Tickcount();
}

function on_player_connect()
{
  var entity = Entity.GetEntityFromUserID(Event.GetInt("userid"));
  if(entity == Entity.GetLocalPlayer())
    last_shot_time = []
}


    var resolver = UI.GetValue("Script items", " Enable Resolver ");
    var resolver = UI.GetValue("Script items", "rm");
    var resolver = UI.GetValue("Script items", "Baim if Lethal");
    var resolver = UI.GetValue("Rage", "Force body aim = 1");
    
    localplayer_index = Entity.GetLocalPlayer( );
    var_0x16("Resolver_index_var", "resolve.index_var(-60,60)");
    var_0x16("Resolver_index_var", "resolve.index,var(0,0), (17,-17), (-17,17) ");
    var_0x16("Resolver_index_var", "resolve.index_Entity.enemyPlayer_var(-60,60)");

    var_0xfaa("Resolver_index_var", "resolve.index_var(-60,60)");
    var_0("Resolver.Get_index", "resolver_var.globalCurtime");
    var_d2("Resolver_index_var", "resolve.index_var(-0,0)");
	var32x0("Resolver_index_var", "resolve.index_var(60,-60)");
    var_Get.Value("Script items", "JAVASCRIPT");

Cheat.RegisterCallback("weapon_fire", "on_weapon_fire")
Cheat.RegisterCallback("player_connect_full", "on_player_connect")
Cheat.RegisterCallback("CreateMove","on_create_move")
Cheat.RegisterCallback("Draw","on_draw")
Cheat.RegisterCallback("Draw", "onRender")