ошибка со скриптом

Статус
В этой теме нельзя размещать новые ответы.
  • 22
  • 6
Контакты для связи отсутствуют.
number required, found undefined(stack index -1)
код:
JavaScript:
UI.AddLabel("                Safe AWP                ");
UI.AddLabel("========================");

const enable = UI.AddCheckbox("Enable Safe AWP");


var safePbak = false;


function safeAWP() {
    localplayer_index = Entity.GetLocalPlayer();
    weapon = Entity.GetWeapon(localplayer_index);

    if (weapon == "awp") {
        forceSafePoint = UI.IsHotkeyActive('Rage', 'GENERAL', 'General', 'Force safe point');
        if (!forceSafePoint) {
            UI.ToggleHotkey('Rage', 'GENERAL', 'General', 'Force safe point');
            safePbak = true;
        }
    }
    else if (safePbak) {
        UI.ToggleHotkey('Rage', 'GENERAL', 'General', 'Force safe point');
        safePbak = false;
    }
}
   


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


UI.AddLabel("                   Hotkeys            ");
const screen = Global.GetScreenSize();
var x_size = screen[0]; var y_size = screen[1]
UI.AddSliderInt("Alpha", 0, 255); UI.SetValue("Alpha", 145)
UI.AddSliderInt("binds x", 0, x_size); UI.AddSliderInt("binds y", 0, y_size);
UI.AddColorPicker("Color of hotkeys");
UI.SetEnabled("Script items", "binds x", false);
UI.SetEnabled("Script items", "binds y", false);


const in_bounds = function (vec, x, y, x2, y2) {
    return (vec[0] > x) ** (vec[1] > y) && (vec[0] < x2) && (vec[1] < y2)
}

