UI.AddHotkey("Damage Override")
UI.AddSliderInt("Minimum Damage Override", 0, 130)
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")
var pistol_cache = UI.GetValue("Rage", "PISTOL", "Targeting", "Minimum damage")
var other_cache = UI.GetValue("Rage", "GENERAL", "Targeting", "Minimum damage")
function setValue(cat, value)
{
UI.SetValue("Rage", cat.toUpperCase(), "Targeting", "Minimum damage", value)
}
function damage_override()
{
if (UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script Items", "Damage Override"))
{
setValue("HEAVY PISTOL", UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Minimum Damage Override"))
setValue("SCOUT", UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Minimum Damage Override"))
setValue("AWP", UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Minimum Damage Override"))
setValue("AUTOSNIPER", UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Minimum Damage Override"))
setValue("PISTOL", UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Minimum Damage Override"))
setValue("GENERAL", UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Minimum Damage Override"))
}
else
{
setValue("HEAVY PISTOL", heavy_cache)
setValue("SCOUT", scout_cache)
setValue("AWP", awp_cache)
setValue("AUTOSNIPER", auto_cache)
setValue("PISTOL", pistol_cache)
setValue("GENERAL", other_cache)
}
}
Cheat.RegisterCallback("CreateMove", "damage_override")