//
// By iDesync, for YouGame.biz
//
const size = Render.GetScreenSize();
//-------------------------MENU STUFF-------------------------//
UI.AddLabel("|--------------------------------------------|");
//---label & hotkey---//
UI.AddCheckbox("Enable Override Damage");
UI.AddHotkey("d_Bind");
//---//
//---sliders---//
UI.AddSliderInt("SCOUT", 0, 120);
UI.AddSliderInt("AWP", 0, 120);
UI.AddSliderInt("AUTOSNIPER", 0, 120);
UI.AddSliderInt("PISTOL", 0, 120);
UI.AddSliderInt("HEAVY PISTOL", 0, 120);
//---//
//---position---//
UI.AddCheckbox("d_Custom position");
UI.AddLabel("d_Indicator Position:");
//---//
//---val---//
UI.AddSliderInt("d_Height:", 0, size[0]);
UI.AddSliderInt("d_Width:", 0, size[1]);
//---//
UI.AddLabel("|--------------------------------------------|");
//--------------------------------------------SAMPLE FUNCTION------------------------------------------------------//
function SetValue(weapon, value) {
UI.SetValue("Rage", weapon, "Targeting", "Minimum damage", value);
}
//--------------------------------------------BACKUP VALUES------------------------------------------------------//
const cache = [ UI.GetValue("Rage", "AWP", "Targeting", "Minimum damage"), // [0]
UI.GetValue("Rage", "SCOUT", "Targeting", "Minimum damage"), // [1]
UI.GetValue("Rage", "AUTOSNIPER", "Targeting", "Minimum damage"), // [2]
UI.GetValue("Rage", "PISTOL", "Targeting", "Minimum damage"), // [3]
UI.GetValue("Rage", "HEAVY PISTOL", "Targeting", "Minimum damage") ]; // [4]
//------------------------------------------------WEAPONS CHECKS------------------------------------------------------//
//--------IS PISTOL--------//
function isPistol() {
if (weapon_name == "usp s" || weapon_name == "dual berettas" || weapon_name == "p250" || weapon_name == "cz75 auto" || weapon_name == "glock 18")
return true;
}
//--------IS HEAVY PISTOL--------//
function isHeavy() {
if (weapon_id == 64 /*revolver*/ || weapon_name == "desert eagle")
return true;
}
//--------IS AUTOSNIPER--------//
function isAuto() {
if (weapon_name == "g3sg1" || weapon_name == "scar 20")
return true;
}
//----------------------------------------------DO WORK-----------------------------------------------------//
function SetupValues()
{
weapon_name = Entity.GetName(Entity.GetWeapon(Entity.GetLocalPlayer())); // updates current weapon
weapon_id = Entity.GetWeapon(Entity.GetLocalPlayer());
isKeyPressed = UI.IsHotkeyActive("MISC", "JAVASCRIPT", "SCRIPT ITEMS", "Key");
//-------------------------GET VALUES-------------------------//
var values = [ UI.GetValue("Misc", "JAVASCRIPT", "Script items", "AWP"), // [0]
UI.GetValue("Misc", "JAVASCRIPT", "Script items", "SCOUT"), // [1]
UI.GetValue("Misc", "JAVASCRIPT", "Script items", "PISTOL"), // [2]
UI.GetValue("Misc", "JAVASCRIPT", "Script items", "AUTOSNIPER"), // [3]
UI.GetValue("Misc", "JAVASCRIPT", "Script items", "HEAVY PISTOL") ]; // [4]
if (!isKeyPressed)
return;
//-------------------------SETUP VALUES-------------------------//
//---AWP---//
if (weapon_name == "awp") // [0]
SetValue("AWP", values[0]);
else
SetValue("AWP", cache[0]);
//---SCOUT---//
if (weapon_name == "ssg 08") // [1]
SetValue("SCOUT", values[1]);
else
SetValue("SCOUT", cache[1]);
//---AUTOSNIPER---//
if (isAuto()) // [2]
SetValue("AUTOSNIPER", values[2]);
else
SetValue("AUTOSNIPER", cache[2]);
//---PISTOLS---//
if (isPistol()) // [3]
SetValue("PISTOL", values[3]);
else
SetValue("PISTOL", cache[3]);
//---HEAVY PISTOLS---//
if (isHeavy()) // [4]
SetValue("HEAVY PISTOL", values[4]);
else
SetValue("HEAVY PISTOL", cache[4]);
}
function indicator()
{
if (!Entity.IsAlive(Entity.GetLocalPlayer()))
return;
var X = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "d_Height:"); // update values
var Y = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "d_Width:"); // from us sliders
//-----------------------------GET VALUES-------------------------------//
scout = "DMG: " + UI.GetValue("Rage", "SCOUT", "Targeting", "Minimum damage");
awp = "DMG: " + UI.GetValue("Rage", "AWP", "Targeting", "Minimum damage");
auto = "DMG: " + UI.GetValue("Rage", "AUTOSNIPER", "Targeting", "Minimum damage");
pistol = "DMG: " + UI.GetValue("Rage", "PISTOL", "Targeting", "Minimum damage");
heavy = "DMG: " + UI.GetValue("Rage", "HEAVY PISTOL", "Targeting", "Minimum damage");
//-------------------------WEAPONS CHECK-------------------------//
if (isHeavy())
string = heavy;
if (isAuto())
string = auto;
if (isPistol())
string = pistol;
if (weapon_name == "ssg 08")
string = scout;
if (weapon_name == "awp")
string = awp;
//-------------------------RENDER-------------------------//
if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "d_Custom position"))
Render.String(X, Y, 0, string, [255, 255, 255, 255]);
else
Render.String(size[0] / 2, size[1] / 2 + 400, 0, string, [255, 255, 255, 255]);
}
Cheat.RegisterCallback("CreateMove", "SetupValues");
Cheat.RegisterCallback("Draw", "indicator");