function keybinds() {

    var keybinds = [];
    if (UI.IsMenuOpen()) { keybinds.push("Menu is Open") };
    if (UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Auto direction")) { keybinds.push("Freestand") };
    if (UI.IsHotkeyActive("Anti-Aim", "Fake angles", "Inverter")) { keybinds.push("Inverter") };
    if (UI.IsHotkeyActive("Rage", "Exploits", "Double tap")) { keybinds.push("Double Tap") };
    if (UI.IsHotkeyActive("Rage", "Exploits", "Hide shots")) { keybinds.push("On shot anti-aim") };
    if (UI.IsHotkeyActive("Anti-Aim", "Extra", "Fake duck")) { keybinds.push("Fake Duck") };
    if (UI.IsHotkeyActive("Rage", "GENERAL", "General", "Force body aim")) { keybinds.push("Body Aim") };
    if (UI.IsHotkeyActive("Rage", "GENERAL", "General", "Force safe point")) { keybinds.push("Safe Point override") };
    if (UI.IsHotkeyActive("Rage", "GENERAL", "General", "Resolver override")) { keybinds.push("Resolver Override") };
    if (UI.IsHotkeyActive("Anti-Aim", "Extra", "Slow walk")) { keybinds.push("Low delta") };
    if (UI.IsHotkeyActive("Misc", "GENERAL", "Movement", "Auto peek")) { keybinds.push("Quick peek") };
    if (UI.IsHotkeyActive("Anti-Aim", "Rage Anti-Aim", "Right dir")) { keybinds.push("Right Side") };
    if (UI.IsHotkeyActive("Anti-Aim", "Rage Anti-Aim", "Left dir")) { keybinds.push("Left Side") };
    if (UI.IsHotkeyActive("Visual", "WORLD", "View", "ThirdPerson")) { keybinds.push("Thirdperson") };
    if (UI.IsHotkeyActive("Script items", "Mindmg override")) { keybinds.push("Damage override") };
    if (UI.IsHotkeyActive("Script items", "Dormant Aimbot")) { keybinds.push("Dormant Aimbot") };
    if (UI.IsHotkeyActive("Script items", "Head override key")) { keybinds.push("Head override") };
   

    const x = UI.GetValue("binds x"), y = UI.GetValue("binds y"); const alpha = UI.GetValue("Alpha"); var color = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Color");

    Render.FilledRect(x, y, 180, 20, [0, 0, 0, 145]);
    var icon = Render.AddFont("untitled-font-1", 13, 100); var verdana = Render.AddFont("Verdana", 8, 100);
    Render.StringCustom(x + 5, y + 1, 0, "a", color, icon);
    Render.StringCustom(x + 27, y + 2, 0, "keybinds", [255, 255, 255, 255], verdana);
    Render.FilledRect(x, y + 18, 180, 2, color)
    for (i = 0; i < keybinds.length; i++) {
        Render.StringCustom(x + 4, y + 22 + 20 * i, 0, keybinds[i], [255, 255, 255, 255], verdana)
        Render.StringCustom(x + 128, y + 22 + 20 * i, 0, "[always]", [255, 255, 255, 255], verdana);
    }

    if (Global.IsKeyPressed(1)) {
        const mouse_pos = Global.GetCursorPosition();
        if (in_bounds(mouse_pos, x, y, x + 320, y + 110)) {
            if (UI.IsMenuOpen() == false)
                return;
            UI.SetValue("binds x", mouse_pos[0] - 200);
            UI.SetValue("binds y", mouse_pos[1] - 60);
        }
    }
}

Cheat.RegisterCallback("Draw", "keybinds");


UI.AddLabel("                  Minimum damage                    ");
UI.AddLabel("========================");

UI.AddHotkey("Mindmg override");
UI.AddSliderInt("revolver/deagle", 0, 100);
UI.AddSliderInt("scout", 0, 101);
UI.AddSliderInt("awp", 0, 100);
UI.AddSliderInt("autosniper", 0, 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", "AUTO", "Targeting", "Minimum damage");


function damage() {
    var r8_dmg = UI.GetValue("Script items", "revolver/deagle");
    var ssg_dmg = UI.GetValue("Script items", "scout");
    var awp_dmg = UI.GetValue("Script items", "awp");
    var auto_dmg = UI.GetValue("Script items", "autosniper");
    var isActive = UI.IsHotkeyActive("Script items", "Mindmg override");
    if (isActive == true) {
        UI.SetValue("Rage", "HEAVY PISTOL", "Targeting", "Minimum damage", r8_dmg);
        UI.SetValue("Rage", "SCOUT", "Targeting", "Minimum damage", ssg_dmg);
        UI.SetValue("Rage", "AWP", "Targeting", "Minimum damage", awp_dmg);
        UI.SetValue("Rage", "AUTOSNIPER", "Targeting", "Minimum damage", auto_dmg);
    } 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", "damage")




UI.AddLabel("          At Target In Air         ");
UI.AddLabel("========================");

const enable = UI.AddCheckbox("enable");

function target() {
    if (UI.GetValue("Script items", "enable")) {
        if (!Input.IsKeyPressed(0x20)) {
            UI.SetValue("Anti-Aim", "Rage Anti-Aim", "At targets", 0);
        }
        else {
            UI.SetValue("Anti-Aim", "Rage Anti-Aim", "At targets", 1)
        }
    }
}

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


   

UI.AddLabel("            Better DT Recharge          ");
UI.AddLabel("========================");

UI.AddSliderInt("Double tap tolerance", 0, 3);

function can_shift_shot(ticks_to_shift) {
    var me = Entity.GetLocalPlayer();
    var wpn = Entity.GetWeapon(me);

    if (me == null || wpn == null)
        return false;

    var tickbase = Entity.GetProp(me, "CCSPlayer", "m_nTickBase");
    var curtime = Globals.TickInterval() * (tickbase - ticks_to_shift)

    if (curtime < Entity.GetProp(me, "CCSPlayer", "m_flNextAttack"))
        return false;

    if (curtime < Entity.GetProp(wpn, "CBaseCombatWeapon", "m_flNextPrimaryAttack"))
        return false;

    return true;
}

function _TBC_CREATE_MOVE() {
    var is_charged = Exploit.GetCharge()
    var reserve = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Double tap tolerance")

    Exploit[(is_charged != 1 ? "Enable" : "Disable") + "Recharge"]()

    if (can_shift_shot(14) && is_charged != 1) {
        Exploit.DisableRecharge();
        Exploit.Recharge()
    }

    Exploit.OverrideTolerance(reserve);
    Exploit.OverrideShift(14 - reserve);
}

function _TBC_UNLOAD() {
    Exploit.EnableRecharge();
}

Cheat.RegisterCallback("CreateMove", "_TBC_CREATE_MOVE");
Cheat.RegisterCallback("Unload", "_TBC_UNLOAD");


UI.AddLabel("                Aspect Ratio")
UI.AddLabel(" ========================");

UI.AddSliderFloat("Aspect Ratio", 1.0, 2.0); // you can customize limites here (1.0 - lowest, 2.0 - highest)
UI.AddLabel("1.33 is 4:3                  1.77 is 16:9");
UI.AddCheckbox("4:3 mode");
UI.AddCheckbox("16:9 mode");
UI.AddLabel("======================");

var aspect_cache = 0;

function aspectratio() {
    var aspect_slider = UI.GetValue("Aspect Ratio");
    var cht = UI.GetValue("4:3 mode");
    var shd = UI.GetValue("16:9 mode");


    if (cht != 0) {
        UI.SetValue("Aspect Ratio", 1.33333333);
        UI.SetValue("4:3 mode", 0);
    }

    if (shd != 0) {
        UI.SetValue("Aspect Ratio", 1.77777777);
        UI.SetValue("16:9 mode", 0);
    }

    if (aspect_cache != aspect_slider) {
        aspect_cache = aspect_slider;
        UI.SetValue("Misc", "GENERAL", "Miscellaneous", "Hidden cvars", 1);
        Global.ExecuteCommand("r_aspectratio " + aspect_slider);
    }
}

Cheat.RegisterCallback("CreateMove", "aspectratio");


UI.AddLabel("             NoScope Distance    ");
UI.AddLabel(" ========================");

UI.AddSliderInt("Noscope distance(m)", 1, 100);

var target = -1

function noscope() {
    if (!Ragebot.GetTarget())
        target = closestTarget();
    else
        target = Ragebot.GetTarget();
    if (!Entity.IsAlive(target)) {
        UI.SetValue("Rage", "GENERAL", "General", "Auto scope", 1);
        return;
    }
    if (get_metric_distance(Entity.GetRenderOrigin(Entity.GetLocalPlayer()), Entity.GetRenderOrigin(target)) < UI.GetValue("Script items", "Noscope distance (m)")) {
        UI.SetValue("Rage", "GENERAL", "General", "Auto scope", 0);
    } else {
        UI.SetValue("Rage", "GENERAL", "General", "Auto scope", 1);
    }
}
Cheat.RegisterCallback("CreateMove", "noscope")


function closestTarget() {
    var local = Entity.GetLocalPlayer();
    var enemies = Entity.GetEnemies();
    var dists = [];
    var damage = [];
    for (e in enemies) {
        if (!Entity.IsAlive(enemies[e]) || Entity.IsDormant(enemies[e]) || !Entity.IsValid(enemies[e])) return;
        dists.push([enemies[e]], calcDist(Entity.GetHitboxPosition(local, 0)), Entity.GetHitboxPosition(enemies[e], 0));
    }
    dists.sort(function (a, b) {
        return a[1] - b[1];
    });
    if (dists.length == 0 || dists == []) return target = -1;
}

function calcDist(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);
}

function get_metric_distance(a, b) {
    return Math.floor(Math.sqrt(Math.pow(a[0] - b[0], 2) + Math.pow(a[1] - b[1], 2) + Math.pow(a[2] - b[2], 2)) * 0.0254);
}

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






UI.AddLabel("            Low Delta");

UI.AddLabel("========================");

const bind = UI.AddHotkey("Low Delta");

jitter_bak = UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Jitter offset");

function lowdelta() {
    var enabled = UI.IsHotkeyActive("Script items", "Low Delta");
    if (enabled == true) {
        UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Jitter offset", 15);
    } else {
        UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Jitter offset", jitter_bak)
    }
}


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




UI.AddLabel("          Jumpscout");


UI.AddLabel("========================");

UI.AddSliderInt("Jumpscout Hitchance", 0, 100);

var old_hc = UI.GetValue("Rage", "SCOUT", "Accuracy", "Hitchance");
var new_hc = UI.GetValue("Script items", "Jumpscout Hitchance");

function CreateMove() {
    weapon = getWeaponName();
    if (weapon == "ssg08") {
        if (Global.IsKeyPressed(0x20)) {
            UI.SetValue("Rage", "SCOUT", "Accuracy", "Hitchance", new_hc)
        } else {
            UI.SetValue("Rage", "SCOUT", "Accuracy", "Hitchance", old_hc)
        }
    }
}

Global.RegisterCallback("CreateMove", "CreateMove")



UI.AddLabel("          Buylogs");
UI.AddLabel("========================");

const enable = UI.AddCheckbox("Buylogs");

function BuyLogs() {
    Global.Print('k')
    if (UI.GetValue("Misc", "JAVASCRIPT", "Script Items", "Buy logs")) {
        var ent = Entity.GetEntityFromUserID(Event.GetInt('userid'))
        var team = Event.GetInt('team')
        if (team != Entity.GetProp(Entity.GetLocalPlayer(), "CBaseEntity", "m_iTeamNum")) {
            var item = Event.GetString('weapon')
            item = item.replace("weapon_", "")
            item = item.replace("item_", "")
            item = item.replace("assaultsuit", "kevlar + helmet")
            item = item.replace("incgrenade", "molotov")
            if (item != "unknown") {
                var name = Entity.GetName(ent)
                Global.PrintChat(" \x01[\x06onetap\x01] \x04" + name + " \x01bought \x04" + item + " \n");
            }
        }
    }
}



Global.RegisterCallback("item_purchase", "BuyLogs");







UI.AddLabel("          Freestand on key");
UI.AddLabel("========================");

UI.AddHotkey("Freestand on key");

function freestand() {
    if (UI.IsHotkeyActive("Script items", "Freestand on key")) {
        UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Auto direction", 1);
    } else {
        UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Auto direction", 0);
    }
}


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


UI.AddLabel("                  Fix Strafe");
UI.AddLabel("========================");

UI.AddSliderInt("Turn speed", 1, 2);

function Erectware() {
    var CustomSpeed = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Turn speed");
    var VelocityProp = Entity.GetProp(Entity.GetLocalPlayer(), 'CBasePlayer', 'm_vecVelocity[0]'),
        Velocity = Math.sqrt(VelocityProp[0] * VelocityProp[0] + VelocityProp[1] * VelocityProp[1]);
    parseFloat(Velocity)
    Velocity2 = Velocity / 1.5
    VelocityCus = Velocity2 / CustomSpeed
    UI.SetValue("Misc", "GENERAL", "Movement", "Turn speed", VelocityCus);
}


Cheat.RegisterCallback('CreateMove', 'Erectware')


UI.AddLabel("             SafePoint On Hitboxes");
UI.AddLabel("========================");

UI.AddMultiDropdown("Choose a hitboxes", ["Head", "Chest", "Upper chest", "Body", "Pelvis", "Legs", "Feet"]);



function CreateMove() {
    const safepoint_selection = UI.GetValue("Script items", "Choose a hitboxes");
    if (safepoint_selection & (1 << 0)) {
        Ragebot.ForceHitboxSafety(1);
        Ragebot.ForceHitboxSafety(2);
        Ragebot.ForceHitboxSafety(3);
        Ragebot.ForceHitboxSafety(4);
        Ragebot.ForceHitboxSafety(5);
        Ragebot.ForceHitboxSafety(6);
        Ragebot.ForceHitboxSafety(7);
        Ragebot.ForceHitboxSafety(8);
        Ragebot.ForceHitboxSafety(9);
        Ragebot.ForceHitboxSafety(10);
        if (safepoint_selection & (1 << 1)) {
            Ragebot.ForceHitboxSafety(11);
            Ragebot.ForceHitboxSafety(12);
        }
    }
}


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


UI.AddLabel("           Dormant Aimbot");
UI.AddLabel("========================");

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);
}
// from chicken aimbot
function normalize_yaw(angle) {
    angle = (angle % 360 + 360) % 360;
    return angle > 180 ? angle - 360 : angle;
}
function subtract(a, b) {
    x = a[0] - b[0];
    y = a[1] - b[1];
    z = a[2] - b[2];
    var vec = [x, y, z];
    return (vec)
}
function VectorAngles(forward) {
    var angles;
    var tmp, yaw, pitch;

    if (forward[1] == 0 && forward[0] == 0) {
        yaw = 0;
        if (forward[2] > 0)
            pitch = 270;
        else
            pitch = 90;
    }
    else {
        yaw = (Math.atan2(forward[1], forward[0]) * 180 / Math.PI);
        if (yaw < 0)
            yaw += 360;
        tmp = Math.sqrt(forward[0] * forward[0] + forward[1] * forward[1]);
        pitch = (Math.atan2(-forward[2], tmp) * 180 / Math.PI);
        if (pitch < 0)
            pitch += 360;
    }

    x = pitch;
    y = yaw;
    z = 0;
    angles = [x, y, z];

    return angles;
}
function can_shoot(Player) {
    var index = Entity.GetWeapon(Player)
    var classid = Entity.GetClassID(index);

    var weapon = classid == 107 || classid == 108 || classid == 96 || classid == 99 || classid == 112 || classid == 155 || classid == 47;//checking if the selected weapon is knife or nade
    var clip = Entity.GetProp(index, "DT_BaseCombatWeapon", "m_iClip1");
    var getbuttons = Entity.GetProp(index, 'CBasePlayer', 'm_fFlags');
    if (weapon || clip == 0 || getbuttons & 1 << 1)//check if player is jumping or as an empty mag // UserCMD.GetButtons() & (1 << 1)
        return false;
    return true;
}
// end
// vector +
va = function (a, b) {
    return [a[0] + b[0], a[1] + b[1], a[2] + b[2]];
}
// from oof
function calculate_yaw(src, to) {
    var delta = [src[0] - to[0], src[1] - to[1]];
    var yaw = Math.atan(delta[1] / delta[0]);
    yaw = normalize_yaw(yaw * 180 / Math.PI);
    if (delta[0] >= 0)
        yaw = normalize_yaw(yaw + 180);
    return yaw;
}
var a, d, c;
// hotkey
var shot = false;

