UI.AddHotkey('HC Override')
UI.AddSliderInt('Heavy HC', 0, 100)
UI.AddSliderInt('Scout HC', 0, 100)
UI.AddSliderInt('AWP HC', 0, 100)
UI.AddSliderInt('Auto HC', 0, 100)
var heavyC = UI.GetValue('Rage', 'HEAVY PISTOL', 'Accuracy', 'Hitchance')
var scoutC = UI.GetValue('Rage', 'SCOUT', 'Accuracy', 'Hitchance')
var awpC = UI.GetValue('Rage', 'AWP', 'Accuracy', 'Hitchance')
var scarC = UI.GetValue('Rage', 'AUTOSNIPER', 'Accuracy', 'Hitchance')
function hcOverride() {
var heavy = UI.GetValue('Misc', 'JAVASCRIPT', 'Script items', 'Heavy HC')
var scout = UI.GetValue('Misc', 'JAVASCRIPT', 'Script items', 'Scout HC')
var awp = UI.GetValue('Misc', 'JAVASCRIPT', 'Script items', 'AWP HC')
var scar = UI.GetValue('Misc', 'JAVASCRIPT', 'Script items', 'Auto HC')
var localPlayer = Entity.GetLocalPlayer()
var localWeapon = Entity.GetWeapon(localPlayer)
var weaponName = Entity.GetName(localWeapon)
if (UI.IsHotkeyActive('Misc', 'JAVASCRIPT', 'Script items', 'HC Override') && weaponName == 'desert eagle' || weaponName == 'r8 revolver') {
UI.SetValue('Rage', 'HEAVY PISTOL', 'Accuracy', 'Hitchance', heavy)
} else {
UI.SetValue('Rage', 'HEAVY PISTOL', 'Accuracy', 'Hitchance', heavyC)
}
if (UI.IsHotkeyActive('Misc', 'JAVASCRIPT', 'Script items', 'HC Override') && weaponName == 'ssg 08') {
UI.SetValue('Rage', 'SCOUT', 'Accuracy', 'Hitchance', scout)
} else {
UI.SetValue('Rage', 'SCOUT', 'Accuracy', 'Hitchance', scoutC)
}
if (UI.IsHotkeyActive('Misc', 'JAVASCRIPT', 'Script items', 'HC Override') && weaponName == 'awp') {
UI.SetValue('Rage', 'AWP', 'Accuracy', 'Hitchance', awp)
} else {
UI.SetValue('Rage', 'AWP', 'Accuracy', 'Hitchance', awpC)
}
if (UI.IsHotkeyActive('Misc', 'JAVASCRIPT', 'Script items', 'HC Override') && weaponName == 'scar 20' || weaponName == 'g3sg1') {
UI.SetValue('Rage', 'AUTOSNIPER', 'Accuracy', 'Hitchance', scar)
} else {
UI.SetValue('Rage', 'AUTOSNIPER', 'Accuracy', 'Hitchance', scarC)
}
}
Cheat.RegisterCallback('CreateMove', 'hcOverride')