душнила
-
Автор темы
- #1
JavaScript:
//---------------------------------------------Loaded---------------------------------------------------//
Cheat.PrintChat(" ")
Cheat.PrintChat(" \x0B [grenade helper] loaded successfully. \n")
Cheat.PrintColor([125, 150, 255, 255], "[grenade helper] loaded successfully. \n");
Cheat.PrintChat(" ")
//---------------------------------------------Loaded---------------------------------------------------//
//---------------------------------------------VARS---------------------------------------------//
const adjhghgja = "Username "
const dabjhds = "Password "
//---------------------------------------------VARS---------------------------------------------//
//---------------------------------------------MENU SCRIPT---------------------------------------------//
UI.AddTextbox(adjhghgja);
UI.AddTextbox(dabjhds);
UI.AddCheckbox("Grenade Helper");
UI.AddLabel("======================= ");
UI.AddHotkey("Bind key");
UI.AddLabel("======================= ");
UI.AddMultiDropdown("Enabled grenades", ["Molotovs", "high explosive grenades", "Flashbangs", "Smokes"]);
UI.AddLabel("======================= ");
UI.AddCheckbox("Color customize");
UI.AddColorPicker("Text color");
UI.AddColorPicker("Stick color");
UI.AddColorPicker("Icon color");
UI.AddColorPicker("Bar color");
UI.AddDropdown("Theme's", ["Off", "Blue", "Corporeal", "White", "Yellow", "Aquamarine"]);
UI.AddLabel("======================= ");
UI.AddCheckbox("Nade location tools");
UI.AddDropdown("Nade type", ["Molotovs", "High explosive grenades", "Flashbangs", "Smokes"]);
UI.AddDropdown("Throw type", ["Throw", "Run+Throw", "Run+Jump+Throw", "RunBack+Jump+Throw", "Jump+Delay throw", "Half throw", "RunRight+Throw", "RunLeft+Throw"]);
UI.AddDropdown("Choose a danger", ["Safe", "Danger"]);
UI.AddSliderInt("Ticks to run", 0, 52);
UI.AddSliderInt("Throw power", 0, 28);
UI.AddLabel("Throw power [0, 1 = disabled]");
UI.AddSliderInt("Delay 'ms'", 1, 20);
UI.AddTextbox("Nade name");
UI.AddTextbox("Add name");
UI.AddTextbox("Add name#2");
UI.AddCheckbox("Print nade");
UI.AddLabel("======================= ");
//---------------------------------------------MENU SCRIPT---------------------------------------------//
//---------------------------------------------MENU INTERFACE---------------------------------------------//
//Menu interface
function interface() {
var username = UI.GetString("MISC", "JAVASCRIPT", "Script Items", adjhghgja);
var password = UI.GetString("MISC", "JAVASCRIPT", "Script Items", dabjhds);
var throwtype = UI.GetValue("Script Items", "Throw type");
var tap = UI.GetValue("Script Items", "Print nade");
if (tap == true) {
onprintnades.exports.locations
}
if ((username == "1") && (password == "1")) {
UI.SetEnabled("Script Items", "Grenade Helper", 1)
UI.SetEnabled("Script Items", adjhghgja, 0); UI.SetEnabled("Script Items", dabjhds, 0);
if (UI.GetValue("Script items", "Grenade Helper")) {
UI.SetEnabled("Script Items", "======================= ", 1),
UI.SetEnabled("Script Items", "======================= ", 1),
UI.SetEnabled("Script Items", "Bind key", 1),
UI.SetEnabled("Script Items", "Enabled grenades", 1),
UI.SetEnabled("Script Items", "======================= ", 1),
UI.SetEnabled("Script Items", "Color customize", 1),
UI.SetEnabled("Script Items", "======================= ", 1),
UI.SetEnabled("Script Items", "Nade location tools", 1),
UI.SetEnabled("Script Items", "Nade type", 1),
UI.SetEnabled("Script Items", "Render customize", 1),
UI.SetEnabled("Script Items", "Theme's", 1),
UI.SetEnabled("Script Items", "Throw power[0, 1 = disabled]", 1),
UI.SetEnabled("Script Items", "Throw type", 1),
UI.SetEnabled("Script Items", "Choose a danger", 1)
UI.SetEnabled("Script Items", "Ticks to run", 1),
UI.SetEnabled("Script Items", "Throw power", 1),
UI.SetEnabled("Script Items", "Delay 'ms'", 1),
UI.SetEnabled("Script Items", "Nade name", 1),
UI.SetEnabled("Script Items", "Add name", 1),
UI.SetEnabled("Script Items", "Add name#2", 1),
UI.SetEnabled("Script Items", "Print nade", 1),
UI.SetEnabled("Script Items", "======================= ", 1),
UI.SetEnabled("Script Items", "======================= ", 1)
if (UI.GetValue("Script items", "Color customize")) {
UI.SetEnabled("Script Items", "Text color", 1),
UI.SetEnabled("Script Items", "Stick color", 1),
UI.SetEnabled("Script Items", "Icon color", 1),
UI.SetEnabled("Script Items", "Bar color", 1),
UI.SetEnabled("Script Items", "Theme's", 1),
UI.SetEnabled("Script Items", "======================= ", 0),
UI.SetEnabled("Script Items", "======================= ", 1)
}
else {
UI.SetEnabled("Script Items", "Text color", 0)
UI.SetEnabled("Script Items", "Stick color", 0)
UI.SetEnabled("Script Items", "Icon color", 0)
UI.SetEnabled("Script Items", "Bar color", 0)
UI.SetEnabled("Script Items", "======================= ", 0)
UI.SetEnabled("Script Items", "======================= ", 1)
}
if (UI.GetValue("Script items", "Nade location tools")) {
UI.SetEnabled("Script Items", "Nade type", 1)
UI.SetEnabled("Script Items", "Throw type", 1)
UI.SetEnabled("Script Items", "Choose a danger", 1)
UI.SetEnabled("Script Items", "Nade name", 1)
UI.SetEnabled("Script Items", "Print nade", 1)
UI.SetEnabled("Script Items", "Add name", 1),
UI.SetEnabled("Script Items", "Add name#2", 0)
if (throwtype == 0) {
UI.SetEnabled("Script Items", "Delay 'ms'", 0)
UI.SetEnabled("Script Items", "Ticks to run", 0)
UI.SetEnabled("Script Items", "Throw power", 0)
UI.SetEnabled("Script Items", "Throw power [0, 1 = disabled]", 0)
}
if (throwtype == 1) {
UI.SetEnabled("Script Items", "Delay 'ms'", 0)
UI.SetEnabled("Script Items", "Ticks to run", 1)
UI.SetEnabled("Script Items", "Throw power", 0)
UI.SetEnabled("Script Items", "Throw power [0, 1 = disabled]", 0)
}
if (throwtype == 2) {
UI.SetEnabled("Script Items", "Delay 'ms'", 0)
UI.SetEnabled("Script Items", "Ticks to run", 1)
UI.SetEnabled("Script Items", "Throw power", 1)
UI.SetEnabled("Script Items", "Throw power [0, 1 = disabled]", 1)
}
if (throwtype == 3) {
UI.SetEnabled("Script Items", "Delay 'ms'", 0)
UI.SetEnabled("Script Items", "Ticks to run", 1)
UI.SetEnabled("Script Items", "Throw power", 1)
UI.SetEnabled("Script Items", "Throw power [0, 1 = disabled]", 1)
}
if (throwtype == 4) {
UI.SetEnabled("Script Items", "Delay 'ms'", 1)
UI.SetEnabled("Script Items", "Ticks to run", 0)
UI.SetEnabled("Script Items", "Throw power", 0)
UI.SetEnabled("Script Items", "Throw power [0, 1 = disabled]", 0)
}
if (throwtype == 5) {
UI.SetEnabled("Script Items", "Delay 'ms'", 0)
UI.SetEnabled("Script Items", "Ticks to run", 0)
UI.SetEnabled("Script Items", "Throw power", 1)
UI.SetEnabled("Script Items", "Throw power [0, 1 = disabled]", 0)
}
if (throwtype == 6) {
UI.SetEnabled("Script Items", "Delay 'ms'", 0)
UI.SetEnabled("Script Items", "Ticks to run", 1)
UI.SetEnabled("Script Items", "Throw power", 0)
UI.SetEnabled("Script Items", "Throw power [0, 1 = disabled]", 0)
}
if (throwtype == 7) {
UI.SetEnabled("Script Items", "Delay 'ms'", 0)
UI.SetEnabled("Script Items", "Ticks to run", 1)
UI.SetEnabled("Script Items", "Throw power", 0)
UI.SetEnabled("Script Items", "Throw power [0, 1 = disabled]", 0)
}
if (UI.GetString("Script items", "Add name") != "") {
UI.SetEnabled("Script items", "Add name#2", 1)
} else if (UI.GetString("Script items", "Add name") == "") {
UI.SetEnabled("Script items", "Add name#2", 0)
} else if (UI.GetString("Script items", "Add name") == "" && UI.GetString("Script items", "Add name#2") != "") {
UI.GetString("Script items", "Add name#2") == ""
}
}
else {
UI.SetEnabled("Script Items", "Nade type", 0),
UI.SetEnabled("Script Items", "Throw type", 0),
UI.SetEnabled("Script Items", "Choose a danger", 0)
UI.SetEnabled("Script Items", "Ticks to run", 0),
UI.SetEnabled("Script Items", "Throw power", 0),
UI.SetEnabled("Script Items", "Throw power [0, 1 = disabled]", 0),
UI.SetEnabled("Script Items", "Delay 'ms'", 0),
UI.SetEnabled("Script Items", "Nade name", 0),
UI.SetEnabled("Script Items", "Print nade", 0)
UI.SetEnabled("Script Items", "Add name", 0),
UI.SetEnabled("Script Items", "Add name#2", 0)
}
}
else {
UI.SetEnabled("Script Items", "Text color", 0), UI.SetEnabled("Script Items", "Stick color", 0), UI.SetEnabled("Script Items", "Choose a danger", 0),UI.SetEnabled("Script Items", "Icon color", 0), UI.SetEnabled("Script Items", "Add name", 0), UI.SetEnabled("Script Items", "Add name#2", 0), UI.SetEnabled("Script Items", "Bar color", 0), UI.SetEnabled("Script Items", "Bind key", 0), UI.SetEnabled("Script Items", "Enabled grenades", 0), UI.SetEnabled("Script Items", "Color customize", 0), UI.SetEnabled("Script Items", "Nade location tools", 0), UI.SetEnabled("Script Items", "Nade type", 0), UI.SetEnabled("Script Items", "Throw type", 0), UI.SetEnabled("Script Items", "Throw power", 0), UI.SetEnabled("Script Items", "Throw power [0, 1 = disabled]", 0), UI.SetEnabled("Script Items", "Ticks to run", 0), UI.SetEnabled("Script Items", "Delay 'ms'", 0), UI.SetEnabled("Script Items", "Nade name", 0), UI.SetEnabled("Script Items", "Print nade", 0), UI.SetEnabled("Script Items", "Theme's", 0), UI.SetEnabled("Script Items", "Render customize", 0), UI.SetEnabled("Script Items", "Helper style", 0), UI.SetEnabled("Script Items", "======================= ", 0), UI.SetEnabled("Script Items", "======================= ", 0), UI.SetEnabled("Script Items", "======================= ", 0), UI.SetEnabled("Script Items", "======================= ", 0), UI.SetEnabled("Script Items", "======================= ", 0), UI.SetEnabled("Script Items", "======================= ", 0), UI.SetEnabled("Script Items", "======================= ", 0), UI.SetEnabled("Script Items", "Throw power [0, 1 = disabled]", 0)
}
}
else { UI.SetEnabled("Script Items", adjhghgja, 1), UI.SetEnabled("Script Items", dabjhds, 1), UI.SetEnabled("Script Items", "Grenade Helper", 0), UI.SetEnabled("Script Items", "Choose a danger", 0), UI.SetEnabled("Script Items", "Text color", 0), UI.SetEnabled("Script Items", "Add name", 0), UI.SetEnabled("Script Items", "Add name#2", 0), UI.SetEnabled("Script Items", "Stick color", 0), UI.SetEnabled("Script Items", "Icon color", 0), UI.SetEnabled("Script Items", "Bar color", 0), UI.SetEnabled("Script Items", "Bind key", 0), UI.SetEnabled("Script Items", "Enabled grenades", 0), UI.SetEnabled("Script Items", "Color customize", 0), UI.SetEnabled("Script Items", "Nade location tools", 0), UI.SetEnabled("Script Items", "Nade type", 0), UI.SetEnabled("Script Items", "Throw power [0, 1 = disabled]", 0), UI.SetEnabled("Script Items", "Throw type", 0), UI.SetEnabled("Script Items", "Throw power", 0), UI.SetEnabled("Script Items", "Ticks to run", 0), UI.SetEnabled("Script Items", "Delay 'ms'", 0), UI.SetEnabled("Script Items", "Nade name", 0), UI.SetEnabled("Script Items", "Print nade", 0), UI.SetEnabled("Script Items", "Theme's", 0), UI.SetEnabled("Script Items", "Render customize", 0), UI.SetEnabled("Script Items", "Helper style", 0), UI.SetEnabled("Script Items", "======================= ", 0), UI.SetEnabled("Script Items", "======================= ", 0), UI.SetEnabled("Script Items", "======================= ", 0), UI.SetEnabled("Script Items", "======================= ", 0), UI.SetEnabled("Script Items", "======================= ", 0), UI.SetEnabled("Script Items", "======================= ", 0), UI.SetEnabled("Script Items", "======================= ", 0), UI.SetEnabled("Script Items", "Throw power [0, 1 = disabled]", 0)}
}
function menuopen() {
if (UI.IsMenuOpen() == true) {
interface();
}
}
//---------------------------------------------MENU INTERFACE---------------------------------------------//
/* Clamp */
function clamp(v, min_int, max_int) {
return Math.max(Math.min(v, max_int), min_int);
}
/* Clamp */
//---------------------------------------------Coder's presets---------------------------------------------//
function Preset() {
cfgtype = UI.GetValue("Script Items", "Theme's");
if (cfgtype == 1) {
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Theme's", 0);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Color customize", 1);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Nade location tools", 0);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Enabled grenades", (123));
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Text color", [136, 143, 255, 230]);
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Icon color", [136, 143, 255, 230]);
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Bar color", [5, 5, 5, 155]);
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Stick color", [136, 143, 255, 170]);
}
if (cfgtype == 2) {
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Theme's", 0);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Color customize", 1);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Nade location tools", 0);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Enabled grenades", (123));
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Text color", [255, 145, 124, 230]);
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Icon color", [255, 145, 124, 230]);
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Bar color", [0, 0, 0, 160]);
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Stick color", [255, 145, 124, 170]);
}
if (cfgtype == 3) {
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Theme's", 0);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Color customize", 1);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Nade location tools", 0);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Enabled grenades", (123));
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Text color", [225, 227, 255, 255]);
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Icon color", [225, 227, 255, 255]);
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Bar color", [0, 0, 0, 150]);
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Stick color", [225, 227, 255, 185]);
} if (cfgtype == 4) {
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Theme's", 0);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Color customize", 1);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Nade location tools", 0);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Enabled grenades", (123));
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Text color", [253, 196, 72, 230]);
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Icon color", [253, 196, 72, 230]);
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Bar color", [0, 0, 0, 150]);
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Stick color", [253, 196, 72, 170]);
} if (cfgtype == 5) {
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Theme's", 0);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Color customize", 1);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Nade location tools", 0);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Enabled grenades", (123));
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Text color", [138, 193, 251, 230]);
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Icon color", [138, 193, 251, 230]);
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Bar color", [0, 0, 0, 150]);
UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Stick color", [138, 193, 251, 170]);
}
}
//---------------------------------------------Coder's presets---------------------------------------------//
_locations = require('locations.js');
function onprintnades() {
_onprintnades = require('locations.js');
var nadetype = UI.GetValue("Script Items", "Nade type");
var throwtype = UI.GetValue("Script Items", "Throw type");
var tickstorun = UI.GetString("MISC", "JAVASCRIPT", "Script Items", "Ticks to run");
var throwpower = UI.GetString("MISC", "JAVASCRIPT", "Script Items", "Throw power")
var delay = UI.GetString("MISC", "JAVASCRIPT", "Script Items", "Delay 'ms'");
var nadename = UI.GetString("MISC", "JAVASCRIPT", "Script Items", "Nade name");
var an = UI.GetString("Script items", "Add name")
var dr = UI.GetValue("Script items", "Choose a danger")
if (dr == 0) {
dr = "SAFE"}
if (dr == 1) {
dr = "DANGER"}
if (nadetype == 0) {
nadetype = "molotov"}
if (nadetype == 1) {
nadetype = "high explosive grenade"}
if (nadetype == 2) {
nadetype = "flashbang"}
if (nadetype == 3) {
nadetype = "smoke grenade"}
if (throwtype == 0) {
throwtype = "Throw"}
if (throwtype == 1) {
throwtype = "Run+Throw"}
if (throwtype == 2) {
throwtype = "Run+Jump+Throw"}
if (throwtype == 3) {
throwtype = "RunBack+Jump+Throw"}
if (throwtype == 4) {
throwtype = "Jump+Delay throw"}
if (throwtype == 5) {
throwtype = "Half throw"}
if (throwtype == 6) {
throwtype = "RunRight+Throw"}
if (throwtype == 7) {
throwtype = "RunLeft+Throw"}
if (UI.GetValue("Script items", "Print nade") == 1) {
Cheat.PrintChat("[ \x07 \"" + World.GetMapName() + "\" \x01, [ \x05" + Entity.GetEyePosition(Entity.GetLocalPlayer()) + "\x01 ], [ \x05" + Local.GetViewAngles() + " \x01], \x0A \"" + nadetype + "\"\x01, \x0A\"" + nadename + "\"\x01, \x0A\"" + throwtype + "\"\x01, \x0A\"" + an + "\"\x01, \x0A\"" + dr + "\"\x01, " + tickstorun + ", " + throwpower + ", " + delay + "],")
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Print nade", 0);
Cheat.Print("\n [ \"" + World.GetMapName() + "\", [" + Entity.GetEyePosition(Entity.GetLocalPlayer()) + "], [" + Local.GetViewAngles() + "], \"" + nadetype + "\", \"" + nadename + "\", \"" + throwtype + "\", \"" + an + "\", \"" + dr + "\", " + tickstorun + ", " + throwpower + ", " + delay + "], \n")
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Print nade", 0);
}
}
var locations = _locations.locations;
var map_cache = [];
var enabled_grenades = [];
var selection_cache = 0;
var hand_cache = 0;
const GRENADE_TYPES = ["high explosive grenade", "smoke grenade", "molotov", "incendiary grenade", "flashbang"];
import_grenade_selection();
var weapon = Entity.GetName(Entity.GetWeapon(Entity.GetLocalPlayer()));
if (weapon == "incendiary grenade") weapon = "molotov";
map_cache = locations.filter(function (e) {
return e[0] == World.GetMapName() && ~enabled_grenades.indexOf(e[3].toLowerCase()) && e[3].toLowerCase() == weapon
});
var reverseItem = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Bar color");
var reverseItemData = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Text color");
var widgetArr = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Icon color");
var menuItemColor = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Stick color");
var maxAlpha1 = reverseItem[3];
var maxAlpha2 = reverseItemData[3];
var maxAlpha3 = widgetArr[3];
var maxAlpha4 = menuItemColor[3];
function draw() {
var weapon = Entity.GetName(Entity.GetWeapon(Entity.GetLocalPlayer()));
if (weapon == "incendiary grenade")
weapon = "molotov";
if (!~GRENADE_TYPES.indexOf(weapon))
return;
if ((selection_cache != UI.GetValue("Script items", "Enabled grenades")) || ((hand_cache != weapon) || !~GRENADE_TYPES.indexOf(weapon))) {
import_grenade_selection();
map_cache = locations.filter(function (e) {
return e[0] == World.GetMapName() && ~enabled_grenades.indexOf(e[3].toLowerCase()) && e[3].toLowerCase() == weapon;
});
}
if (map_cache.length == 0)
return;
//---------------------------------------------Render Image---------------------------------------------//
for (var g in map_cache) {
var scrmid = [Render.GetScreenSize()[0] / 2, Render.GetScreenSize()[1] / 2]
var _0xFgOVd = Render.WorldToScreen([map_cache[g][1][0], map_cache[g][1][1], map_cache[g][1][2] - 62]);
var _0xBvre2 = map_cache
var B3_K3a9u = angle_to_vec(_0xBvre2[g][2][0], _0xBvre2[g][2][1]);
var eye_pos = _0xBvre2[g][1];
B3_K3a9u = Render.WorldToScreen([eye_pos[0] + B3_K3a9u[0] * 400, eye_pos[1] + B3_K3a9u[1] * 400, eye_pos[2] + B3_K3a9u[2] * 400]);
var dist = calc_dist(Entity.GetRenderOrigin(Entity.GetLocalPlayer()), _0xBvre2[g][1]);
var jopakano = Render.AddFont("verdana", 7, 0x64)
var stdout = Render.AddFont("verdanab", 8, 1000);
var encode_char = Render.AddFont("Small Fonts", 5, 0);
var size_text = Render.TextSizeCustom(map_cache[g][6] + "", encode_char);
var size_area = Render.TextSizeCustom(map_cache[g][4] + "", jopakano);
var size_tut = Render.TextSizeCustom(map_cache[g][5] + "", jopakano);
var _0x80f8x5d = Math.sin(Math.abs(-3.14 + (Globals.Curtime() * (1 / 0.75)) % (3.14 * 2))) * reverseItemData[3];
var k_nDo0rColor = shadow;
var _0xCoLIuk1 = Render.Line;
var _oxJj3F = Render.Circle
var speed = 4;
var granate = Render.AddFont("undefeated", 15, 100)
var granataicon = "j"
if (weapon == "molotov") { var granataicon = "l" }
if (weapon == "high explosive grenade") { var granataicon = "j" }
if (weapon == "smoke grenade") { var granataicon = "k" }
if (weapon == "flashbang") { var granataicon = "i" }
if (dist < 1200) {
reverseItem[3] = clamp(reverseItem[3] + speed, 0, maxAlpha1)
}
else if (dist < 1500) {
reverseItem[3] = clamp(reverseItem[3] - speed, 0, maxAlpha1)
}
if (dist < 1200) {
reverseItemData[3] = clamp(reverseItemData[3] + speed, 0, maxAlpha2)
}
else if (dist < 1500) {
reverseItemData[3] = clamp(reverseItemData[3] - speed, 0, maxAlpha2)
}
if (dist < 1200) {
widgetArr[3] = clamp(widgetArr[3] + speed, 0, maxAlpha3)
}
else if (dist < 1500) {
widgetArr[3] = clamp(widgetArr[3] - speed, 0, maxAlpha3)
}
if (dist < 1200) {
menuItemColor[3] = clamp(menuItemColor[3] + speed, 0, maxAlpha4)
}
else if (dist < 1500) {
menuItemColor[3] = clamp(menuItemColor[3] - speed, 0, maxAlpha4)
}
if (!map_cache[g][15] && !UI.GetValue("Script items", "Show through walls"))
continue;
if (map_cache[g][4] != "" && map_cache[g][6] == "") {
Render.FilledRect(_0xFgOVd[0] - 20, _0xFgOVd[1] - 14 / 1.2, size_area[0] + 35, size_area[1] + 13, reverseItem); // quadro
k_nDo0rColor(_0xFgOVd[0] + 9, _0xFgOVd[1] - 4, 0, _0xBvre2[g][4], true, jopakano, [0, 0, 0, reverseItemData[3]], 8); // text
k_nDo0rColor(_0xFgOVd[0] + 9, _0xFgOVd[1] - 5, 0, _0xBvre2[g][4], true, jopakano, reverseItemData, 8); // text
k_nDo0rColor(_0xFgOVd[0] - 15, _0xFgOVd[1] - 8, 0, granataicon, true, granate, [0, 0, 0, widgetArr[3]], 8); // icon
k_nDo0rColor(_0xFgOVd[0] - 15, _0xFgOVd[1] - 9, 0, granataicon, true, granate, widgetArr, 8); // icon
_0xCoLIuk1(_0xFgOVd[0] + 3, _0xFgOVd[1] - 7, _0xFgOVd[0] + 3, _0xFgOVd[1] + 8, menuItemColor, 8); // stick
} else if (map_cache[g][4] != "" && map_cache[g][6] != "") {
Render.FilledRect(_0xFgOVd[0] - 18, _0xFgOVd[1] - 19 / 1.2, size_area[0] + 34, size_area[1] + 20, reverseItem); // quadro
k_nDo0rColor(_0xFgOVd[0] + 9, _0xFgOVd[1] - 11, 0, _0xBvre2[g][4], true, jopakano, [0, 0, 0, reverseItemData[3]], 8); // text
k_nDo0rColor(_0xFgOVd[0] + 9, _0xFgOVd[1] - 12, 0, _0xBvre2[g][4], true, jopakano, reverseItemData, 8); // text
k_nDo0rColor(_0xFgOVd[0] + 9, _0xFgOVd[1] - 2, 0, _0xBvre2[g][6], true, jopakano, [0, 0, 0, reverseItemData[3]], 8); // text
k_nDo0rColor(_0xFgOVd[0] + 9, _0xFgOVd[1] - 1, 0, _0xBvre2[g][6], true, jopakano, reverseItemData, 8); // text
k_nDo0rColor(_0xFgOVd[0] - 15, _0xFgOVd[1] - 8, 0, granataicon, true, granate, [0, 0, 0, widgetArr[3]], 8); // icon
k_nDo0rColor(_0xFgOVd[0] - 15, _0xFgOVd[1] - 9, 0, granataicon, true, granate, widgetArr, 8); // icon
_0xCoLIuk1(_0xFgOVd[0] + 2, _0xFgOVd[1] - 9, _0xFgOVd[0] + 2, _0xFgOVd[1] + 10, menuItemColor, 8); // stick
}
if (dist > 70) continue;
if (map_cache[g][7] == "DANGER") {
Render.FilledRect(B3_K3a9u[0] - 10, B3_K3a9u[1] - size_area[1] / 0.89, size_area[0] + 39, size_tut[1] + 15, reverseItem); // quadro
k_nDo0rColor(B3_K3a9u[0] + 17, B3_K3a9u[1] - 10, 0, _0xBvre2[g][4], true, stdout, [0, 0, 0, reverseItemData[3]], 8); // text
k_nDo0rColor(B3_K3a9u[0] + 17, B3_K3a9u[1] - 11, 0, _0xBvre2[g][4], true, stdout, reverseItemData, 8); // text
k_nDo0rColor(B3_K3a9u[0] + 16, B3_K3a9u[1] + 1, 0, _0xBvre2[g][7], true, encode_char, [0, 0, 0, _0x80f8x5d], 8);
k_nDo0rColor(B3_K3a9u[0] + 18, B3_K3a9u[1] + 3, 0, _0xBvre2[g][7], true, encode_char, [0, 0, 0, _0x80f8x5d], 8);
k_nDo0rColor(B3_K3a9u[0] + 17, B3_K3a9u[1] + 2, 0, _0xBvre2[g][7], true, encode_char, [255, 145, 125, _0x80f8x5d], 8);
_0xCoLIuk1(B3_K3a9u[0] + 11, B3_K3a9u[1] - 8, B3_K3a9u[0] + 11, B3_K3a9u[1] + 8, menuItemColor, 8); // stick
} else if (map_cache[g][7] != "") {
Render.FilledRect(B3_K3a9u[0] - 10, B3_K3a9u[1] - size_area[1] / 0.89, size_area[0] + 39, size_tut[1] + 15, reverseItem); // quadro
k_nDo0rColor(B3_K3a9u[0] + 17, B3_K3a9u[1] - 10, 0, _0xBvre2[g][4], true, stdout, [0, 0, 0, reverseItemData[3]], 8); // text
k_nDo0rColor(B3_K3a9u[0] + 17, B3_K3a9u[1] - 11, 0, _0xBvre2[g][4], true, stdout, reverseItemData, 8); // text
k_nDo0rColor(B3_K3a9u[0] + 16, B3_K3a9u[1] + 1, 0, _0xBvre2[g][7], true, encode_char, [0, 0, 0, reverseItemData[3]], 8);
k_nDo0rColor(B3_K3a9u[0] + 18, B3_K3a9u[1] + 3, 0, _0xBvre2[g][7], true, encode_char, [0, 0, 0, reverseItemData[3]], 8);
k_nDo0rColor(B3_K3a9u[0] + 17, B3_K3a9u[1] + 2, 0, _0xBvre2[g][7], true, encode_char, [255, 255, 255, reverseItemData[3]], 8);
_0xCoLIuk1(B3_K3a9u[0] + 11, B3_K3a9u[1] - 8, B3_K3a9u[0] + 11, B3_K3a9u[1] + 8, menuItemColor, 8); // stick
} else if (map_cache[g][7] == "") {
Render.FilledRect(B3_K3a9u[0] - 10, B3_K3a9u[1] - size_area[1] / 0.89, size_area[0] + 33, size_tut[1] + 15, reverseItem); // quadro
k_nDo0rColor(B3_K3a9u[0] + 17, B3_K3a9u[1] - 5, 0, _0xBvre2[g][4], true, jopakano, [0, 0, 0, reverseItemData[3]], 8); // text
k_nDo0rColor(B3_K3a9u[0] + 17, B3_K3a9u[1] - 6, 0, _0xBvre2[g][4], true, jopakano, reverseItemData, 8); // text
_0xCoLIuk1(B3_K3a9u[0] + 11, B3_K3a9u[1] - 8, B3_K3a9u[0] + 11, B3_K3a9u[1] + 8, menuItemColor, 8); // stick
} if ((Math.abs(B3_K3a9u[0] - scrmid[0]) + Math.abs(B3_K3a9u[1] - scrmid[1]) <= 170)) {
Render.Line(Render.GetScreenSize()[0] / 2, Render.GetScreenSize()[1] / 2, B3_K3a9u[0], B3_K3a9u[1], reverseItemData)
} if (UI.IsHotkeyActive("Script items", "Bind key")) {
color_circle = [0, 170, 0, 250]
color_circl = [0, 170, 0, 160]
color_circ = [0, 155, 0, 155]
color_cir = [0, 135, 0, 140]
color_ci = [0, 110, 0, 135]
color_c1 = [0, 85, 0, 130]
color_c1r = [0, 60, 0, 120]
color_c1rc = [0, 55, 0, 35]
color_c1rcl = [0, 45, 0, 15]
color_c1rcle = [0, 35, 0, 5]
} else {
color_circle = [170, 0, 0, 250]
color_circl = [170, 0, 0, 160]
color_circ = [155, 0, 0, 155]
color_cir = [135, 0, 0, 140]
color_ci = [110, 0, 0, 135]
color_c1 = [85, 0, 0, 130]
color_c1r = [60, 0, 0, 120]
color_c1rc = [55, 0, 0, 35]
color_c1rcl = [45, 0, 0, 15]
color_c1rcle = [35, 0, 0, 5]
} if (!UI.IsHotkeyActive("Script items", "Bind key") && (Math.abs(B3_K3a9u[0] - scrmid[0]) + Math.abs(B3_K3a9u[1] - scrmid[1]) <= 170)) {
color_circle = [170, 170, 0, 250]
color_circl = [170, 170, 0, 160]
color_circ = [135, 155, 0, 155]
color_cir = [135, 135, 0, 140]
color_ci = [110, 110, 0, 135]
color_c1 = [85, 85, 0, 130]
color_c1r = [60, 60, 0, 120]
color_c1rc = [55, 55, 0, 35]
color_c1rcl = [45, 45, 0, 15]
color_c1rcle = [35, 35, 0, 5]
}
_oxJj3F(B3_K3a9u[0], B3_K3a9u[1], 9, (color_c1rcle));_oxJj3F(B3_K3a9u[0], B3_K3a9u[1], 8, (color_c1rcl));_oxJj3F(B3_K3a9u[0], B3_K3a9u[1], 7, (color_c1rc));_oxJj3F(B3_K3a9u[0], B3_K3a9u[1], 6, (color_c1r));_oxJj3F(B3_K3a9u[0], B3_K3a9u[1], 5, (color_c1));_oxJj3F(B3_K3a9u[0], B3_K3a9u[1], 4, (color_ci));_oxJj3F(B3_K3a9u[0], B3_K3a9u[1], 3, (color_cir));_oxJj3F(B3_K3a9u[0], B3_K3a9u[1], 2, (color_circ));_oxJj3F(B3_K3a9u[0], B3_K3a9u[1], 1, (color_circl));Render.FilledCircle(B3_K3a9u[0], B3_K3a9u[1], 1, (color_circle));
}
}
//---------------------------------------------Render Image---------------------------------------------//
var plavalpha = 0
var alpha = 0
while (plavalpha < 143) {
while (alpha < 245) {
alpha++
}
plavalpha++
}
function check_visibility() {
if (map_cache.length == 0 || World.GetServerString() == "")
return;
var local = Entity.GetLocalPlayer();
eye_angles = Local.GetViewAngles();
head = Entity.GetProp(local, "CBasePlayer", "m_vecOrigin");
offset = Entity.GetProp(local, "CBasePlayer", "m_vecViewOffset[2]");
head = vector_add(head, [0, 0, offset[0]]);
for (var g in map_cache) {
var result = Trace.Line(local, head, map_cache[g][1]);
if (map_cache[g][15] == undefined)
map_cache[g].push(result[1] == 1);
else
map_cache[g][15] = result[1] == 1;
}
}
// thanks vex
function _0xYbhj43(ang, old_ang, old_move) {
var deg2rad = function (a) {
return a / 180 * Math.PI
}
var f1, f2, delta_y
if (old_ang[1] < 0)
f1 = 360 + old_ang[1]
else
f1 = old_ang[1]
if (ang[1] < 0)
f2 = 360 + ang[1]
else
f2 = ang[1]
if (f2 < f1)
delta_y = Math.abs(f2 - f1)
else
delta_y = 360 - Math.abs(f1 - f2)
return [
Math.cos(deg2rad(delta_y)) * old_move[0] + Math.cos(deg2rad(delta_y + 90)) * old_move[1],
Math.sin(deg2rad(delta_y)) * old_move[0] + Math.sin(deg2rad(delta_y + 90)) * old_move[1],
0
]
}
// thanks vex
function move_forward(angle) {
var _0x82397BHHH = Local.GetViewAngles()
var forward = [450, 0, 0]
var _0xLlk3 = _0xYbhj43(angle, _0x82397BHHH, forward)
var silent = UI.GetValue("Script items", "Silent throw (Rage)") == 1 ? true : false;
UserCMD.SetMovement(_0xLlk3);
UserCMD.SetAngles(angle, silent)
}
function move_d(angle) {
var _0x82397BHHH = Local.GetViewAngles()
var d = [0, 0, 0]
var _0xLlk3 = _0xYbhj43(angle, _0x82397BHHH, d)
var silent = UI.GetValue("Script items", "Silent throw (Rage)") == 1 ? true : false;
UserCMD.SetMovement(_0xLlk3);
UserCMD.SetAngles(angle, silent)
}
function move_move1(angle) {
var _0x82397BHHH = Local.GetViewAngles()
var move1 = [0, 450, 0]
var _0xLlk3 = _0xYbhj43(angle, _0x82397BHHH, move1)
var silent = UI.GetValue("Script items", "Silent throw (Rage)") == 1 ? true : false;
UserCMD.SetMovement(_0xLlk3);
UserCMD.SetAngles(angle, silent)
}
function move_move3(angle) {
var _0x82397BHHH = Local.GetViewAngles()
var move3 = [-45, -450, 0]
var _0xLlk3 = _0xYbhj43(angle, _0x82397BHHH, move3)
var silent = UI.GetValue("Script items", "Silent throw (Rage)") == 1 ? true : false;
UserCMD.SetMovement(_0xLlk3);
UserCMD.SetAngles(angle, silent)
}
function move_move4(angle) {
var _0x82397BHHH = Local.GetViewAngles()
var move4 = [0, -450, 0]
var _0xLlk3 = _0xYbhj43(angle, _0x82397BHHH, move4)
var silent = UI.GetValue("Script items", "Silent throw (Rage)") == 1 ? true : false;
UserCMD.SetMovement(_0xLlk3);
UserCMD.SetAngles(angle, silent)
}
function move_move6(angle) {
var _0x82397BHHH = Local.GetViewAngles()
var move6 = [100, 30, 0]
var _0xLlk3 = _0xYbhj43(angle, _0x82397BHHH, move6)
var silent = UI.GetValue("Script items", "Silent throw (Rage)") == 1 ? true : false;
UserCMD.SetMovement(_0xLlk3);
UserCMD.SetAngles(angle, silent)
}
function move_move9(angle) {
var _0x82397BHHH = Local.GetViewAngles()
var move9 = [-450, 0, 0]
var _0xLlk3 = _0xYbhj43(angle, _0x82397BHHH, move9)
var silent = UI.GetValue("Script items", "Silent throw (Rage)") == 1 ? true : false;
UserCMD.SetMovement(_0xLlk3);
UserCMD.SetAngles(angle, silent)
}
var delays = []
function Delay(delay, func, times) {
this.delay = delay;
this.resume = Globals.Curtime() + delay;
this.func = func;
this.times = 0;
this.max = times || 1;
delays.push(this);
}
Delay.prototype.run = function () {
this.func();
this.times++;
this.resume += this.delay;
return this.times >= this.max;
}
function checkDelays() {
currTime = Globals.Curtime();
delays.forEach(function (delay, index) {
currTime >= delay.resume && delay.run() && delays.splice(index, 1);
})
}
function stop_attack() {
Cheat.ExecuteCommand("-attack");
}
function move_on_key() {
if (map_cache.length == 0)
return;
if (!~GRENADE_TYPES.indexOf(Entity.GetName(Entity.GetWeapon(Entity.GetLocalPlayer()))))
return;
var silent = UI.GetValue("Script items", "Silent throw (Rage)") == 1 ? true : false;
if (!UI.IsHotkeyActive("Script items", "Bind key")) {
this.running = false
this.ignore_input = false
this.start_tick = 0
this.next_tick_ang = []
this.attacked = false;
this.moved_base = false;
this.run_start = 0;
return;
}
if (this.next_tick_ang == null)
this.next_tick_ang = []
if (this.ignore_input) {
UserCMD.SetAngles(this.next_tick_ang, silent)
return;
}
if (this.next_tick_ang.length) {
UserCMD.SetAngles(this.next_tick_ang, silent)
}
if (this.attacked == null)
this.attacked = false
if (this.start_tick == null)
this.start_tick = 0
if (this.running == null)
this.running = false
if (this.closest == null)
this.closest = []
if (this.ignore_input == null)
this.ignore_input = false
if (this.run_start == null)
this.run_start = 0;
var local = Entity.GetRenderOrigin(Entity.GetLocalPlayer());
var closest = map_cache.sort(function (a, b) {
return calc_dist(local, a[1]) - calc_dist(local, b[1]);
})[0];
if (this.closest.length) {
closest = this.closest
}
if (calc_dist(local, closest[1]) > 200 && !this.ignore_input) {
return;
}
var moved = move_to_target(closest[1]);
//---------------------------------------------------------Attack-----------------------------------------------------//
if (moved || this.running) {
if (closest[5] == "Throw") {
Cheat.ExecuteCommand("+attack");
this.attacked = true
this.ignore_input = true
this.next_tick_ang = closest[2]
new Delay(Global.TickInterval() * 1 - Global.TickInterval() / 100, stop_attack);
}
else if (closest[5] == "Run+Throw") {
if (!this.closest.length)
this.closest = closest
if (this.start_tick == 0) {
this.start_tick = Globals.Tickcount()
}
this.running = true
if (this.run_start == 0)
this.run_start = Globals.Tickcount();
move_forward(closest[2]);
if (this.running && (Globals.Tickcount() - this.run_start > closest[8])) {
if (!this.attacked) {
Cheat.ExecuteCommand("+attack");
new Delay(Global.TickInterval() * 2 - Global.TickInterval() / 100, stop_attack);
}
if (Globals.Tickcount() - this.run_start > closest[8] + 8) {
this.running = true
this.attacked = false;
this.closest = []
this.ignore_input = true
this.next_tick_ang = closest[2]
this.run_start = 0;
}
}
}
else if (closest[5] == "RunRight+Throw") {
if (!this.closest.length)
this.closest = closest
if (this.start_tick == 0) {
this.start_tick = Globals.Tickcount()
}
this.running = true
if (this.run_start == 0)
this.run_start = Globals.Tickcount();
move_move1(closest[2]);
if (this.running && (Globals.Tickcount() - this.run_start > closest[8])) {
if (!this.attacked) {
Cheat.ExecuteCommand("+attack");
new Delay(Global.TickInterval() * 1 - Global.TickInterval() / 100, stop_attack);
new Delay(Global.TickInterval() * closest[8] - Global.TickInterval() / 100, strafel); new Delay(Global.TickInterval() * closest[8] * 2.3 - Global.TickInterval() / 100, strafel1);
if (Globals.Tickcount() - this.run_start > closest[8] + 8) {
this.running = false
move_move4(closest[2])
this.attacked = false;
this.closest = []
this.run_start = 0;
}
}
}
}
else if (closest[5] == "RunLeft+Throw") {
if (!this.closest.length)
this.closest = closest
if (this.start_tick == 0) {
this.start_tick = Globals.Tickcount()
}
this.running = true
if (this.run_start == 0)
this.run_start = Globals.Tickcount();
move_move3(closest[2]);
if (this.running && (Globals.Tickcount() - this.run_start > closest[8])) {
if (!this.attacked) {
Cheat.ExecuteCommand("+attack");
new Delay(Global.TickInterval() * 1 - Global.TickInterval() / 100, stop_attack);
new Delay(Global.TickInterval() * closest[8] - Global.TickInterval() / 100, strafer); new Delay(Global.TickInterval() * closest[8] * 1.5 - Global.TickInterval() / 100, strafer1);
if (Globals.Tickcount() - this.run_start > closest[8] + 8) {
this.running = false
move_move1(closest[2])
this.attacked = false;
this.closest = []
this.run_start = 0;
}
}
}
}
else if (closest[5] == "RunRight+JumpThrow") {
if (!this.closest.length)
this.closest = closest
if (this.start_tick == 0) {
this.start_tick = Globals.Tickcount()
}
this.running = true
if (this.run_start == 0)
this.run_start = Globals.Tickcount();
move_move6(closest[2]);
if (this.running && (Globals.Tickcount() - this.run_start > closest[8])) {
if (!this.attacked) {
Cheat.ExecuteCommand("+attack");
}
if (Globals.Tickcount() - this.run_start > closest[8] + 8) {
new Delay(Global.TickInterval() * 1 - Global.TickInterval() / 100, stop_attack);
new Delay(Global.TickInterval() * 10 - Global.TickInterval() / 100, strafel); new Delay(Global.TickInterval() * 11 - Global.TickInterval() / 100, strafel1);
UserCMD.ForceJump()
this.running = true
this.attacked = false;
this.closest = []
this.ignore_input = true
this.next_tick_ang = closest[2]
this.run_start = 0;
}
}
}
else if (closest[5] == "RunRight+JumpThrow[1]") {
if (!this.closest.length)
this.closest = closest
if (this.start_tick == 0) {
this.start_tick = Globals.Tickcount()
}
this.running = true
if (this.run_start == 0)
this.run_start = Globals.Tickcount();
move_move1(closest[2]);
if (this.running && (Globals.Tickcount() - this.run_start > closest[8])) {
if (!this.attacked) {
Cheat.ExecuteCommand("+attack");
new Delay(Global.TickInterval() * 1 - Global.TickInterval() / 100, stop_attack);
}
if (Globals.Tickcount() - this.run_start > closest[8] + 8) {
UserCMD.ForceJump()
var move3 = angle_to_vec(closest[2][1], closest[2][1])
move3 = vec_mul_fl(move3, 100)
this.running = false
move_move3(closest[2])
this.attacked = false;
this.closest = []
this.run_start = 0;
}
}
}
else if (closest[5] == "Run+Jump+Throw") {
if (!this.closest.length)
this.closest = closest
if (this.start_tick == 0) {
this.start_tick = Globals.Tickcount()
}
this.running = true
if (this.run_start == 0)
this.run_start = Globals.Tickcount();
move_forward(closest[2])
if (this.running && (Globals.Tickcount() - this.run_start > closest[8]) && closest[9] <= 1) {
UserCMD.ForceJump()
if (!this.attacked) {
Cheat.ExecuteCommand("+attack");
new Delay(Global.TickInterval() * closest[9] + 0.0259 - Global.TickInterval() / 100, stop_attack);
new Delay(Global.TickInterval() * 9.9 - Global.TickInterval() / 100, strafeb); new Delay(Global.TickInterval() * 10 - Global.TickInterval() / 100, strafeb1);
if (closest[8] == 1) {
Cheat.ExecuteCommand("+attack");
new Delay(Global.TickInterval() * closest[9] - Global.TickInterval() / 100, stop_attack);
new Delay(Global.TickInterval() * 9.9 - Global.TickInterval() / 100, strafeb); new Delay(Global.TickInterval() * 10 - Global.TickInterval() / 100, strafeb1);
}
}
this.running = true
this.attacked = false;
this.closest = []
this.ignore_input = true
this.next_tick_ang = closest[2]
this.run_start = 0;
}
else if (this.running && (Globals.Tickcount() - this.run_start > closest[8]) && closest[9] >= 2) {
UserCMD.ForceJump()
if (!this.attacked) {
Cheat.ExecuteCommand("+attack");
new Delay(Global.TickInterval() * closest[9] - Global.TickInterval() / 100, stop_attack);
if (closest[9] > 20)
new Delay(Global.TickInterval() * 32 - Global.TickInterval() / 100, strafeb); new Delay(Global.TickInterval() * 32 - Global.TickInterval() / 100, strafeb1);
}
this.running = true
this.attacked = false;
this.closest = []
this.ignore_input = true
this.next_tick_ang = closest[2]
this.run_start = 0;
}
}
else if (closest[5] == "RunBack+Jump+Throw") {
if (!this.closest.length)
this.closest = closest
if (this.start_tick == 0) {
this.start_tick = Globals.Tickcount()
}
this.running = true
if (this.run_start == 0)
this.run_start = Globals.Tickcount();
move_move9(closest[2]);
if (this.running && (Globals.Tickcount() - this.run_start > closest[8]) && closest[9] <= 1) {
UserCMD.ForceJump()
if (!this.attacked) {
Cheat.ExecuteCommand("+attack");
new Delay(Global.TickInterval() * 1 - Global.TickInterval() / 100, stop_attack);
new Delay(Global.TickInterval() * 9.9 - Global.TickInterval() / 100, strafef); new Delay(Global.TickInterval() * 10 - Global.TickInterval() / 100, strafef1);
}
this.running = true
this.attacked = false;
this.closest = []
this.ignore_input = true
this.next_tick_ang = closest[2]
this.run_start = 0;
}
else if (this.running && (Globals.Tickcount() - this.run_start > closest[8]) && closest[9] >= 2) {
UserCMD.ForceJump()
if (!this.attacked) {
Cheat.ExecuteCommand("+attack");
new Delay(Global.TickInterval() * closest[9] - Global.TickInterval() / 100, stop_attack);
new Delay(Global.TickInterval() * 28 - Global.TickInterval() / 100, strafef); new Delay(Global.TickInterval() * 28 - Global.TickInterval() / 100, strafef1);
}
this.running = true
this.attacked = false;
this.closest = []
this.ignore_input = true
this.next_tick_ang = closest[2]
this.run_start = 0;
}
}
else if (closest[5] == "Jump+Delay throw") {
if (!this.closest.length)
this.closest = closest
this.running = true
if (this.run_start == 0)
this.run_start = Globals.Tickcount();
move_d(closest[2]);
UserCMD.ForceJump()
if (this.running && (Globals.Tickcount() - this.run_start > closest[10] + 5)) {
if (!this.attacked) {
Cheat.ExecuteCommand("+attack");
new Delay(Global.TickInterval() * 1 - Global.TickInterval() / 100, stop_attack);
}
this.running = true
this.attacked = false;
this.closest = []
this.ignore_input = true
this.next_tick_ang = closest[2]
this.run_start = 0;
}
}
else if (closest[5] == "Half throw") {
if (this.start_tick == 1) {
this.start_tick = Globals.Tickcount()
}
Cheat.ExecuteCommand("+attack");
new Delay(Global.TickInterval() * 300 - Global.TickInterval() / 300, stop_attack);
Cheat.ExecuteCommand("+attack2");
new Delay(Global.TickInterval() * closest[9] - Global.TickInterval() / 300, stop_attack2);
if (Globals.Tickcount() - this.run_start > closest[9]) {
this.running = true
this.attacked = false;
this.closest = []
this.ignore_input = true
this.next_tick_ang = closest[2]
this.run_start = 0;
}
}
else if (closest[5] == "Jump+Throw") {
if (this.start_tick == 0) {
this.start_tick = Globals.Tickcount()
} this.running = true
if (this.run_start == 0)
this.run_start = Globals.Tickcount();
if (this.running && (Globals.Tickcount() - this.run_start > 2)) {
if (!this.attacked) {
Cheat.ExecuteCommand("+attack"); UserCMD.ForceJump()
new Delay(Global.TickInterval() * 1 - Global.TickInterval() / 100, stop_attack);
}
this.running = true
this.attacked = false;
this.closest = []
this.ignore_input = true
this.next_tick_ang = closest[2]
this.run_start = 0;
}
}
}
else {
this.running = false
this.closest = []
this.ignore_input = false
this.start_tick = 0
this.moved_base = false;
this.run_start = 0;
}
}
function jump() {
Cheat.ExecuteCommand("+jump");
} function jump1() {
Cheat.ExecuteCommand("-jump");
}
function strafel() {
Cheat.ExecuteCommand("+moveleft");
};function strafel1() {
Cheat.ExecuteCommand("-moveleft");
}
function strafer() {
Cheat.ExecuteCommand("+moveright");
};function strafer1() {
Cheat.ExecuteCommand("-moveright");
}
function strafeb() {
Cheat.ExecuteCommand("+back");
};function strafeb1() {
Cheat.ExecuteCommand("-back");
}
function strafef() {
Cheat.ExecuteCommand("+forward");
};function strafef1() {
Cheat.ExecuteCommand("-forward");
}
function stop_attack2() {
Cheat.ExecuteCommand("+attack2");
Cheat.ExecuteCommand("+attack");
}
function stop_attack2() {
Cheat.ExecuteCommand("-attack2");
Cheat.ExecuteCommand("-attack");
}
//---------------------------------------------------------Attack-----------------------------------------------------//
function on_local_connect() {
if (Entity.IsLocalPlayer(Entity.GetEntityFromUserID(Event.GetInt("userid")))) {
// cache all locations for the player's map into an array
map_cache = locations.filter(function (e) {
return e[0] == World.GetMapName();
});
}
}
function getAngles(localPos, pos) {
newPos = vector_sub(pos, localPos);
xyDist = Math.sqrt((newPos[0] * newPos[0] + newPos[1] * newPos[1]));
yaw = Math.atan2(newPos[1], newPos[0]) * 180 / Math.PI;
pitch = Math.atan2(-newPos[2], xyDist) * 180 / Math.PI;
roll = 0;
angles = [pitch, yaw, roll];
return angles;
}
function vector_sub(vec1, vec2) {
return [
vec1[0] - vec2[0],
vec1[1] - vec2[1],
vec1[2] - vec2[2]
];
}
function degreesToRadians(degress) {
return degress * Math.PI / 180.0;
}
function angle_to_vec(pitch, yaw) {
var p = degreesToRadians(pitch);
var y = degreesToRadians(yaw)
var sin_p = Math.sin(p);
var cos_p = Math.cos(p);
var sin_y = Math.sin(y);
var cos_y = Math.cos(y);
return [cos_p * cos_y, cos_p * sin_y, -sin_p];
}
function vector_add(vec, vec2) {
newVec = [
vec[0] + vec2[0],
vec[1] + vec2[1],
vec[2] + vec2[2]
]
return newVec;
}
function shadow(x, y, align, text, custom, font, color, size) {
if (custom) {
Render.StringCustom(x + ((size / 7.17)), y + ((size / 7.17)), align, text, [0, 0, 0, 0], font);
Render.StringCustom(x, y, align, text, color, font);
} else {
Render.String(x + ((size / 7.17)), y + ((size / 7.17)), align, text, [0, 0, 0, 0], size);
Render.String(x, y, align, text, color, size);
}
}
function import_grenade_selection() {
var val = UI.GetValue("Script items", "Enabled grenades");
if (val == 0)
enabled_grenades = [];
if (getDropdownValue(val, 0) && !~enabled_grenades.indexOf("molotov"))
enabled_grenades.push("molotov");
else if (~enabled_grenades.indexOf("molotov") && !getDropdownValue(val, 0))
enabled_grenades.splice(enabled_grenades.indexOf("molotov"), 1);
if (getDropdownValue(val, 1) && !~enabled_grenades.indexOf("high explosive grenade"))
enabled_grenades.push("high explosive grenade");
else if (~enabled_grenades.indexOf("high explosive grenade") && !getDropdownValue(val, 1))
enabled_grenades.splice(enabled_grenades.indexOf("high explosive grenade"), 1);
if (getDropdownValue(val, 2) && !~enabled_grenades.indexOf("flashbang"))
enabled_grenades.push("flashbang");
else if (~enabled_grenades.indexOf("flashbang") && !getDropdownValue(val, 2))
enabled_grenades.splice(enabled_grenades.indexOf("flashbang"), 1);
if (getDropdownValue(val, 3) && !~enabled_grenades.indexOf("smoke grenade"))
enabled_grenades.push("smoke grenade");
else if (~enabled_grenades.indexOf("smoke grenade") && !getDropdownValue(val, 3))
enabled_grenades.splice(enabled_grenades.indexOf("smoke grenade"), 1);
selection_cache = val;
hand_cache = Entity.GetName(Entity.GetWeapon(Entity.GetLocalPlayer()));
}
function vec_mul_fl(a, b) {
return [a[0] * b, a[1] * b, a[2] * b]
}
function calc_dist(a, b) {
x = a[0] - b[0];
y = a[1] - b[1];
z = a[2] - b[2];
return Math.sqrt(x * x + y * y + z * z);
}
// thanks depresso man (vex)
function move_to_target(destination, a) {
var local = Entity.GetLocalPlayer()
var origin = Entity.GetRenderOrigin(local)
origin[2] = Entity.GetEyePosition(local)[2]
var delta = [destination[0] - origin[0], destination[1] - origin[1], destination[2] - origin[2]]
var yaw = Local.GetViewAngles()[1]
var cmdMove = []
cmdMove[0] = (((Math.sin(yaw / 180 * Math.PI)) * delta[1]) + (Math.cos(yaw / 180 * Math.PI) * delta[0])) * 23
cmdMove[1] = (((Math.sin(yaw / 180 * Math.PI)) * delta[0]) + (Math.cos(yaw / 180 * Math.PI) * -delta[1])) * 23
cmdMove[2] = 0
var length = Math.sqrt(delta[0] * delta[0] + delta[1] * delta[1] + delta[2] * delta[2])
var velo = Entity.GetProp(local, "DT_CSPlayer", "m_vecVelocity[0]")
var length2 = Math.sqrt(velo[0] * velo[0] + velo[1] * velo[1] + velo[2] * velo[2])
UserCMD.SetMovement(cmdMove);
return length < (a ? a : 1) && (length2 < 2 || a);
}
// thanks ed
function getDropdownValue(value, index) {
var mask = 1 << index;
return value & mask ? true : false;
}
Cheat.RegisterCallback("CreateMove", "check_visibility");
Cheat.RegisterCallback("Draw", "menuopen")
Cheat.RegisterCallback("Draw", "draw");
Cheat.RegisterCallback("CreateMove", "move_on_key");
Cheat.RegisterCallback("player_connect_full", "on_local_connect");
Cheat.RegisterCallback("CreateMove", "checkDelays");
Cheat.RegisterCallback("CreateMove", "onprintnades");
Cheat.RegisterCallback("Draw", "Preset");