UI.AddHotkey("Dormant Aimbot");
function check() {
    // enenies arr
    var e = Entity.GetEnemies();
    // filter as only dormant, alive and hittable enemies
    var d = e.filter(function (e) {
        return Entity.IsDormant(e) && Entity.IsAlive(e) && Trace.Bullet(Entity.GetLocalPlayer(), e, Entity.GetEyePosition(Entity.GetLocalPlayer()), va(Entity.GetRenderOrigin(e), [0, 0, 45]))[1] > 1;
    });
    // sort hittable by damage
    var c = d.sort(function (a, b) {
        return Trace.Bullet(Entity.GetLocalPlayer(), a, Entity.GetEyePosition(Entity.GetLocalPlayer()), va(Entity.GetRenderOrigin(a), [0, 0, 45]))[1] - Trace.Bullet(Entity.GetLocalPlayer(), b, Entity.GetEyePosition(Entity.GetLocalPlayer()), va(Entity.GetRenderOrigin(b), [0, 0, 45]))[1];
    })[0];
    // if no enemies return
    if (!c) {
        return;
    }
    var weapon_index = Entity.GetWeapon(Entity.GetLocalPlayer());
    var m_flNextPrimaryAttack = Entity.GetProp(weapon_index, "DT_BaseCombatWeapon", "m_flNextPrimaryAttack"); //gets time until next attack
    var viewangle = VectorAngles(subtract(va(Entity.GetRenderOrigin(c), [0, 0, 45]), Entity.GetEyePosition(Entity.GetLocalPlayer())));
    if (!can_shoot(Entity.GetLocalPlayer()))//checks if you can shoot
    {
        return;
    }

    Cheat.Print("active: " + UI.IsHotkeyActive("Script Items", "Dormant Aimbot") + " value: " + UI.GetValue("Dormant Aimbot") + "\n")
    if (UI.IsHotkeyActive("Script Items", "Dormant Aimbot")) { // UI.GetValue("Dormant Aimbot") // ["Rage", "General", "General", "Key assignment",
        Cheat.Print("can_shoot YES\n");
        if (Globals.Curtime() - m_flNextPrimaryAttack > 0.1) {
            //UserCMD.SetViewAngles(viewangle, true)
            UserCMD.SetAngles(viewangle);
            //UserCMD.SetButtons((1 << 0) | UserCMD.GetButtons())
            var getbuttons = Entity.GetProp(Entity.GetLocalPlayer(), 'CBasePlayer', 'm_fFlags');
            Cheat.ExecuteCommand("+attack");
            shot = true;


            dmg = Trace.Bullet(Entity.GetLocalPlayer(), c, Entity.GetEyePosition(Entity.GetLocalPlayer()), va(Entity.GetRenderOrigin(c), [0, 0, 45]))[1];
            // log shot
            Cheat.Print("Dormant aimed at " + Entity.GetName(c) + " for " + dmg + " dmg");
        }
    }
}
function wrap() {
    try {
        check()
    } catch (e) {
        Cheat.Print("error: \n" + e.stack)
    }
}
Cheat.RegisterCallback("CreateMove", "wrap");

function shoot() {
    if (shot) { // don't care who shot
        Cheat.ExecuteCommand("-attack");
        shot = false
    }
}
Cheat.RegisterCallback("weapon_fire", "shoot");



UI.AddLabel("           Head override key");
UI.AddLabel("========================");

//hotkey
UI.AddHotkey("Head override key");
//endregion

var one = UI.GetValue("Rage", "GENERAL", "Targeting", "Hitboxes");
var two = UI.GetValue("Rage", "HEAVY PISTOL", "Targeting", "Hitboxes");
var three = UI.GetValue("Rage", "SCOUT", "Targeting", "Hitboxes");
var four = UI.GetValue("Rage", "AWP", "Targeting", "Hitboxes");    
var five = UI.GetValue("Rage", "AUTOSNIPER", "Targeting", "Hitboxes");


