UI.AddHotkey("Min damage button");
UI.AddSliderInt("Heavy pistol", 1, 100);
UI.AddSliderInt("Scout", 1, 100);
UI.AddSliderInt("Awp", 1, 100);
UI.AddSliderInt("Autosnipers", 1, 100);
var heavy_cache = UI.GetValue("Rage", "HEAVY PISTOL", "Targeting", "Minimum damage");
var scout_cache = UI.GetValue("Rage", "SCOUT", "Targeting", "Minimum damage");
var awp_cache = UI.GetValue("Rage", "AWP", "Targeting", "Minimum damage");
var auto_cache = UI.GetValue("Rage", "AUTOSNIPER", "Targeting", "Minimum damage");

function minimumdamage() {
  var heavy_mindmg = UI.GetValue("Script Items", "Heavy pistol");
  var scout_mindmg = UI.GetValue("Script Items", "Scout");
  var awp_mindmg = UI.GetValue("Script Items", "Awp");
  var auto_mindmg = UI.GetValue("Script Items", "Autosnipers");
  var isKeyActive = UI.IsHotkeyActive("Script Items", "Min damage button");
  if (isKeyActive == true) {
    UI.SetValue("Rage", "HEAVY PISTOL", "Targeting", "Minimum damage", heavy_mindmg );
    UI.SetValue("Rage", "SCOUT", "Targeting", "Minimum damage", scout_mindmg );
    UI.SetValue("Rage", "AWP", "Targeting", "Minimum damage", awp_mindmg );
    UI.SetValue("Rage", "AUTOSNIPER", "Targeting", "Minimum damage", auto_mindmg );
  } else {
    UI.SetValue("Rage", "HEAVY PISTOL", "Targeting", "Minimum damage", heavy_cache );
    UI.SetValue("Rage", "SCOUT", "Targeting", "Minimum damage", scout_cache );
    UI.SetValue("Rage", "AWP", "Targeting", "Minimum damage", awp_cache );
    UI.SetValue("Rage", "AUTOSNIPER", "Targeting", "Minimum damage", auto_cache );
  }
}

Cheat.RegisterCallback("CreateMove", "minimumdamage")