function headoverride() {
    if (UI.IsHotkeyActive("Script items", "Head override key")) {
        UI.SetValue("Rage", "GENERAL", "Targeting", "Hitboxes", 1);
        UI.SetValue("Rage", "HEAVY PISTOL", "Targeting", "Hitboxes", 1);
        UI.SetValue("Rage", "SCOUT", "Targeting", "Hitboxes", 1);
        UI.SetValue("Rage", "AWP", "Targeting", "Hitboxes", 1);
        UI.SetValue("Rage", "AUTOSNIPER", "Targeting", "Hitboxes", 1);
    } else {
        UI.SetValue("Rage", "GENERAL", "Targeting", "Hitboxes", one);
        UI.SetValue("Rage", "HEAVY PISTOL", "Targeting", "Hitboxes", two);
        UI.SetValue("Rage", "SCOUT", "Targeting", "Hitboxes", three);
        UI.SetValue("Rage", "AWP", "Targeting", "Hitboxes", four);
        UI.SetValue("Rage", "AUTOSNIPER", "Targeting", "Hitboxes", five);
    }
}

//register callbacks
Cheat.RegisterCallback("CreateMove", "headoverride")


UI.AddLabel("           Better Fakelags");
UI.AddLabel("========================");

const enable = UI.AddCheckbox("Enable");

const slider = UI.AddSliderInt("Fakelag Limit");
const slider2 = UI.AddSliderInt("Fakelag Trigger Limit");


var fakelag_bak = UI.GetValue("Anti-Aim", "Fake-Lag", "Limit");
var fakelag_bak_2 = UI.GetValue("Anti-Aim", "Fake-Lag", "Trigger limit");


function fakelags() {
    var new_limit = UI.GetValue("Script items", "Fakelag Limit");
    var new_trigger_limit = UI.GetValue("Script items", "Fakelag Trigger Limit");
    if (UI.GetValue("Script items", "Enable")) {
        UI.SetValue("Anti-Aim", "Fake-Lag", "Limit", new_limit);
        UI.SetValue("Anti-Aim", "Fake-Lag", "Trigger limit", new_trigger_limit);
    }
    else {
        UI.SetValue("Anti-Aim", "Fake-Lag", "Limit", fakelag_bak);
        UI.SetValue("Anti-Aim", "Fake-Lag", "Trigger limit", fakelag_bak_2);
    }
}


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



UI.AddLabel("           Custom Anti-Aim"); //by @trickxyz btw
UI.AddLabel("========================");


UI.AddCheckbox("Enable");
UI.AddSliderInt("Real offset");
UI.AddSliderInt("Fake offset");
UI.AddSliderInt("LBY offset");


var realoffset = UI.GetValue("Script items", "Real offset");
var fakeoffset = UI.GetValue("Script items", "Fake offset");
var lbyoffset = UI.GetValue("Script items", "LBY offset");


function customantiaim() {
    if (UI.GetValue("Script items", "Enable")) {
        AntiAim.SetOverride(1);
        AntiAim.SetRealOffset(realoffset);
        AntiAim.SetFakeOffset(fakeoffset);
        AntiAim.SetLBYOffset(lbyoffset);
    }
    else {
        AntiAim.SetOverride(0);
        AntiAim.SetRealOffset(0);
        AntiAim.SetFakeOffset(0);
        AntiAim.SetLBYOffset(0);
    }
}

Cheat.RegisterCallback("CreateMove", "customantiaim");


UI.AddLabel("           Force backshoot");
UI.AddLabel("========================");

const hotkey = UI.AddHotkey("Force backshoot");
var enemies = Entity.GetEnemies();
var last_shot_time = [];

function forcebackshoot() {
    if (!UI.IsHotkeyActive("Script items", "Force backshoot")) return;
    local = Entity.GetLocalPlayer();
    if (!Entity.IsAlive(local)) return;
    enemies = Entity.GetEnemies();

    for (var i = 0; i < enemies_length; i++) {
        var enemies = enemies[i];
        var dif = Globals.Tickcount() - last_shot_time(enemy)
        var has_shot = dif >= 0 && dif <= 12
        if (!has_shot) {
            Ragebot.IgnoreTarget(enemy)
        }
    }
}


Global.RegisterCallback("CreateMove", "forcebackshoot");


UI.AddLabel("          BAim if Lethal");
UI.AddLabel("========================");


const toggle = UI.AddCheckbox("Enable");

function getPlayerHealth(index) {
    return Entity.GetProp(index, "CPlayerResource", "m_iHealth");
}

function main() {
    var bodyaim = UI.IsHotkeyActive("Rage", "GENERAL", "General", "Force body aim");
    enemy = Ragebot.GetTarget()
    health = getPlayerHealth(enemy)
    if (health < 91) {
        if (!bodyaim) {
            UI.ToggleHotkey("Rage", "GENERAL", "General", "Force body aim");
        }
    } else {
        if (bodyaim) {
            UI.ToggleHotkey("Rage", "GENERAL", "General", "Force body aim");
        }
    }
}


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



UI.AddLabel("      Custom Thirdperson Distance");
UI.AddLabel("========================");


UI.AddSliderInt("Distance", 50, 300);

function main() {
    var dist = UI.GetValue("Script items", "Distance");
    if (UI.GetValue("Visual", "WORLD", "View", "Thirdperson") != dist) {
        UI.SetValue("Visual", "WORLD", "View", "Thirdperson", dist);
    }
}

Cheat.RegisterCallback("FrameStageNotify", "main")


UI.AddLabel("        DT Peek Helper [SSG-08/AWP]");
UI.AddLabel("========================");

UI.AddCheckbox("Enable Peek Helper");



function dtpeek() {
    if (UI.GetValue("Script items", "Enable Peek Helper")) {
        if (UI.IsHotkeyActive("Misc", "GENERAL", "Movement", "Auto peek" && UI.IsHotkeyActive("Rage", "GENERAL", "Exploits", "Doubletap"))) {
            UI.SetValue("Rage", "SCOUT", "Accuracy", "Prefer safe point", true);
            UI.SetValue("Rage", "SCOUT", "Accuracy", "Prefer body aim", true);
            UI.SetValue("Rage", "AWP", "Accuracy", "Prefer safe point", true);
            UI.SetValue("Rage", "AWP", "Accuracy", "Prefer body aim", true);
            UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Auto direction", true)
        }
    } else {
        UI.SetValue("Rage", "SCOUT", "Accuracy", "Prefer safe point", false);
        UI.SetValue("Rage", "SCOUT", "Accuracy", "Prefer body aim", false);
        UI.SetValue("Rage", "AWP", "Accuracy", "Prefer safe point", false);
        UI.SetValue("Rage", "AWP", "Accuracy", "Prefer body aim", false);
        UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Auto direction", false);
    }
}


Cheat.RegisterCallback("CreateMove", "dtpeek");



UI.AddLabel("          Leg Fucker");
UI.AddLabel("========================");


UI.AddCheckbox("Enable Leg Fucker");

var fucker = false;

function legfucker() {
    if (UI.GetValue("Script items", "Enable Leg Fucker")) {
        UI.SetValue("Misc", "GENERAL", "Movement", "Slide walk", 1);
        fucker = true;
        UI.SetValue("Misc", "GENERAL", "Movement", "Slide walk", 0);
        fucker = false;
    }
}


Cheat.RegisterCallback("CreateMove", "legfucker")
 
Последнее редактирование:
  • 594
  • 136
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
number required, found undefined(stack index -1)
код:
JavaScript:
UI.AddLabel("                Safe AWP                ");
UI.AddLabel("========================");

const enable = UI.AddCheckbox("Enable Safe AWP");


var safePbak = false;


function safeAWP() {
    localplayer_index = Entity.GetLocalPlayer();
    weapon = Entity.GetWeapon(localplayer_index);

    if (weapon == "awp") {
        forceSafePoint = UI.IsHotkeyActive('Rage', 'GENERAL', 'General', 'Force safe point');
        if (!forceSafePoint) {
            UI.ToggleHotkey('Rage', 'GENERAL', 'General', 'Force safe point');
            safePbak = true;
        }
    }
    else if (safePbak) {
        UI.ToggleHotkey('Rage', 'GENERAL', 'General', 'Force safe point');
        safePbak = false;
    }
}
  


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


UI.AddLabel("                   Hotkeys            ");
const screen = Global.GetScreenSize();
var x_size = screen[0]; var y_size = screen[1]
UI.AddSliderInt("Alpha", 0, 255); UI.SetValue("Alpha", 145)
UI.AddSliderInt("binds x", 0, x_size); UI.AddSliderInt("binds y", 0, y_size);
UI.AddColorPicker("Color of hotkeys");
UI.SetEnabled("Script items", "binds x", false);
UI.SetEnabled("Script items", "binds y", false);


const in_bounds = function (vec, x, y, x2, y2) {
    return (vec[0] > x) ** (vec[1] > y) && (vec[0] < x2) && (vec[1] < y2)
}

function keybinds() {

    var keybinds = [];
    if (UI.IsMenuOpen()) { keybinds.push("Menu is Open") };
    if (UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Auto direction")) { keybinds.push("Freestand") };
    if (UI.IsHotkeyActive("Anti-Aim", "Fake angles", "Inverter")) { keybinds.push("Inverter") };
    if (UI.IsHotkeyActive("Rage", "Exploits", "Double tap")) { keybinds.push("Double Tap") };
    if (UI.IsHotkeyActive("Rage", "Exploits", "Hide shots")) { keybinds.push("On shot anti-aim") };
    if (UI.IsHotkeyActive("Anti-Aim", "Extra", "Fake duck")) { keybinds.push("Fake Duck") };
    if (UI.IsHotkeyActive("Rage", "GENERAL", "General", "Force body aim")) { keybinds.push("Body Aim") };
    if (UI.IsHotkeyActive("Rage", "GENERAL", "General", "Force safe point")) { keybinds.push("Safe Point override") };
    if (UI.IsHotkeyActive("Rage", "GENERAL", "General", "Resolver override")) { keybinds.push("Resolver Override") };
    if (UI.IsHotkeyActive("Anti-Aim", "Extra", "Slow walk")) { keybinds.push("Low delta") };
    if (UI.IsHotkeyActive("Misc", "GENERAL", "Movement", "Auto peek")) { keybinds.push("Quick peek") };
    if (UI.IsHotkeyActive("Anti-Aim", "Rage Anti-Aim", "Right dir")) { keybinds.push("Right Side") };
    if (UI.IsHotkeyActive("Anti-Aim", "Rage Anti-Aim", "Left dir")) { keybinds.push("Left Side") };
    if (UI.IsHotkeyActive("Visual", "WORLD", "View", "ThirdPerson")) { keybinds.push("Thirdperson") };
    if (UI.IsHotkeyActive("Script items", "Mindmg override")) { keybinds.push("Damage override") };
    if (UI.IsHotkeyActive("Script items", "Dormant Aimbot")) { keybinds.push("Dormant Aimbot") };
    if (UI.IsHotkeyActive("Script items", "Head override key")) { keybinds.push("Head override") };
  

    const x = UI.GetValue("binds x"), y = UI.GetValue("binds y"); const alpha = UI.GetValue("Alpha"); var color = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Color");

    Render.FilledRect(x, y, 180, 20, [0, 0, 0, 145]);
    var icon = Render.AddFont("untitled-font-1", 13, 100); var verdana = Render.AddFont("Verdana", 8, 100);
    Render.StringCustom(x + 5, y + 1, 0, "a", color, icon);
    Render.StringCustom(x + 27, y + 2, 0, "keybinds", [255, 255, 255, 255], verdana);
    Render.FilledRect(x, y + 18, 180, 2, color)
    for (i = 0; i < keybinds.length; i++) {
        Render.StringCustom(x + 4, y + 22 + 20 * i, 0, keybinds[i], [255, 255, 255, 255], verdana)
        Render.StringCustom(x + 128, y + 22 + 20 * i, 0, "[always]", [255, 255, 255, 255], verdana);
    }

    if (Global.IsKeyPressed(1)) {
        const mouse_pos = Global.GetCursorPosition();
        if (in_bounds(mouse_pos, x, y, x + 320, y + 110)) {
            if (UI.IsMenuOpen() == false)
                return;
            UI.SetValue("binds x", mouse_pos[0] - 200);
            UI.SetValue("binds y", mouse_pos[1] - 60);
        }
    }
}

Cheat.RegisterCallback("Draw", "keybinds");


UI.AddLabel("                  Minimum damage                    ");
UI.AddLabel("========================");

UI.AddHotkey("Mindmg override");
UI.AddSliderInt("revolver/deagle", 0, 100);
UI.AddSliderInt("scout", 0, 101);
UI.AddSliderInt("awp", 0, 100);
UI.AddSliderInt("autosniper", 0, 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", "AUTO", "Targeting", "Minimum damage");


function damage() {
    var r8_dmg = UI.GetValue("Script items", "revolver/deagle");
    var ssg_dmg = UI.GetValue("Script items", "scout");
    var awp_dmg = UI.GetValue("Script items", "awp");
    var auto_dmg = UI.GetValue("Script items", "autosniper");
    var isActive = UI.IsHotkeyActive("Script items", "Mindmg override");
    if (isActive == true) {
        UI.SetValue("Rage", "HEAVY PISTOL", "Targeting", "Minimum damage", r8_dmg);
        UI.SetValue("Rage", "SCOUT", "Targeting", "Minimum damage", ssg_dmg);
        UI.SetValue("Rage", "AWP", "Targeting", "Minimum damage", awp_dmg);
        UI.SetValue("Rage", "AUTOSNIPER", "Targeting", "Minimum damage", auto_dmg);
    } 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", "damage")




UI.AddLabel("          At Target In Air         ");
UI.AddLabel("========================");

const enable = UI.AddCheckbox("enable");

function target() {
    if (UI.GetValue("Script items", "enable")) {
        if (!Input.IsKeyPressed(0x20)) {
            UI.SetValue("Anti-Aim", "Rage Anti-Aim", "At targets", 0);
        }
        else {
            UI.SetValue("Anti-Aim", "Rage Anti-Aim", "At targets", 1)
        }
    }
}

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


  

UI.AddLabel("            Better DT Recharge          ");
UI.AddLabel("========================");

UI.AddSliderInt("Double tap tolerance", 0, 3);

function can_shift_shot(ticks_to_shift) {
    var me = Entity.GetLocalPlayer();
    var wpn = Entity.GetWeapon(me);

    if (me == null || wpn == null)
        return false;

    var tickbase = Entity.GetProp(me, "CCSPlayer", "m_nTickBase");
    var curtime = Globals.TickInterval() * (tickbase - ticks_to_shift)

    if (curtime < Entity.GetProp(me, "CCSPlayer", "m_flNextAttack"))
        return false;

    if (curtime < Entity.GetProp(wpn, "CBaseCombatWeapon", "m_flNextPrimaryAttack"))
        return false;

    return true;
}

function _TBC_CREATE_MOVE() {
    var is_charged = Exploit.GetCharge()
    var reserve = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Double tap tolerance")

    Exploit[(is_charged != 1 ? "Enable" : "Disable") + "Recharge"]()

    if (can_shift_shot(14) && is_charged != 1) {
        Exploit.DisableRecharge();
        Exploit.Recharge()
    }

    Exploit.OverrideTolerance(reserve);
    Exploit.OverrideShift(14 - reserve);
}

function _TBC_UNLOAD() {
    Exploit.EnableRecharge();
}

Cheat.RegisterCallback("CreateMove", "_TBC_CREATE_MOVE");
Cheat.RegisterCallback("Unload", "_TBC_UNLOAD");


UI.AddLabel("                Aspect Ratio")
UI.AddLabel(" ========================");

UI.AddSliderFloat("Aspect Ratio", 1.0, 2.0); // you can customize limites here (1.0 - lowest, 2.0 - highest)
UI.AddLabel("1.33 is 4:3                  1.77 is 16:9");
UI.AddCheckbox("4:3 mode");
UI.AddCheckbox("16:9 mode");
UI.AddLabel("======================");

var aspect_cache = 0;

function aspectratio() {
    var aspect_slider = UI.GetValue("Aspect Ratio");
    var cht = UI.GetValue("4:3 mode");
    var shd = UI.GetValue("16:9 mode");


    if (cht != 0) {
        UI.SetValue("Aspect Ratio", 1.33333333);
        UI.SetValue("4:3 mode", 0);
    }

    if (shd != 0) {
        UI.SetValue("Aspect Ratio", 1.77777777);
        UI.SetValue("16:9 mode", 0);
    }

    if (aspect_cache != aspect_slider) {
        aspect_cache = aspect_slider;
        UI.SetValue("Misc", "GENERAL", "Miscellaneous", "Hidden cvars", 1);
        Global.ExecuteCommand("r_aspectratio " + aspect_slider);
    }
}

Cheat.RegisterCallback("CreateMove", "aspectratio");


UI.AddLabel("             NoScope Distance    ");
UI.AddLabel(" ========================");

UI.AddSliderInt("Noscope distance(m)", 1, 100);

var target = -1

function noscope() {
    if (!Ragebot.GetTarget())
        target = closestTarget();
    else
        target = Ragebot.GetTarget();
    if (!Entity.IsAlive(target)) {
        UI.SetValue("Rage", "GENERAL", "General", "Auto scope", 1);
        return;
    }
    if (get_metric_distance(Entity.GetRenderOrigin(Entity.GetLocalPlayer()), Entity.GetRenderOrigin(target)) < UI.GetValue("Script items", "Noscope distance (m)")) {
        UI.SetValue("Rage", "GENERAL", "General", "Auto scope", 0);
    } else {
        UI.SetValue("Rage", "GENERAL", "General", "Auto scope", 1);
    }
}
Cheat.RegisterCallback("CreateMove", "noscope")


function closestTarget() {
    var local = Entity.GetLocalPlayer();
    var enemies = Entity.GetEnemies();
    var dists = [];
    var damage = [];
    for (e in enemies) {
        if (!Entity.IsAlive(enemies[e]) || Entity.IsDormant(enemies[e]) || !Entity.IsValid(enemies[e])) return;
        dists.push([enemies[e]], calcDist(Entity.GetHitboxPosition(local, 0)), Entity.GetHitboxPosition(enemies[e], 0));
    }
    dists.sort(function (a, b) {
        return a[1] - b[1];
    });
    if (dists.length == 0 || dists == []) return target = -1;
}

function calcDist(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);
}

function get_metric_distance(a, b) {
    return Math.floor(Math.sqrt(Math.pow(a[0] - b[0], 2) + Math.pow(a[1] - b[1], 2) + Math.pow(a[2] - b[2], 2)) * 0.0254);
}

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






UI.AddLabel("            Low Delta");

UI.AddLabel("========================");

const bind = UI.AddHotkey("Low Delta");

jitter_bak = UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Jitter offset");

function lowdelta() {
    var enabled = UI.IsHotkeyActive("Script items", "Low Delta");
    if (enabled == true) {
        UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Jitter offset", 15);
    } else {
        UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Jitter offset", jitter_bak)
    }
}


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




UI.AddLabel("          Jumpscout");


UI.AddLabel("========================");

UI.AddSliderInt("Jumpscout Hitchance", 0, 100);

var old_hc = UI.GetValue("Rage", "SCOUT", "Accuracy", "Hitchance");
var new_hc = UI.GetValue("Script items", "Jumpscout Hitchance");

function CreateMove() {
    weapon = getWeaponName();
    if (weapon == "ssg08") {
        if (Global.IsKeyPressed(0x20)) {
            UI.SetValue("Rage", "SCOUT", "Accuracy", "Hitchance", new_hc)
        } else {
            UI.SetValue("Rage", "SCOUT", "Accuracy", "Hitchance", old_hc)
        }
    }
}

Global.RegisterCallback("CreateMove", "CreateMove")



UI.AddLabel("          Buylogs");
UI.AddLabel("========================");

const enable = UI.AddCheckbox("Buylogs");

function BuyLogs() {
    Global.Print('k')
    if (UI.GetValue("Misc", "JAVASCRIPT", "Script Items", "Buy logs")) {
        var ent = Entity.GetEntityFromUserID(Event.GetInt('userid'))
        var team = Event.GetInt('team')
        if (team != Entity.GetProp(Entity.GetLocalPlayer(), "CBaseEntity", "m_iTeamNum")) {
            var item = Event.GetString('weapon')
            item = item.replace("weapon_", "")
            item = item.replace("item_", "")
            item = item.replace("assaultsuit", "kevlar + helmet")
            item = item.replace("incgrenade", "molotov")
            if (item != "unknown") {
                var name = Entity.GetName(ent)
                Global.PrintChat(" \x01[\x06onetap\x01] \x04" + name + " \x01bought \x04" + item + " \n");
            }
        }
    }
}



Global.RegisterCallback("item_purchase", "BuyLogs");







UI.AddLabel("          Freestand on key");
UI.AddLabel("========================");

UI.AddHotkey("Freestand on key");

function freestand() {
    if (UI.IsHotkeyActive("Script items", "Freestand on key")) {
        UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Auto direction", 1);
    } else {
        UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Auto direction", 0);
    }
}


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


UI.AddLabel("                  Fix Strafe");
UI.AddLabel("========================");

UI.AddSliderInt("Turn speed", 1, 2);

function Erectware() {
    var CustomSpeed = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Turn speed");
    var VelocityProp = Entity.GetProp(Entity.GetLocalPlayer(), 'CBasePlayer', 'm_vecVelocity[0]'),
        Velocity = Math.sqrt(VelocityProp[0] * VelocityProp[0] + VelocityProp[1] * VelocityProp[1]);
    parseFloat(Velocity)
    Velocity2 = Velocity / 1.5
    VelocityCus = Velocity2 / CustomSpeed
    UI.SetValue("Misc", "GENERAL", "Movement", "Turn speed", VelocityCus);
}


Cheat.RegisterCallback('CreateMove', 'Erectware')


UI.AddLabel("             SafePoint On Hitboxes");
UI.AddLabel("========================");

UI.AddMultiDropdown("Choose a hitboxes", ["Head", "Chest", "Upper chest", "Body", "Pelvis", "Legs", "Feet"]);



function CreateMove() {
    const safepoint_selection = UI.GetValue("Script items", "Choose a hitboxes");
    if (safepoint_selection & (1 << 0)) {
        Ragebot.ForceHitboxSafety(1);
        Ragebot.ForceHitboxSafety(2);
        Ragebot.ForceHitboxSafety(3);
        Ragebot.ForceHitboxSafety(4);
        Ragebot.ForceHitboxSafety(5);
        Ragebot.ForceHitboxSafety(6);
        Ragebot.ForceHitboxSafety(7);
        Ragebot.ForceHitboxSafety(8);
        Ragebot.ForceHitboxSafety(9);
        Ragebot.ForceHitboxSafety(10);
        if (safepoint_selection & (1 << 1)) {
            Ragebot.ForceHitboxSafety(11);
            Ragebot.ForceHitboxSafety(12);
        }
    }
}


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


UI.AddLabel("           Dormant Aimbot");
UI.AddLabel("========================");

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);
}
// from chicken aimbot
function normalize_yaw(angle) {
    angle = (angle % 360 + 360) % 360;
    return angle > 180 ? angle - 360 : angle;
}
function subtract(a, b) {
    x = a[0] - b[0];
    y = a[1] - b[1];
    z = a[2] - b[2];
    var vec = [x, y, z];
    return (vec)
}
function VectorAngles(forward) {
    var angles;
    var tmp, yaw, pitch;

    if (forward[1] == 0 && forward[0] == 0) {
        yaw = 0;
        if (forward[2] > 0)
            pitch = 270;
        else
            pitch = 90;
    }
    else {
        yaw = (Math.atan2(forward[1], forward[0]) * 180 / Math.PI);
        if (yaw < 0)
            yaw += 360;
        tmp = Math.sqrt(forward[0] * forward[0] + forward[1] * forward[1]);
        pitch = (Math.atan2(-forward[2], tmp) * 180 / Math.PI);
        if (pitch < 0)
            pitch += 360;
    }

    x = pitch;
    y = yaw;
    z = 0;
    angles = [x, y, z];

    return angles;
}
function can_shoot(Player) {
    var index = Entity.GetWeapon(Player)
    var classid = Entity.GetClassID(index);

    var weapon = classid == 107 || classid == 108 || classid == 96 || classid == 99 || classid == 112 || classid == 155 || classid == 47;//checking if the selected weapon is knife or nade
    var clip = Entity.GetProp(index, "DT_BaseCombatWeapon", "m_iClip1");
    var getbuttons = Entity.GetProp(index, 'CBasePlayer', 'm_fFlags');
    if (weapon || clip == 0 || getbuttons & 1 << 1)//check if player is jumping or as an empty mag // UserCMD.GetButtons() & (1 << 1)
        return false;
    return true;
}
// end
// vector +
va = function (a, b) {
    return [a[0] + b[0], a[1] + b[1], a[2] + b[2]];
}
// from oof
function calculate_yaw(src, to) {
    var delta = [src[0] - to[0], src[1] - to[1]];
    var yaw = Math.atan(delta[1] / delta[0]);
    yaw = normalize_yaw(yaw * 180 / Math.PI);
    if (delta[0] >= 0)
        yaw = normalize_yaw(yaw + 180);
    return yaw;
}
var a, d, c;
// hotkey
var shot = false;

UI.AddHotkey("Dormant Aimbot");
function check() {
    // enenies arr
    var e = Entity.GetEnemies();
    // filter as only dormant, alive and hittable enemies
    var d = e.filter(function (e) {
        return Entity.IsDormant(e) && Entity.IsAlive(e) && Trace.Bullet(Entity.GetLocalPlayer(), e, Entity.GetEyePosition(Entity.GetLocalPlayer()), va(Entity.GetRenderOrigin(e), [0, 0, 45]))[1] > 1;
    });
    // sort hittable by damage
    var c = d.sort(function (a, b) {
        return Trace.Bullet(Entity.GetLocalPlayer(), a, Entity.GetEyePosition(Entity.GetLocalPlayer()), va(Entity.GetRenderOrigin(a), [0, 0, 45]))[1] - Trace.Bullet(Entity.GetLocalPlayer(), b, Entity.GetEyePosition(Entity.GetLocalPlayer()), va(Entity.GetRenderOrigin(b), [0, 0, 45]))[1];
    })[0];
    // if no enemies return
    if (!c) {
        return;
    }
    var weapon_index = Entity.GetWeapon(Entity.GetLocalPlayer());
    var m_flNextPrimaryAttack = Entity.GetProp(weapon_index, "DT_BaseCombatWeapon", "m_flNextPrimaryAttack"); //gets time until next attack
    var viewangle = VectorAngles(subtract(va(Entity.GetRenderOrigin(c), [0, 0, 45]), Entity.GetEyePosition(Entity.GetLocalPlayer())));
    if (!can_shoot(Entity.GetLocalPlayer()))//checks if you can shoot
    {
        return;
    }

    Cheat.Print("active: " + UI.IsHotkeyActive("Script Items", "Dormant Aimbot") + " value: " + UI.GetValue("Dormant Aimbot") + "\n")
    if (UI.IsHotkeyActive("Script Items", "Dormant Aimbot")) { // UI.GetValue("Dormant Aimbot") // ["Rage", "General", "General", "Key assignment",
        Cheat.Print("can_shoot YES\n");
        if (Globals.Curtime() - m_flNextPrimaryAttack > 0.1) {
            //UserCMD.SetViewAngles(viewangle, true)
            UserCMD.SetAngles(viewangle);
            //UserCMD.SetButtons((1 << 0) | UserCMD.GetButtons())
            var getbuttons = Entity.GetProp(Entity.GetLocalPlayer(), 'CBasePlayer', 'm_fFlags');
            Cheat.ExecuteCommand("+attack");
            shot = true;


            dmg = Trace.Bullet(Entity.GetLocalPlayer(), c, Entity.GetEyePosition(Entity.GetLocalPlayer()), va(Entity.GetRenderOrigin(c), [0, 0, 45]))[1];
            // log shot
            Cheat.Print("Dormant aimed at " + Entity.GetName(c) + " for " + dmg + " dmg");
        }
    }
}
function wrap() {
    try {
        check()
    } catch (e) {
        Cheat.Print("error: \n" + e.stack)
    }
}
Cheat.RegisterCallback("CreateMove", "wrap");

function shoot() {
    if (shot) { // don't care who shot
        Cheat.ExecuteCommand("-attack");
        shot = false
    }
}
Cheat.RegisterCallback("weapon_fire", "shoot");



UI.AddLabel("           Head override key");
UI.AddLabel("========================");

//hotkey
UI.AddHotkey("Head override key");
//endregion

var one = UI.GetValue("Rage", "GENERAL", "Targeting", "Hitboxes");
var two = UI.GetValue("Rage", "HEAVY PISTOL", "Targeting", "Hitboxes");
var three = UI.GetValue("Rage", "SCOUT", "Targeting", "Hitboxes");
var four = UI.GetValue("Rage", "AWP", "Targeting", "Hitboxes");   
var five = UI.GetValue("Rage", "AUTOSNIPER", "Targeting", "Hitboxes");


function headoverride() {
    if (UI.IsHotkeyActive("Script items", "Head override key")) {
        UI.SetValue("Rage", "GENERAL", "Targeting", "Hitboxes", 1);
        UI.SetValue("Rage", "HEAVY PISTOL", "Targeting", "Hitboxes", 1);
        UI.SetValue("Rage", "SCOUT", "Targeting", "Hitboxes", 1);
        UI.SetValue("Rage", "AWP", "Targeting", "Hitboxes", 1);
        UI.SetValue("Rage", "AUTOSNIPER", "Targeting", "Hitboxes", 1);
    } else {
        UI.SetValue("Rage", "GENERAL", "Targeting", "Hitboxes", one);
        UI.SetValue("Rage", "HEAVY PISTOL", "Targeting", "Hitboxes", two);
        UI.SetValue("Rage", "SCOUT", "Targeting", "Hitboxes", three);
        UI.SetValue("Rage", "AWP", "Targeting", "Hitboxes", four);
        UI.SetValue("Rage", "AUTOSNIPER", "Targeting", "Hitboxes", five);
    }
}

//register callbacks
Cheat.RegisterCallback("CreateMove", "headoverride")


UI.AddLabel("           Better Fakelags");
UI.AddLabel("========================");

const enable = UI.AddCheckbox("Enable");

const slider = UI.AddSliderInt("Fakelag Limit");
const slider2 = UI.AddSliderInt("Fakelag Trigger Limit");


var fakelag_bak = UI.GetValue("Anti-Aim", "Fake-Lag", "Limit");
var fakelag_bak_2 = UI.GetValue("Anti-Aim", "Fake-Lag", "Trigger limit");


function fakelags() {
    var new_limit = UI.GetValue("Script items", "Fakelag Limit");
    var new_trigger_limit = UI.GetValue("Script items", "Fakelag Trigger Limit");
    if (UI.GetValue("Script items", "Enable")) {
        UI.SetValue("Anti-Aim", "Fake-Lag", "Limit", new_limit);
        UI.SetValue("Anti-Aim", "Fake-Lag", "Trigger limit", new_trigger_limit);
    }
    else {
        UI.SetValue("Anti-Aim", "Fake-Lag", "Limit", fakelag_bak);
        UI.SetValue("Anti-Aim", "Fake-Lag", "Trigger limit", fakelag_bak_2);
    }
}


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



UI.AddLabel("           Custom Anti-Aim"); //by @trickxyz btw
UI.AddLabel("========================");


UI.AddCheckbox("Enable");
UI.AddSliderInt("Real offset");
UI.AddSliderInt("Fake offset");
UI.AddSliderInt("LBY offset");


var realoffset = UI.GetValue("Script items", "Real offset");
var fakeoffset = UI.GetValue("Script items", "Fake offset");
var lbyoffset = UI.GetValue("Script items", "LBY offset");


function customantiaim() {
    if (UI.GetValue("Script items", "Enable")) {
        AntiAim.SetOverride(1);
        AntiAim.SetRealOffset(realoffset);
        AntiAim.SetFakeOffset(fakeoffset);
        AntiAim.SetLBYOffset(lbyoffset);
    }
    else {
        AntiAim.SetOverride(0);
        AntiAim.SetRealOffset(0);
        AntiAim.SetFakeOffset(0);
        AntiAim.SetLBYOffset(0);
    }
}

Cheat.RegisterCallback("CreateMove", "customantiaim");


UI.AddLabel("           Force backshoot");
UI.AddLabel("========================");

const hotkey = UI.AddHotkey("Force backshoot");
var enemies = Entity.GetEnemies();
var last_shot_time = [];

function forcebackshoot() {
    if (!UI.IsHotkeyActive("Script items", "Force backshoot")) return;
    local = Entity.GetLocalPlayer();
    if (!Entity.IsAlive(local)) return;
    enemies = Entity.GetEnemies();

    for (var i = 0; i < enemies_length; i++) {
        var enemies = enemies[i];
        var dif = Globals.Tickcount() - last_shot_time(enemy)
        var has_shot = dif >= 0 && dif <= 12
        if (!has_shot) {
            Ragebot.IgnoreTarget(enemy)
        }
    }
}


Global.RegisterCallback("CreateMove", "forcebackshoot");


UI.AddLabel("          BAim if Lethal");
UI.AddLabel("========================");


const toggle = UI.AddCheckbox("Enable");

function getPlayerHealth(index) {
    return Entity.GetProp(index, "CPlayerResource", "m_iHealth");
}

function main() {
    var bodyaim = UI.IsHotkeyActive("Rage", "GENERAL", "General", "Force body aim");
    enemy = Ragebot.GetTarget()
    health = getPlayerHealth(enemy)
    if (health < 91) {
        if (!bodyaim) {
            UI.ToggleHotkey("Rage", "GENERAL", "General", "Force body aim");
        }
    } else {
        if (bodyaim) {
            UI.ToggleHotkey("Rage", "GENERAL", "General", "Force body aim");
        }
    }
}


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



UI.AddLabel("      Custom Thirdperson Distance");
UI.AddLabel("========================");


UI.AddSliderInt("Distance", 50, 300);

function main() {
    var dist = UI.GetValue("Script items", "Distance");
    if (UI.GetValue("Visual", "WORLD", "View", "Thirdperson") != dist) {
        UI.SetValue("Visual", "WORLD", "View", "Thirdperson", dist);
    }
}

Cheat.RegisterCallback("FrameStageNotify", "main")


UI.AddLabel("        DT Peek Helper [SSG-08/AWP]");
UI.AddLabel("========================");

UI.AddCheckbox("Enable Peek Helper");



function dtpeek() {
    if (UI.GetValue("Script items", "Enable Peek Helper")) {
        if (UI.IsHotkeyActive("Misc", "GENERAL", "Movement", "Auto peek" && UI.IsHotkeyActive("Rage", "GENERAL", "Exploits", "Doubletap"))) {
            UI.SetValue("Rage", "SCOUT", "Accuracy", "Prefer safe point", true);
            UI.SetValue("Rage", "SCOUT", "Accuracy", "Prefer body aim", true);
            UI.SetValue("Rage", "AWP", "Accuracy", "Prefer safe point", true);
            UI.SetValue("Rage", "AWP", "Accuracy", "Prefer body aim", true);
            UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Auto direction", true)
        }
    } else {
        UI.SetValue("Rage", "SCOUT", "Accuracy", "Prefer safe point", false);
        UI.SetValue("Rage", "SCOUT", "Accuracy", "Prefer body aim", false);
        UI.SetValue("Rage", "AWP", "Accuracy", "Prefer safe point", false);
        UI.SetValue("Rage", "AWP", "Accuracy", "Prefer body aim", false);
        UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Auto direction", false);
    }
}


Cheat.RegisterCallback("CreateMove", "dtpeek");



UI.AddLabel("          Leg Fucker");
UI.AddLabel("========================");


UI.AddCheckbox("Enable Leg Fucker");

var fucker = false;

function legfucker() {
    if (UI.GetValue("Script items", "Enable Leg Fucker")) {
        UI.SetValue("Misc", "GENERAL", "Movement", "Slide walk", 1);
        fucker = true;
        UI.SetValue("Misc", "GENERAL", "Movement", "Slide walk", 0);
        fucker = false;
    }
}


Cheat.RegisterCallback("CreateMove", "legfucker")
скорее в варах, но я не уверен
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу