Вопрос Оптимизация кода

life is cheap, death is free!
Эксперт
Статус
Оффлайн
Регистрация
9 Дек 2019
Сообщения
1,603
Реакции[?]
517
Поинты[?]
2K
Нужен человек который оптимизирует блудтеч, так как там уже пиздец критичная ситуация
Деньги не обещаю так как самому нужны
JavaScript:
var screen_size = Global.GetScreenSize()
var isInverted;
var time, fillbar, shotsfired;
var drawLeft = 0; drawNotActive = 1;
var drawRight = 0
var leftWasPressed = false; var rightWasPressed = false;
var safePBackup = false
var heavy_cache = UI.GetValue("Rage", "HEAVY PISTOL", "Targeting", "Minimum damage")
var scout_cache = UI.GetValue("Rage", "SCOUT", "Targeting", "Minimum damage")
var awp_cache = UI.GetValue("Rage", "AWP", "Targeting", "Minimum damage")
var auto_cache = UI.GetValue("Rage", "AUTOSNIPER", "Targeting", "Minimum damage")
var pistol_cache = UI.GetValue("Rage", "PISTOL", "Targeting", "Minimum damage")
var fake_cache = UI.GetValue("Anti-Aim", "Fake-Lag", "Limit")
var jump = false
var oldTick = 0
var lastPressed = 0
var isNotActive = false
var clock = 0
var tickcount = 0
var original_aa = true;
var flip = false
const clamp = function(val, min, max) { return Math.min(Math.max(min, val), max) }
var thirdperson_cache = UI.GetValue("Visuals", "WORLD", "View", "Thirdperson")
var person = 0, turned = 1

//todo list: menu for js important: FUCKING DO A OPTIMIZATION -200 FPS IS NOT GOOD
Cheat.Print('\n')
Cheat.PrintColor([255,0,0,255]," ▄▄▄▄    ██▓     ▒█████   ▒█████  ▓█████▄ ▄▄▄█████▓▓█████  ▄████▄   ██░ ██ " + '\n')
Cheat.PrintColor([255,0,0,255],"▓█████▄ ▓██▒    ▒██▒  ██▒▒██▒  ██▒▒██▀ ██▌▓  ██▒ ▓▒▓█   ▀ ▒██▀ ▀█  ▓██░ ██▒" + '\n')
Cheat.PrintColor([255,0,0,255],"▒██▒ ▄██▒██░    ▒██░  ██▒▒██░  ██▒░██   █▌▒ ▓██░ ▒░▒███   ▒▓█    ▄ ▒██▀▀██░" + '\n')
Cheat.PrintColor([255,0,0,255],"▒██░█▀  ▒██░    ▒██   ██░▒██   ██░░▓█▄   ▌░ ▓██▓ ░ ▒▓█  ▄ ▒▓▓▄ ▄██▒░▓█ ░██ " + '\n')
Cheat.PrintColor([255,0,0,255],"░▓█  ▀█▓░██████▒░ ████▓▒░░ ████▓▒░░▒████▓   ▒██▒ ░ ░▒████▒▒ ▓███▀ ░░▓█▒░██▓" + '\n')
Cheat.PrintColor([255,0,0,255],"░▒▓███▀▒░ ▒░▓  ░░ ▒░▒░▒░ ░ ▒░▒░▒░  ▒▒▓  ▒   ▒ ░░   ░░ ▒░ ░░ ░▒ ▒  ░ ▒ ░░▒░▒" + '\n')
Cheat.PrintColor([255,0,0,255],"▒░▒   ░ ░ ░ ▒  ░  ░ ▒ ▒░   ░ ▒ ▒░  ░ ▒  ▒     ░     ░ ░  ░  ░  ▒    ▒ ░▒░ ░" + '\n')
Cheat.PrintColor([255,0,0,255]," ░    ░   ░ ░   ░ ░ ░ ▒  ░ ░ ░ ▒   ░ ░  ░   ░         ░   ░         ░  ░░ ░" + '\n')
Cheat.PrintColor([255,0,0,255]," ░          ░  ░    ░ ░      ░ ░     ░                ░  ░░ ░       ░  ░  ░" + '\n')
Cheat.PrintColor([255,0,0,255],"      ░                            ░                      ░                " + '\n')
username = Cheat.GetUsername();
Cheat.Print('\n')
Cheat.PrintColor([145,197,56,255], "Welcome, " + username + "! your current version is: v 1.9.1" + '\n');
Cheat.PrintColor([255,0,0,255], "Yougame Page: ")
Cheat.Print("https://yougame.biz/threads/196597/" + '\n')
Cheat.PrintColor([255,0,0,255], "Creator of script: ")
Cheat.Print("ber$$erker#8168" + '\n')
Cheat.PrintColor([255,0,0,255], "BIG THANKS TO:" + '\n')
Cheat.PrintColor([255,0,0,255], "Sleebu for arm skin changer, adaptive autoscope & other code and moral help: ")
Cheat.Print("Sleebu#1337" + '\n')
Cheat.PrintColor([255,0,0,255], "nijo for tabs: ")
Cheat.Print("nijo#1149" + '\n')
Cheat.PrintColor([255,0,0,255], "Mased for help with coding & other: ")
Cheat.Print("Mased#2459" + '\n')
Cheat.Print('\n')
Cheat.PrintColor([145,197,56,255], "[UPDATE LOG V1.9.1]" + '\n')
Cheat.PrintColor([255,0,0,255], "- Add watermark" +'\n')
Cheat.PrintColor([255,0,0,255], "- Add disable fakelags on r8" +'\n')
Cheat.PrintColor([255,0,0,255], "- Change grenade warning default a little" +'\n')
Cheat.PrintColor([255,0,0,255], "- Add Dodge jitter (looks like adaptive jitter in acidtech)" +'\n')
Cheat.PrintColor([255,0,0,255], "- Add adaptive autoscope based on enemy distance" +'\n')
Cheat.PrintColor([255,0,0,255], "- Change indicators a little" +'\n')
Cheat.PrintColor([255,0,0,255], "- Add hitlogs under crosshair" +'\n')
Cheat.PrintColor([255,0,0,255], "- Add Dormant aimbot" +'\n')
Cheat.PrintColor([255,0,0,255], "- Add animations back to skeet scope" +'\n')
Cheat.PrintColor([255,0,0,255], "- Add viewmodel in scope" +'\n')
Cheat.Print('\n')
Cheat.Print('\n')
Cheat.PrintColor([145,197,56,255], "[UPDATE LOG V1.9]" + '\n')
Cheat.PrintColor([255,0,0,255], "- Add dtpeek helper for awp and scout" +'\n')
Cheat.PrintColor([255,0,0,255], "- Change animated custom scope to default one" +'\n')
Cheat.PrintColor([255,0,0,255], "- Add animated thirdperson" +'\n')
Cheat.PrintColor([255,0,0,255], "- Rework nade warning" +'\n')
Cheat.PrintColor([255,0,0,255], "- Remove freestanding on key" +'\n')
Cheat.PrintColor([255,0,0,255], "- Add checkbox for clock sync" +'\n')
Cheat.PrintColor([255,0,0,255], "- Add commands for training server" +'\n')
Cheat.PrintColor([255,0,0,255], "- Add fps boost" +'\n')
Cheat.PrintColor([255,0,0,255], "- Add checkbox for animated thirdperson" +'\n')
Cheat.PrintColor([255,0,0,255], "- Replace visuals with anti-aim in tabs" +'\n')
Cheat.PrintColor([255,0,0,255], "- Finnaly add enabling other checkboxes on enable function checkbox" +'\n')
Cheat.PrintColor([255,0,0,255], "- Add two types of grenade warning" +'\n')
Cheat.PrintColor([255,0,0,255], "- Add color pickers for all indicators" +'\n')
Cheat.Print('\n')
Cheat.Print('\n')
Cheat.PrintColor([145,197,56,255], "[UPDATE LOG V1.8]" + '\n')
Cheat.PrintColor([255,0,0,255], "- Add tabs for AA, RAGE, VISUALS, MISC" +'\n')
Cheat.PrintColor([255,0,0,255], "- remove custom scope" +'\n')
Cheat.PrintColor([255,0,0,255], "- Add custom arms skin" +'\n')
Cheat.Print('\n')
Cheat.Print('\n')
Cheat.Print('\n')
Cheat.Print('\n')
Cheat.Print('\n')
Cheat.Print('\n')
Cheat.Print('\n')
Cheat.Print('\n')
Cheat.Print('\n')
Cheat.Print('\n')
Cheat.Print('\n')

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;
    var clip = Entity.GetProp(index, "DT_BaseCombatWeapon", "m_iClip1");
    var getbuttons = Entity.GetProp(index,'CBasePlayer', 'm_fFlags' );
    if(weapon || clip == 0 || getbuttons & 1 << 1 ) return false;
    return true;
}

function VectorAdd(a, b){
    return [a[0] + b[0], a[1] + b[1], a[2] + b[2]];
}

function VectorDot(a, b){
    return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
}

function VectorLength(x, y, z){
    return Math.sqrt(x * x + y * y + z * z);
}

function VectorNormalize(vec){
    var length = VectorLength(vec[0], vec[1], vec[2]);
    return [vec[0] / length, vec[1] / length, vec[2] / length];
}

function VectorSubtract(a, b){
    return [a[0] - b[0], a[1] - b[1], a[2] - b[2]];
}

function VectorMultiply(a, b){
    return [a[0] * b[0], a[1] * b[1], a[2] * b[2]];
}

function VectorDistance(a, b){
    return VectorLength(a[0] - b[0], a[1] - b[1], a[2] - b[2]);
}

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;
}

var dormant_aim_shot = true;
function dormantAim(){
    if(!UI.IsHotkeyActive("Script items", "Dormant Aimbot")) return;
    if(!can_shoot(Entity.GetLocalPlayer())) return;
    var e = Entity.GetEnemies();
    var d = e.filter(function(e){
        return Entity.IsDormant(e) && Entity.IsAlive(e) && Trace.Bullet(Entity.GetLocalPlayer(), e, Entity.GetEyePosition(Entity.GetLocalPlayer()), VectorAdd(Entity.GetRenderOrigin(e), [0, 0, 45]))[1] > 1;
    });
    var c = d.sort(function(a, b){
        return Trace.Bullet(Entity.GetLocalPlayer(), a, Entity.GetEyePosition(Entity.GetLocalPlayer()), VectorAdd(Entity.GetRenderOrigin(a), [0, 0, 45]))[1] - Trace.Bullet(Entity.GetLocalPlayer(), b, Entity.GetEyePosition(Entity.GetLocalPlayer()), VectorAdd(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(VectorSubtract(VectorAdd(Entity.GetRenderOrigin(c), [0, 0, 45]),Entity.GetEyePosition(Entity.GetLocalPlayer())));
    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");
    dormant_aim_shot = true;

  
  
    dmg = Trace.Bullet(Entity.GetLocalPlayer(), c, Entity.GetEyePosition(Entity.GetLocalPlayer()), VectorAdd(Entity.GetRenderOrigin(c), [0, 0, 45]))[1];
    }
}

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

function draw9() {

    if (!UI.GetValue("MISC", "JAVASCRIPT", "Script Items", "Display watermark")) return;

if(!World.GetServerString())
  return;

var ping = Math.round(Entity.GetProp(Entity.GetLocalPlayer(), "CPlayerResource", "m_iPing")).toString()
var fps = Math.floor(1 / Global.Frametime());
var today = new Date();
  var hours1 = today.getHours();
  var minutes1 = today.getMinutes();
var seconds1 = today.getSeconds();
var value = Math.min(Math.abs(Local.GetRealYaw() - Local.GetFakeYaw()) + 2, 60)["toFixed"](0);
  var hours = hours1 <= 9 ? "0"+hours1+":" : hours1+":";
  var minutes = minutes1 <= 9 ? "0" + minutes1+":" : minutes1+":";
var seconds = seconds1 <= 9 ? "0" + seconds1 : seconds1;
var server_tickrate = Globals.Tickrate().toString()
var ebanaya_hueta = Math.round(Entity.GetProp(Entity.GetLocalPlayer(), "CPlayerResource", "m_iPing")).toString()
  var speed = Math.sqrt(Entity.GetProp(Entity.GetLocalPlayer(), "CBasePlayer", "m_vecVelocity[0]")).toString() //
color = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Watermark color");
var font = Render.AddFont("Verdana", 7, 400);
var text = "BLOODTECH | version: 1.9.1 | user: [" + Cheat.GetUsername() + "] | " + fps + " fps | " + ping + " ms / " + server_tickrate + " tick | "+ hours + minutes + seconds;
var w = Render.TextSizeCustom(text, font)[0] + 8;
var x = Global.GetScreenSize()[0] /2;
var y = Global.GetScreenSize()[1] /2;

x = x - w - 10;

Render.GradientRect( x + 430, 1048, w - 200, 2, 1, [ color[0], color[1], color[2], 0 ], [ color[0], color[1], color[2], 255 ]);
Render.GradientRect( x + 230, 1048, w - 200, 2, 1, [ color[0], color[1], color[2], 255 ], [ color[0], color[1], color[2], 0 ]);
Render.FilledRect(x + 230, 1048, w, 2, [ color[0], color[1], color[2], 85 ]);
Render.FilledRect(x + 230, 1050, w, 16, [ 17, 17, 17, color[3] ]);
Render.StringCustom(x+234, 1050, 0, text, [ 255, 255, 255, 245 ], font);
}

UI.SetValue("Misc", "GENERAL", "Miscellaneous", "Hidden cvars", true)

function isDoubleTapActive()
{
    var isCheckboxActive = UI.GetValue("Rage", "Exploits", "Doubletap");
    var isKeyActive = UI.IsHotkeyActive("Rage", "Exploits", "Doubletap");
  
    return isCheckboxActive && isKeyActive;
}

function correctLBYMode()
{
    if (isDoubleTapActive() == 1)
    {
            UI.SetValue("Rage", "AUTOSNIPER", "Accuracy", "Auto stop mode", 6);
    }
    else
    {
            UI.SetValue("Rage", "AUTOSNIPER", "Accuracy", "Auto stop mode", 64);
    }
}

correctLBYMode();

autostopmodescout = UI.GetValue("Rage", "SCOUT", "Accuracy", "Auto stop mode"); autostopmodeawp = UI.GetValue("Rage", "AWP", "Accuracy", "Auto stop mode"); safepointscout = UI.GetValue("Rage", "SCOUT", "Accuracy", "Prefer safe point"); safepointawp = UI.GetValue("Rage", "AWP", "Accuracy", "Prefer safe point"); bodyaimscout = UI.GetValue("Rage", "SCOUT", "Accuracy", "Prefer body aim"); bodyaimawp = UI.GetValue("Rage", "AWP", "Accuracy", "Prefer body aim");

function helper() {
  
    if (UI.GetValue("Script items", "Peek Helper for AWP/Scout", true)) {
        if (UI.IsHotkeyActive("Misc", "GENERAL", "Movement", "Auto peek") && UI.IsHotkeyActive("Rage", "GENERAL", "Exploits", "Doubletap")) {
                UI.SetValue("Rage", "SCOUT", "Accuracy", "Auto stop mode", false);
                UI.SetValue("Rage", "AWP", "Accuracy", "Auto stop mode", false);
                UI.SetValue("Rage", "SCOUT", "Accuracy", "Prefer safe point", true);
                UI.SetValue("Rage", "AWP", "Accuracy", "Prefer safe point", true);
                UI.SetValue("Rage", "SCOUT", "Accuracy", "Prefer body aim", 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", "Auto stop mode", autostopmodescout);
                UI.SetValue("Rage", "AWP", "Accuracy", "Auto stop mode", autostopmodeawp);
                UI.SetValue("Rage", "SCOUT", "Accuracy", "Prefer safe point", safepointscout);
                UI.SetValue("Rage", "AWP", "Accuracy", "Prefer safe point", safepointawp);
                UI.SetValue("Rage", "SCOUT", "Accuracy", "Prefer body aim", bodyaimscout);
                UI.SetValue("Rage", "AWP", "Accuracy", "Prefer body aim", bodyaimawp);
                UI.SetValue ("Anti-Aim", "Rage Anti-Aim", "Auto direction", false);
        }
        } else {
                UI.SetValue("Rage", "SCOUT", "Accuracy", "Auto stop mode", autostopmodescout);
                UI.SetValue("Rage", "AWP", "Accuracy", "Auto stop mode", autostopmodeawp);
                UI.SetValue("Rage", "SCOUT", "Accuracy", "Prefer safe point", safepointscout);
                UI.SetValue("Rage", "AWP", "Accuracy", "Prefer safe point", safepointawp);
                UI.SetValue("Rage", "SCOUT", "Accuracy", "Prefer body aim", bodyaimscout);
                UI.SetValue("Rage", "AWP", "Accuracy", "Prefer body aim", bodyaimawp);
                UI.SetValue ("Anti-Aim", "Rage Anti-Aim", "Auto direction", false);
        }             
    }                     


function unloadhelper() {
                UI.SetValue("Rage", "SCOUT", "Accuracy", "Auto stop mode", autostopmodescout);
                UI.SetValue("Rage", "AWP", "Accuracy", "Auto stop mode", autostopmodeawp);
                UI.SetValue("Rage", "SCOUT", "Accuracy", "Prefer safe point", safepointscout);
                UI.SetValue("Rage", "AWP", "Accuracy", "Prefer safe point", safepointawp);
                UI.SetValue("Rage", "SCOUT", "Accuracy", "Prefer body aim", bodyaimscout);
                UI.SetValue("Rage", "AWP", "Accuracy", "Prefer body aim", bodyaimawp); 
                UI.ToggleHotkey("Misc", "JAVASCRIPT", "Script items", "Freestanding");
}

LPx = [(screen_size[0] /2) - 30, (screen_size[1] /2) + 7];
LPy = [(screen_size[0] /2) - 30, (screen_size[1] /2) - 7];
LPz = [(screen_size[0] /2) - 43, (screen_size[1] /2)];
RPx = [(screen_size[0] /2) + 30, (screen_size[1] /2) + 7];
RPy = [(screen_size[0] /2) + 30, (screen_size[1] /2) - 7];
RPz = [(screen_size[0] /2) + 43, (screen_size[1] /2)];

function drawind()
{
    correctLBYMode();

    drawLeft = UI.IsHotkeyActive( "Misc", "JAVASCRIPT", "Script items", "Left" )
    drawRight = UI.IsHotkeyActive( "Misc", "JAVASCRIPT", "Script items", "Right" )
    arrown = UI.GetColor( "Misc", "JAVASCRIPT", "Script items", "Arrows color" );
    arrow = UI.GetColor( "Misc", "JAVASCRIPT", "Script items", "Selected arrow color" );
                  color = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Selected inverter color");
                  real_yaw = Local.GetRealYaw();
                  fake_yaw = Local.GetFakeYaw();
                  delta = Math.min(Math.abs(real_yaw - fake_yaw) / 2, 60).toFixed(0);
                      isInverter = UI.IsHotkeyActive("Anti-Aim", "Fake angles", "Inverter");
                  isDesyncMode = UI.GetValue("Anti-Aim", "Fake angles", "Fake desync");
  
  
        if(UI.GetValue('Misc', 'JAVASCRIPT', 'Script items', 'Display arrows'))
        {
                                    if (isDesyncMode == 0){

                                    if (isInverter == 1)
                                    {
                                    Render.FilledRect((screen_size[0] /2) - 29, (screen_size[1] /2) - 7, 2, 15, [color[0], color[1], color[2], 255]);   
                                    Render.FilledRect((screen_size[0] /2) + 27, (screen_size[1] /2) - 7, 2, 15, [arrown[0], arrown[1], arrown[2], arrown[3]]);   
                                    }
                                    else if(isInverter == 0)
                                    {
                                    Render.FilledRect((screen_size[0] /2) + 27, (screen_size[1] /2) - 7, 2, 15, [color[0], color[1], color[2], 255]);     
                                    Render.FilledRect((screen_size[0] /2) - 29, (screen_size[1] /2) - 7, 2, 15, [arrown[0], arrown[1], arrown[2], arrown[3]]);   
                                    }
                                }
                                    if (isDesyncMode == 1){

                                    if (isInverter == 1)
                                    {
                                    Render.FilledRect((screen_size[0] /2) + 41, (screen_size[1] /2) - 10, 2, 21, [color[0], color[1], color[2], 255]);
                                    }
                                    else if(isInverter == 0)
                                    {
                                    Render.FilledRect((screen_size[0] /2) - 43, (screen_size[1] /2) - 10, 2, 21, [color[0], color[1], color[2], 255]);
                                    }
                                }
                                    if(drawLeft)
                                    {
                                    Render.Polygon([RPy, RPz, RPx], [arrown[0], arrown[1], arrown[2], arrown[3]]); 
                                    Render.Polygon([LPx, LPz, LPy], [arrow[0], arrow[1], arrow[2], 255]);
                                    }
                              
                                    else if(drawRight)
                                    {
                                    Render.Polygon([RPy, RPz, RPx], [arrow[0], arrow[1], arrow[2], 255]); 
                                    Render.Polygon([LPx, LPz, LPy], [arrown[0], arrown[1], arrown[2], arrown[3]]);
                                    }

                                    else if(drawNotActive)
                                    {
                                    Render.Polygon([RPy, RPz, RPx], [arrown[0], arrown[1], arrown[2], arrown[3]]); 
                                    Render.Polygon([LPx, LPz, LPy], [arrown[0], arrown[1], arrown[2], arrown[3]]);
                                    }
                                       }
                                }


function ManualAA()
{
    if (UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "Right"))
    {
        if (original_aa)
        {
            yaw_offset_cache = UI.GetValue ("Anti-Aim", "Rage Anti-Aim", "Yaw offset");
            original_aa = false;
        }
        UI.SetValue ("Anti-Aim", "Rage Anti-Aim", "Yaw offset", 90);
    }
    else if (UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "Left"))
    {
        if (original_aa)
        {
            yaw_offset_cache = UI.GetValue ("Anti-Aim", "Rage Anti-Aim", "Yaw offset");
            original_aa = false;
        }
        UI.SetValue ("Anti-Aim", "Rage Anti-Aim", "Yaw offset", -90);
    }
    else
    {
        if (!original_aa)
        {
            UI.SetValue ("Anti-Aim", "Rage Anti-Aim", "Yaw offset", yaw_offset_cache);
            original_aa = true;
        }
    }
}

function player_connect(){
    lastPressed = Global.Tickcount();
    oldTick = Global.Tickcount();

    time = Globals.Curtime();
}

function GetVelocity()
{
    var velocity = Entity.GetProp(Entity.GetLocalPlayer(), "CBasePlayer", "m_vecVelocity[0]");
    return Math.sqrt(velocity[0] * velocity[0] + velocity[1] * velocity[1]);
}

function isHActive() {
    var isCheckboxActive1 = UI.GetValue("Rage", "Exploits", "Hide shots");
    var isKeyActive1 = UI.IsHotkeyActive("Rage", "Exploits", "Hide shots");

    return isCheckboxActive1 && isKeyActive1;
}

function draw()
{
    var ping = Math.round(Entity.GetProp(Entity.GetLocalPlayer(), "CPlayerResource", "m_iPing")).toString()
    var ping2 = Math.floor(Local.Latency()*1000/19.5);
    var today = new Date();
    var hours1 = today.getHours();
    var minutes1 = today.getMinutes();
    var seconds1 = today.getSeconds();
    var hours = hours1 <= 9 ? "0" + today.getHours() + ":" : today.getHours() + ":";
    var minutes = minutes1 <= 9 ? "0" + today.getMinutes() + ":" : today.getMinutes() + ":";
    var seconds = seconds1 <= 9 ? "0" + today.getSeconds() : today.getSeconds()    ;
    var screen_size = Render.GetScreenSize()
    var font2 = Render.AddFont( "Small Fonts", 7, 0);
    var local = Entity.GetLocalPlayer();
    var text  = "latency: " + (ping * 1) + "ms " + " ticks: " + Globals.Tickrate().toString() + "  time: " + hours + minutes + seconds ;
    var fps = Math.floor(1 / Global.Frametime());
  
    g_Local_weapon = Entity.GetWeapon(local);
    g_Local_classname = Entity.GetClassName(g_Local_weapon);

    var x1 = screen_size[0] / 2;
    var y1 = screen_size[1] - 148;
  
    var x2 = screen_size[0] / 2 + 25;
    var y2 = screen_size[1] - 110;
  
    var x3 = screen_size[0] / 2 - 25;
    var y3 = screen_size[1] - 110;         
  
    var y4 = screen_size[1] - 125; 
    var alpha_1 = Math.sin(Math.abs(-Math.PI + (Globals.Curtime() * (1 / .75)) % (Math.PI * 2))) * 255;     
    var alpha_2 = Math.sin(Globals.Curtime() * 2.5) * 55 + 200; 
    var alpha_3 = Math.sin(Globals.Curtime() * 4) * 55 + 200;     
  
    if(!Entity.IsAlive(local))
        return;


var trWidth = 17;
var trHeight = 18;
var LX = screen_size[0] / 2 - trWidth / 1 + 7;
var RX = screen_size[0] / 2 + trWidth / 1 - 8;
var UY = screen_size[1] - 103 - trHeight ;
var DY = screen_size[1] - 103;
var fontSize = 10;
var font3 = Render.AddFont( "Verdana", fontSize, 0);
var font4 = Render.AddFont( "Verdana", 7, 0);

var signColor = [ 255, 207, 48, 255 ];
var shadowColor = [ 194, 159, 47, 255 ];
var green = [36, 240, 80,255];
var red = [250, 42, 42, 255];
var redsafe = [250, 42, 42, 255];

if(UI.GetValue("Script Items", "Enable clock sync"))
{
    if (ping > 69)
    {
    Render.StringCustom(screen_size[0] / 3 - -317, UY + 3, 0, "!", [64, 50, 15, 200], font3 );             
    Render.StringCustom(screen_size[0] / 3 - -318, UY + 3, 0, "!", ping < 69 ? signColor : [red[0],red[1],red[2],alpha_3 ], font3 );   
    }
    else
    { 
    Render.StringCustom(screen_size[0] / 3 - -317, UY + 3, 0, "!", [64, 50, 15, 200], font3 );             
    Render.StringCustom(screen_size[0] / 3 - -318 * 1.0031, UY + 3, 0, "!", signColor, font3 );             
    }


    if (ping > 69)
    {
//низ
    Render.Line( LX, DY, RX, DY, ping < 69 ? signColor : [red[0],red[1],red[2],alpha_3 ]);


  
//бок левый
    Render.Line( screen_size[0] / 2, UY , LX , DY, ping < 69 ? signColor : [red[0],red[1],red[2],alpha_3 ] );

  
//бок правый
    Render.Line( screen_size[0] / 2, UY , RX, DY, ping < 69 ? signColor : [red[0],red[1],red[2],alpha_3 ] );
    }
    else
    {
//низ
    Render.Line( LX, DY, RX, DY, signColor);
  
  
//бок левый
    Render.Line( screen_size[0] / 2, UY , LX , DY, signColor);



    Render.Line( screen_size[0] / 2, UY - -0, LX - -0, DY - 1, shadowColor);


  
//бок правый
    Render.Line( screen_size[0] / 2, UY , RX, DY, signColor);



    Render.Line( screen_size[0] / 2 + -0, UY - 1, RX + 0, DY - 1, shadowColor);


    }

//текст графа
var lp = Entity.GetLocalPlayer();
    var velocity = Math.round(GetVelocity(lp)); 

    {
    if (ping < 69)
    {
    Render.StringCustom(screen_size[0] / 2 - 75, screen_size[1] - 112, 0, "clock syncing", [0,0,0,alpha_3], font2 ); 
    Render.StringCustom(screen_size[0] / 2 - 74, screen_size[1] - 113, 0, "clock syncing", [255,255,255,alpha_3 ], font2 );
    Render.StringCustom(screen_size[0] / 2 + 18, screen_size[1] - 112, 0, "+-" + ping2 / 1  +"."+ ping2 * 3/1+"ms", [0,0,0,255], font2 ); 
    Render.StringCustom(screen_size[0] / 2 + 17, screen_size[1] - 113, 0, "+-" + ping2 / 1  +"."+ ping2 * 3/1+"ms", [255,255,255,255 ], font2 );
    Render.StringCustom(screen_size[0] / 2 - 75, screen_size[1] - 92, 0, "loss:(+-"+ ping2 / 5+")  ", [0,0,0,255], font2 ); 
    Render.StringCustom(screen_size[0] / 2 - 74, screen_size[1] - 93, 0, "loss:(+-"+ ping2 / 5+")  ", [255,255,255,255], font2);
    Render.StringCustom(screen_size[0] / 2 - 18, screen_size[1] - 92, 0, "ping: " + "          fps:", [0,0,0,255], font2 ); 
    Render.StringCustom(screen_size[0] / 2 - 19, screen_size[1] - 93, 0, "ping: " + "          fps:", [255,255,255,255], font2);
    Render.StringCustom(screen_size[0] / 2 + 30, screen_size[1] - 92, 0, "    " + fps, [0,0,0,255], font2 ); 
    Render.StringCustom(screen_size[0] / 2 + 31, screen_size[1] - 93, 0, "    " + fps, [255,255,255,255], font2);
    Render.StringCustom(screen_size[0] / 2 - 75, screen_size[1] - 71, 0, "time: " + hours + minutes + seconds + "   ticks: " + Globals.Tickrate().toString() + "   velocity: " + (GetVelocity().toFixed(0)).toString() + " u/s " , [0,0,0,255], font2 ); 
    Render.StringCustom(screen_size[0] / 2 - 74, screen_size[1] - 72, 0, "time: " + hours + minutes + seconds + "   ticks: " + Globals.Tickrate().toString() + "   velocity: " + (GetVelocity().toFixed(0)).toString() + " u/s ", [255,255,255,255], font2 );
// fps < 60 ? [red[0],red[1],red[2],alpha_3 ] :   
  
    Render.StringCustom(screen_size[0] / 2 + 0, screen_size[1] - 92, 0, " " + ping, [0,0,0,255], font2 ); 
    Render.StringCustom(screen_size[0] / 2 + 1, screen_size[1] - 93, 0, " " + ping, ping > 60 ? [255, 125, 95, 255 ] : [255,255,255,255], font2);
    }
    else
    { 
    Render.StringCustom(screen_size[0] / 2 - 80, screen_size[1] - 112, 0, "lost connection ", [0,0,0,alpha_3], font2 ); 
    Render.StringCustom(screen_size[0] / 2 - 79, screen_size[1] - 113, 0, "lost connection ", [255,255,255,alpha_3 ], font2 );
    Render.StringCustom(screen_size[0] / 2 + 18, screen_size[1] - 112, 0, "+-" + ping2 / 1  +"."+ ping2 * 3/1+"ms", [0,0,0,alpha_3], font2 ); 
    Render.StringCustom(screen_size[0] / 2 + 17, screen_size[1] - 113, 0, "+-" + ping2 / 1  +"."+ ping2 * 3/1+"ms", [255,255,255,alpha_3 ], font2 );
    Render.StringCustom(screen_size[0] / 2 - 56, screen_size[1] - 92, 0, "(+-"+ ping2 / 4+")  ", [0,0,0,255], font2 );
    Render.StringCustom(screen_size[0] / 2 - 80, screen_size[1] - 92, 0, "loss:", [0,0,0,255], font2 ); 
    Render.StringCustom(screen_size[0] / 2 - 79, screen_size[1] - 93, 0, "loss:", [255,255,255,255], font2);
    Render.StringCustom(screen_size[0] / 2 - 61, screen_size[1] - 93, 0, "  (+-"+ ping2 / 4+")  ", [255, 82, 62, 255], font2);
    Render.StringCustom(screen_size[0] / 2 - 25, screen_size[1] - 92, 0, "ping: " + "          fps:", [0,0,0,255], font2 ); 
    Render.StringCustom(screen_size[0] / 2 - 25, screen_size[1] - 93, 0, "ping: " + "          fps:", [255,255,255,255], font2);
    Render.StringCustom(screen_size[0] / 2 + 27, screen_size[1] - 92, 0, "    " + fps, [0,0,0,255], font2 ); 
    Render.StringCustom(screen_size[0] / 2 + 26, screen_size[1] - 93, 0, "    " + fps,[255,255,255,255], font2);
    Render.StringCustom(screen_size[0] / 2 + -6, screen_size[1] - 92, 0, " " + ping, [0,0,0,255], font2 ); 
    Render.StringCustom(screen_size[0] / 2 + -7, screen_size[1] - 93, 0, " " + ping, ping > 60 ? [255, 125, 95, 255 ] : [255,255,255,255], font2);
    Render.StringCustom(screen_size[0] / 2 - 79, screen_size[1] - 71, 0, "time: " + hours + minutes + seconds + "   ticks: " + Globals.Tickrate().toString() + "   velocity: " + (GetVelocity().toFixed(0)).toString() + " u/s " , [0,0,0,255], font2 ); 
    Render.StringCustom(screen_size[0] / 2 - 78, screen_size[1] - 72, 0, "time: " + hours + minutes + seconds + "   ticks: " + Globals.Tickrate().toString() + "   velocity: " + (GetVelocity().toFixed(0)).toString() + " u/s ", [255,255,255,255], font2 );
    }
}

  
  
  
    Render.StringCustom(screen_size[0] / 2 - 48, screen_size[1] - 31, 0, "        exploit: ", [0,0,0,255], font2 );
    Render.StringCustom(screen_size[0] / 2 - 47, screen_size[1] - 32, 0, "        exploit: ", [255,255,255,255], font2 );
                  Render.StringCustom(screen_size[0] / 2 - 40, screen_size[1] - 21, 0, "lagcomp: ", [0,0,0,255], font2 );
    Render.StringCustom(screen_size[0] / 2 - 39, screen_size[1] - 22, 0, "lagcomp: ", [255,255,255,255], font2 );

  

  
    if (isHActive() == 1)
    {
    Render.StringCustom(screen_size[0] / 2 + 3, screen_size[1] - 21, 0, "broken", [0, 0, 0,255], font2 );
    Render.StringCustom(screen_size[0] / 2 + 2, screen_size[1] - 22, 0, "broken", green, font2 );
    }
    if (isHActive() == 0)
    {
    Render.StringCustom(screen_size[0] / 2 + 2, screen_size[1] - 21, 0, "unsafe", [0, 0, 0,255], font2 );
    Render.StringCustom(screen_size[0] / 2 + 2, screen_size[1] - 22, 0, "unsafe", red, font2 );
    }
    if (isDoubleTapActive() == 1)
    {
    Render.StringCustom(screen_size[0] / 2 + 3, screen_size[1] - 31, 0, "shifting", [0, 0, 0,255], font2 );
    Render.StringCustom(screen_size[0] / 2 + 2, screen_size[1] - 32, 0, "shifting", green, font2 );
                  }
    if (isDoubleTapActive() == 0)
    {
    Render.StringCustom(screen_size[0] / 2 + 3, screen_size[1] - 31, 0, "disabled", [0, 0, 0,255], font2 );
    Render.StringCustom(screen_size[0] / 2 + 2, screen_size[1] - 32, 0, "disabled", red, font2 );
    }
  }
}

function fsn( ) {
    ui_arat_val = UI.GetValue( "Aspect ratio" );

    switch ( Global.FrameStage( ) ) {
        case 5: {
            Global.ExecuteCommand( "r_aspectratio " + ui_arat_val.toString()/100 );

            break;
        }
        default: break;
    }
}


function safeAWP() {
    SlocalPlayer = Entity.GetLocalPlayer()
    SlocalPlayerWeapon = Entity.GetWeapon(SlocalPlayer)
    SlocalPlayerWeaponName = Entity.GetName(SlocalPlayerWeapon)

                  if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Safe AWP")) {
    if (SlocalPlayerWeaponName == 'awp' ) {
        forceSafePoint = UI.IsHotkeyActive('Rage', 'GENERAL', 'General', 'Force safe point')
        if (!forceSafePoint) {
            UI.ToggleHotkey('Rage', 'GENERAL', 'General', 'Force safe point')
            safePBackup = true
        }
    } else if (safePBackup) {
        UI.ToggleHotkey('Rage', 'GENERAL', 'General', 'Force safe point')
        safePBackup = false
    }
}
}

function pingspike()
{
    if (UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "pingspike"))
    {
        UI.SetValue ("Misc", "GENERAL", "Miscellaneous", "Extended backtracking", true);
    }
    else
    {
        {
        UI.SetValue ("Misc", "GENERAL", "Miscellaneous", "Extended backtracking", false);
        }
    }
}

function pHurt() {
    attackerEntity = Entity.GetEntityFromUserID(Event.GetInt("attacker"));
    localEntity = Entity.GetLocalPlayer();

    if (attackerEntity == localEntity) {
        victimName = Entity.GetName(Entity.GetEntityFromUserID(Event.GetInt("userid")));
  
        hitboxName = getHitboxName(Event.GetInt("hitgroup"));
  
        damageDone = Event.GetInt("dmg_health");
        healthRemaining = Event.GetInt("health");
  
        hurtLogs.push([victimName, hitboxName, damageDone, healthRemaining, 0, 255, (Math.random() * (0.2 - 1.200) + 1.200).toFixed(4), Globals.Curtime()]);
    }
}

hurtLogs = [ ];

typeSpeed = 0.05;
fadeOutSpeed = 8;
showDelayTime = typeSpeed + Globals.Curtime();
function showOrHide() {
    for (var i = 0; i < hurtLogs.length; i++) {
        hurtLogs[i][4]++;
        toSay =  victimName + " "+ hitboxName  + " " + damageDone  + " "+ "(" + healthRemaining +")";
        if(Globals.Curtime() - hurtLogs[i][7] < 2)
        {
            continue
        }
        hurtLogs[i][5] -= Globals.Frametime() * 500;
  
        if (hurtLogs[i][5] < 0) {
            hurtLogs.shift(i, 1);
        }
    }
}

function drawLogs() {
    localplayer_index = Entity.GetLocalPlayer( );
    localplayer_alive = Entity.IsAlive( localplayer_index );
        if (localplayer_alive == true){
            screen = Render.GetScreenSize()
            textX = (screen[0]/2)
            add_y = add_y + 20
            textY = (screen[1]/2) + add_y
  
            textYIncrement = 12;
      
            textCol = [255, 255, 255];
  
      
            for (var i = 0; i < hurtLogs.length; i++) {
                currentLog = hurtLogs[i];
          
                victimName = currentLog[0];
                hitboxName = currentLog[1];
                damageDone = currentLog[2];
                healthRemaining = currentLog[3]
          
                currentTextPos = textY + (textYIncrement * i);
          
                toSay =  victimName + " "+ hitboxName  + " " + "-"+damageDone  + " "+ "(" + healthRemaining +")";
  
                textCol = [255,255,255];
                textColdead = [200,0,0];
                if (UI.GetValue("Script items", "hitlogs under crosshair") == 1)
                {
                if (healthRemaining > 0){
                    Render.String(textX + 1, currentTextPos + 1, 1, toSay, [0, 0, 0, hurtLogs[i][5]], 3);
                    Render.String(textX, currentTextPos, 1, toSay, [textCol[0], textCol[1], textCol[2], hurtLogs[i][5]], 3);
                }
                if (healthRemaining <= 0){
                    Render.String(textX + 1, currentTextPos + 1, 1, toSay, [0, 0, 0, hurtLogs[i][5]], 3);
                    Render.String(textX, currentTextPos, 1, toSay, [textColdead[0], textColdead[1], textColdead[2], hurtLogs[i][5]], 3);
                }
            }
        }
    }
}

hitboxes = [
    'generic',
    'head',
    'chest',
    'stomach',
    'left arm',
    'right arm',
    'left leg',
    'right leg',
    '?'
];
var scriptitems = ("Misc", "JAVASCRIPT", "Script items");
var shots = 0;
var predicthc = 0;
var safety = 0;
var hitboxName = "";
var choked = 0;
var exploit = 0;
var logs = [];
var logsct = [];
var logsalpha = [];
function getHitboxName(index)
{
    switch (index)
    {
        case 0:
            hitboxName = "head";
            break;
        case 1:
            hitboxName = "head";
            break;
        case 2:
            hitboxName = "stomach";
            break;
        case 3:
            hitboxName = "stomach";
            break;
        case 4:
            hitboxName = "stomach";
            break;
        case 5:
            hitboxName = "chest";
            break;
        case 6:
            hitboxName = "chest";
            break;
        case 7:
            hitboxName = "left leg";
            break;
        case 8:
            hitboxName = "right leg";
            break;
        case 9:
            hitboxName = "left leg";
            break;
        case 10:
            hitboxName = "right leg";
            break;
        case 11:
            hitboxName = "left leg";
            break;
        case 12:
            hitboxName = "right leg";
            break;
        case 13:
            hitboxName = "left arm";
            break;
        case 14:
            hitboxName = "right arm";
            break;
        case 15:
            hitboxName = "left arm";
            break;
        case 16:
            hitboxName = "left arm";
            break;
        case 17:
            hitboxName = "right arm";
            break;
        case 18:
            hitboxName = "right arm";
            break;
        default:
            hitboxName = "body";
    }
    return hitboxName;
}
function HitgroupName(index) {
    return hitboxes[index] || 'body';
                             }

var target = -1;
var shots_fired = 0;
var hits = 0;
var lastUpdate = 0;
var logged = false;

function ragebot_fire() {
    predicthc = Event.GetInt("hitchance");
    safety = Event.GetInt("safepoint");
    hitboxName = getHitboxName(Event.GetInt("hitbox"));
    exploit = (Event.GetInt("exploit")+1).toString();
  target = Event.GetInt("target_index");
  shots_fired++;
  logged = false;
  lastUpdate = Globals.Curtime();
}

function hitlog() {
    var hit = Entity.GetEntityFromUserID(Event.GetInt("userid"));
    var attacker = Entity.GetEntityFromUserID(Event.GetInt("attacker"));
    if (attacker == Entity.GetLocalPlayer() && hit == target) hits++;

    var hittype = "Hit ";
    me = Entity.GetLocalPlayer();
    hitbox = Event.GetInt('hitgroup');
    target_damage = Event.GetInt("dmg_health");
    target_health = Event.GetInt("health");
    victim = Event.GetInt('userid');
    attacker = Event.GetInt('attacker');
    weapon = Event.GetString('weapon');
    victimIndex = Entity.GetEntityFromUserID(victim);
    attackerIndex = Entity.GetEntityFromUserID(attacker);
    name = Entity.GetName(victimIndex);
      var simtime = Globals.Tickcount() % 17;

    var flags = "";

    if (exploit == 2)
      flags += "T";

    flags += "B";

    if (hitbox == 1)
      flags += "H";

      if (safety == 1) {
          safety = "true";
      }
      else {
          safety = "false";
      }

    if (weapon == "hegrenade")
      hittype = "Naded ";
    else if (weapon == "inferno")
      hittype = "Burned ";
    else if (weapon == "knife")
      hittype = "Knifed ";

    if (me == attackerIndex && me != victimIndex) {
        colind = UI.GetColor("Misc", "Script items", "Indicators color")
        Cheat.PrintColor([colind[0], colind[1], colind[2], 255], "[bloodtech] ");
    if (hittype == "Hit ") {
        if (UI.GetValue("Script items", "Enable chat logging")) {
            Cheat.PrintChat(" \x08[\x0cbloodtech\x08] [\x0c"+shots.toString()+"\x08] "+hittype+name+"'s \x10"+HitgroupName(hitbox)+"\x08 for \x07"+target_damage.toString()+"\x08 ("+target_health.toString()+" remaining) aimed=\x10"+hitboxName+"\x08("+predicthc.toString()+"%%) safety=\x03"+safety+"\x08 (\x10"+flags+"\x08) (\x10"+simtime+"\x08:\x10"+exploit+"\x08)\n");
        }
      Cheat.Print("["+shots.toString()+"] "+hittype+name+"'s "+HitgroupName(hitbox)+" for "+target_damage.toString()+" ("+target_health.toString()+" remaining) aimed="+hitboxName+"("+predicthc.toString()+"%%) bt=0 ("+flags+") ("+simtime+":"+exploit+")\n");
          logs.push("["+shots.toString()+"] "+hittype+name+"'s "+HitgroupName(hitbox)+" for "+target_damage.toString()+" ("+target_health.toString()+" remaining) aimed="+hitboxName+"("+predicthc.toString()+"%%) bt=0 ("+flags+") ("+simtime+":"+exploit+")");
    }
    else {
      Cheat.Print("["+shots.toString()+"] "+hittype+name+"'s "+HitgroupName(hitbox)+" for "+target_damage.toString()+" ("+target_health.toString()+" remaining) \n");
          logs.push("["+shots.toString()+"] "+hittype+name+"'s "+HitgroupName(hitbox)+" for "+target_damage.toString()+" ("+target_health.toString()+" remaining)");
    }

        logsct.push(Globals.Curtime());
        logsalpha.push(255);
    }

  if (shots == 99)
    shots = 0;
  else
    shots++;

}

function removelogs() {
    if (logs.length > 6) {
        logs.shift();
        logsct.shift();
        logsalpha.shift();
    }

    if (logsct[0] + 6.5 < Globals.Curtime()) {
        logsalpha[0] -= Globals.Frametime() * 600;
        if (logsalpha[0] < 0) {
            logs.shift();
            logsct.shift();
            logsalpha.shift();
        }
    }
}

function item_purchase() {
    colind = UI.GetColor("Misc", "Script items", "Indicators color")

    Cheat.PrintColor([colind[0], colind[1], colind[2], 255], "[bloodtech] ");
    Cheat.Print(Entity.GetName(Entity.GetEntityFromUserID(Event.GetInt("userid")))+" bought "+Event.GetString("weapon")+"\n");
    logs.push(Entity.GetName(Entity.GetEntityFromUserID(Event.GetInt("userid")))+" bought "+Event.GetString("weapon")+"");
    logsct.push(Globals.Curtime());
    logsalpha.push(255);
}

function onDraw() {
    if (!World.GetServerString()) return;
    var font = Render.AddFont("Lucida Console", 8, 0);


    for (i = 0; i < logs.length; i++) {
        Render.StringCustom(4, 4 + 13*i, 0, logs[i], [0, 0, 0, logsalpha[i]], font);
        Render.StringCustom(3, 3 + 13*i, 0, logs[i], [255, 255, 255, logsalpha[i]], font);
    }

    if (shots_fired > hits && (Globals.Curtime() - lastUpdate > 0.33)) {
      if (Globals.Curtime() - lastUpdate > 1) {
        shots_fired = 0;
        hits = 0;
      }
      if (!logged) {
        var simtime = Globals.Tickcount() % 16;
        logged = true;
        var issafe = "true";
        var reason = "resolver";
        if (safety == 0) {
          issafe = "false";
        }

        if (Entity.IsAlive(target) == false)
            reason = "death";
        else if (Entity.IsAlive(Entity.GetLocalPlayer()) == false)
            reason = "dead";
        else if (safety == true && predicthc < 76)
            reason = "spread";
        else if (safety == true && predicthc > 76)
            reason = "prediction error";

        var flags = "";

        if (exploit == 2)
          flags += "T";

          flags += "B";

        colind = UI.GetColor("Misc", "Script items", "Indicators color")

        Cheat.PrintColor([colind[0], colind[1], colind[2], 255], "[bloodtech] ");
        Cheat.Print("["+shots.toString()+"] "+"Missed "+Entity.GetName(target)+"'s "+hitboxName+"("+predicthc.toString()+"%%) due to "+reason+", bt=0 ("+flags+") ("+simtime+":"+exploit+")\n");
            logs.push("["+shots.toString()+"] "+"Missed "+Entity.GetName(target)+"'s "+hitboxName+"("+predicthc.toString()+"%%) due to "+reason+", bt=0 ("+flags+") ("+simtime+":"+exploit+")");

            if (UI.GetValue("Script items", "Enable chat logging")) {
                Cheat.PrintChat(" \x08[\x0cbloodtech\x08] [\x0c"+shots.toString()+"\x08] "+"\x08Missed "+Entity.GetName(target)+"'s \x10"+hitboxName+"\x08("+predicthc.toString()+"%%) due to \x07"+reason+"\x08, safety=\x03"+issafe+"\x08 (\x10"+flags+"\x08) (\x10"+simtime+"\x08:\x10"+exploit+"\x08)");
            }
        logsct.push(Globals.Curtime());
            logsalpha.push(255);
        if (shots == 99)
          shots = 0;
        else
          shots++;
      }
    }
}

function ragdollForce( )
{
    UI.SetValue("Misc", "GENERAL", "Miscellaneous", "Ragdoll Gravity", "1")
    if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Ragdoll Force")) {
    framestage = Cheat.FrameStage();
    if (framestage == 3)
    {
        entities = Entity.GetEntities();
        for (i = 0; i < entities.length; i++)
        {
            classID = Entity.GetClassID(entities[i]);
            if (classID == 42)
            {
                dir = Entity.GetProp(entities[i], "CCSRagdoll", "m_vecRagdollVelocity");
                dir[0] = 0
                dir[1] = 0
                dir[2] = 999999
                dir1 = Entity.GetProp(entities[i], "CBaseAnimating", "m_vecForce");
                dir1[0] = 0
                dir1[1] = 0
                dir1[2] = 999999
                Entity.SetProp(entities[i], "CCSRagdoll", "m_vecRagdollVelocity", dir);
                Entity.SetProp(entities[i], "CBaseAnimating", "m_vecForce", dir1);
            }
        }
      }
    }
}

function get_velocity(index)
{
    var velocity = Entity.GetProp(index, "CBasePlayer", "m_vecVelocity[0]");
    return Math.sqrt(velocity[0] * velocity[0] + velocity[1] * velocity[1]);
}

function get_health(index)
{
    health_override = Entity.GetProp(index, "CBasePlayer", "m_iHealth");
    return health_override;
}

function Low_delta()
{
       if (UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "Low delta on key"))
        {
            AntiAim.SetOverride(1);
            AntiAim.SetFakeOffset(0);
        if(UI.IsHotkeyActive("Anti-Aim","Inverter"))
        {
                AntiAim.SetRealOffset(16);
        }
        else
        {
                AntiAim.SetRealOffset(-16);
        }
        }
        else
        {
            AntiAim.SetOverride(0);
        }
}

function isActive(a) {
        return UI.IsHotkeyActive("Script items", a)
}

function setValue(cat, value) {
        UI.SetValue("Rage", cat.toUpperCase(), "Targeting", "Minimum damage", value)
}

function isPistol(name) {
        if (name == "p2000" || name == "glock 18" || name == "dual berettas" || name == "usp s" || name == "five seven" || name == "p250" || name == "tec 9") {
                return true
        }
}

function isHeavyPistol(name) {
        if (name == "r8 revolver" || name == "desert eagle") {
                return true
        }
}

function isAutoSniper(name) {
        if (name == "scar 20" || name == "g3sg1") {
                return true
        }
}

var original_dmg = true

function onCM() {
    {
        am = UI.GetValue("Script items", "Weapon Mindmg")
        name = Entity.GetName(Entity.GetWeapon(Entity.GetLocalPlayer()))
        if (UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "Weapon Override"))
        {
            if (original_dmg)
            {
                pc = UI.GetValue("Rage", "PISTOL", "Minimum damage")
                hpc = UI.GetValue("Rage", "HEAVY PISTOL", "Minimum damage")
                scc = UI.GetValue("Rage", "SCOUT", "Minimum damage")
                awpc = UI.GetValue("Rage", "AWP", "Minimum damage")
                atc = UI.GetValue("Rage", "AUTOSNIPER", "Minimum damage")
                original_dmg = false;
            }
            if (isPistol(name))
            {
            UI.SetValue("Rage", "PISTOL", "Minimum damage", am)
            }
            if (isHeavyPistol(name))
            {
            UI.SetValue("Rage", "HEAVY PISTOL", "Minimum damage", am)
            }
            if (name == "ssg 08")
            {
            UI.SetValue("Rage", "SCOUT", "Minimum damage", am)
            }
            if (name == "awp")
            {
            UI.SetValue("Rage", "AWP", "Minimum damage", am)
            }
            if (isAutoSniper(name))
            {
            UI.SetValue("Rage", "AUTOSNIPER", "Minimum damage", am)
            }
        }
        else
        {
            if (!original_dmg)
            {
                UI.SetValue("Rage", "PISTOL", "Minimum damage", pc)
                UI.SetValue("Rage", "HEAVY PISTOL", "Minimum damage", hpc)
                UI.SetValue("Rage", "SCOUT", "Minimum damage", scc)
                UI.SetValue("Rage", "AWP", "Minimum damage", awpc)
                UI.SetValue("Rage", "AUTOSNIPER", "Minimum damage", atc)
                original_dmg = true;
            }
        }
    }
}

alpha_main = 0
alpha_anim = 0
add_anim   = 0

value_duck = 0
alpha_duck_anim = 0
alpha_duck = 0
add_duck   = 0

value_damage = 0
alpha_damage = 0
add_damage   = 0

value_FS = 0
alpha_FS = 0
add_FS   = 0

value_SP = 0
alpha_SP = 0
add_SP   = 0

value_BAIM = 0
alpha_BAIM = 0
add_BAIM   = 0

value_legit = 0
alpha_legit = 0
add_legit   = 0

value_onshot = 0
alpha_onshot = 0
add_onshot   = 0

value_autopeek = 0
alpha_autopeek = 0
add_autopeek   = 0

value_dt = 0
alpha_dt = 0
add_dt   = 0
red_dt   = 0
green_dt = 0

value_hs = 0
alpha_hs = 0
add_hs   = 0

value_ping = 0
alpha_ping = 0
add_ping   = 0

value_DA = 0
alpha_DA = 0
add_DA   = 0

value_arc = 0
alpha_anim_state = false
alpha_duck_state = false

var csgo_weapons = {
    "0": "none",
    "1": "deagle",
    "2": "elite",
    "3": "fiveseven",
    "4": "glock",
    "5": "p228",
    "6": "usp",
    "7": "ak47",
    "8": "aug",
    "9": "awp",
    "10": "famas",
    "11": "g3sg1",
    "12": "galil",
    "13": "galilar",
    "14": "m249",
    "15": "m3",
    "16": "m4a4",
    "17": "mac10",
    "18": "mp5navy",
    "19": "p90",
    "20": "ssg08",
    "21": "sg550",
    "22": "sg552",
    "23": "tmp",
    "24": "ump45",
    "25": "xm1014",
    "26": "bizon",
    "27": "mag7",
    "28": "negev",
    "29": "sawedoff",
    "30": "tec9",
    "31": "taser",
    "32": "hkp2000",
    "33": "mp7",
    "34": "mp9",
    "35": "nova",
    "36": "p250",
    "37": "scar17",
    "38": "scar20",
    "39": "sg556",
    "40": "ssg08",
    "41": "knifegg",
    "42": "knife",
    "43": "flashbang",
    "44": "hegrenade",
    "45": "smokegrenade",
    "46": "molotov",
    "47": "decoy",
    "48": "incgrenade",
    "49": "c4",
    "60": "m4a1",
    "63": "cz75",
    "64": "revolver",
    "197108": "knife",
    "197113": "knife",
    "197114": "knife",
    "197115": "knife",
    "197116": "knife",
    "197123": "knife",
    "197120": "knife",
    "197128": "knife",
    "197124": "knife",
    "197130": "knife",
    "197122": "knife",
    "197117": "knife",
    "197131": "knife",
    "197127": "knife",
    "197111": "knife",
    "197125": "knife",
    "197126": "knife",
    "197129": "knife",
    "197133": "knife",
    "262205": "usp",
    "262208": "revolver"
};
function getWeaponName(){
    var weapon = Entity.GetProp(Entity.GetWeapon(Entity.GetLocalPlayer()), "DT_WeaponBaseItem", "m_iItemDefinitionIndex");
    return csgo_weapons[weapon];
}

function closestTarget(){
    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])) continue;
        dists.push([enemies[e], calcDist(Entity.GetHitboxPosition(Entity.GetLocalPlayer(), 0), Entity.GetHitboxPosition(enemies[e], 0))]);
    }
    dists.sort(function(a, b)
    {
        return a[1] - b[1];
    });
    if(dists.length == 0 || dists == []) return target = -1;
    return dists[0][0];
}

function isInAir(){
    var fv = Entity.GetProp(Entity.GetLocalPlayer(), "CBasePlayer", "m_flFallVelocity");
    if(fv < -1 || fv > 1){
        return true;
    }
    return false;
}

function calcDist(a, b){
    var x = a[0] - b[0];
    var y = a[1] - b[1];
    var 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);
}

var noscope_target = -1;
var noscope_dist = {
    "ssg08": 4,
    "scar20": 7,
    "g3sg1" : 7
};
function autoscope(){
    local = Entity.GetLocalPlayer();
    if(UI.GetValue("Script items", "Adaptive autoscope")){
        if((getWeaponName() !== "ssg08" && getWeaponName() !== "scar20" && getWeaponName() !== "g3sg1") || isInAir()){
            UI.SetValue("Rage", "GENERAL", "General", "Auto scope", true);
            return;
        };
        if(!Ragebot.GetTarget())
            noscope_target = closestTarget();
        else
            noscope_target = Ragebot.GetTarget();
        if(!Entity.IsAlive(noscope_target)){
            UI.SetValue("Rage", "GENERAL", "General", "Auto scope", true);
            return;
        }
        if(get_metric_distance(Entity.GetRenderOrigin(local), Entity.GetRenderOrigin(noscope_target)) < noscope_dist[getWeaponName()]){
            UI.SetValue("Rage", "GENERAL", "General", "Auto scope", false);
        }
        else{
            UI.SetValue("Rage", "GENERAL", "General", "Auto scope", true);
        }
    }
}

//animation function

clamp = function (val, min, max) {
   if (val > max)
      return max
   if (min > val)
      return min
   return val
}
function indication() {
   if (World.GetServerString() == "")
      return;

   player = Entity.GetLocalPlayer()

   isDoubletap = UI.IsHotkeyActive("Rage", "Exploits", "Doubletap") && !(Entity.GetProp(Entity.GetGameRulesProxy(), "CCSGameRulesProxy", "m_bIsValveDS" ))
   IsSAFEP = UI.IsHotkeyActive("Rage", "General", "Force safe point")
   islowdelta = UI.IsHotkeyActive("Script items", "Low delta on key")
   isHideShot = UI.IsHotkeyActive("Rage", "Exploits", "Hide shots") && !(Entity.GetProp(Entity.GetGameRulesProxy(), "CCSGameRulesProxy", "m_bIsValveDS" ))
   isDamageOverride = UI.IsHotkeyActive("Script items", "Weapon Override")
   isForceBody = UI.IsHotkeyActive("Rage", "General", "Force body aim")
   isFakeDuck = UI.IsHotkeyActive("Anti-Aim", "Extra", "Fake duck") && !(Entity.GetProp(Entity.GetGameRulesProxy(), "CCSGameRulesProxy", "m_bIsValveDS" ))
   isAutoPick = UI.IsHotkeyActive("Misc", "GENERAL", "Movement","Auto peek")
   isPing = UI.IsHotkeyActive("Script items", "pingspike")
   isDA = UI.IsHotkeyActive("Script items", "Dormant Aimbot")
   isLegitAA = (UI.GetValue("Anti-aim", "Extra", "Pitch") == 0 ? true : false )
   //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if (UI.GetValue("Script items", "Desync line", true))
   {
   add_y = 20
   }
   else
   {
   add_y = 10
   }

   //animation
   add_factor = 10
   fade_factor = ((1 / .15) * Globals.Frametime() * 200) / 200


   fade_factor_anim = ((1 / .9) * Globals.Frametime()) * 200
   fade_factor_duck = ((1 / .1) * Globals.Frametime()) * 200

   //main
   //Dead animation
   if ((!Entity.IsAlive(player) && alpha_main != 0 || Input.IsKeyPressed(0x09)) )
      alpha_main = clamp(alpha_main - fade_factor * 100, 0, 255)
   if (Entity.IsAlive(player) && alpha_main != 255 && !Input.IsKeyPressed(0x09) )
      alpha_main = clamp(alpha_main + fade_factor * 100, 0, 255)
   //buttons
       if(UI.GetValue('Misc', 'JAVASCRIPT', 'Script items', 'Display indicators' ))
    {
   //Damage animation
    if (isDamageOverride && alpha_damage != 1 && alpha_main == 255){
       value_damage = clamp(value_damage + fade_factor, 0, 1.0)
       alpha_damage = clamp(alpha_damage + fade_factor * value_damage, 0, 1.0)
       add_damage   = clamp(add_damage + fade_factor * value_damage, 0, 1.0)
    }
    if (!isDamageOverride && alpha_damage != 0 || alpha_main != 255){
       value_damage = clamp(value_damage - fade_factor, 0, 1)
       alpha_damage = clamp(alpha_damage - fade_factor * alpha_damage, 0, 1)
       add_damage = clamp(add_damage - fade_factor * add_damage, 0, 1)
    }
    if(alpha_damage < 0.01) alpha_damage = 0
    if(add_damage < 0.01)   add_damage   = 0
   //Baim animation
    if (isForceBody && alpha_BAIM != 1 && alpha_main == 255){
       value_BAIM = clamp(value_BAIM + fade_factor, 0, 1.0)
       alpha_BAIM = clamp(alpha_BAIM + fade_factor * value_BAIM, 0, 1.0)
       add_BAIM   = clamp(add_BAIM + fade_factor * value_BAIM, 0, 1.0)
    }
    if (!isForceBody && alpha_BAIM != 0 || alpha_main != 255){
       value_BAIM = clamp(value_BAIM - fade_factor, 0, 1)
       alpha_BAIM = clamp(alpha_BAIM - fade_factor * alpha_BAIM, 0, 1)
       add_BAIM = clamp(add_BAIM - fade_factor * add_BAIM, 0, 1)
    }
    if(alpha_BAIM < 0.01) alpha_BAIM = 0
    if(add_BAIM < 0.01)   add_BAIM   = 0
   //Auto Peek animation
   if (isAutoPick && alpha_autopeek != 1 && alpha_main == 255){
      value_autopeek = clamp(value_autopeek + fade_factor, 0, 1)
      alpha_autopeek = clamp(alpha_autopeek + fade_factor * value_autopeek, 0, 1)
      add_autopeek   = clamp(add_autopeek   + fade_factor * value_autopeek, 0, 1)
   }
   if (!isAutoPick && alpha_autopeek != 0 || alpha_main != 255){
      value_autopeek = clamp(value_autopeek - fade_factor, 0, 1)
      alpha_autopeek = clamp(alpha_autopeek - fade_factor * alpha_autopeek, 0, 1)
      add_autopeek   = clamp(add_autopeek   - fade_factor * add_autopeek, 0, 1)
   }
      if(alpha_autopeek < 0.01) alpha_autopeek = 0
      if(add_autopeek < 0.01)   add_autopeek   = 0
   //SP animation
   if (IsSAFEP && alpha_SP != 1 && alpha_main == 255){
      value_SP = clamp(value_SP + fade_factor, 0, 1)
      alpha_SP = clamp(alpha_SP + fade_factor * value_SP, 0, 1)
      add_SP   = clamp(add_SP   + fade_factor * value_SP, 0, 1)
   }
   if (!IsSAFEP && alpha_SP != 0 || alpha_main != 255){
      value_SP = clamp(value_SP - fade_factor, 0, 1)
      alpha_SP = clamp(alpha_SP - fade_factor * alpha_SP, 0, 1)
      add_SP   = clamp(add_SP   - fade_factor * add_SP, 0, 1)
   }
      if(alpha_SP < 0.01) alpha_SP = 0
      if(add_SP < 0.01)   add_SP   = 0
   //Ping animation
   if (isPing && alpha_ping != 1 && alpha_main == 255){
      value_ping = clamp(value_ping + fade_factor, 0, 1)
      alpha_ping = clamp(alpha_ping + fade_factor * value_ping, 0, 1)
      add_ping   = clamp(add_ping   + fade_factor * value_ping, 0, 1)
   }
   if (!isPing && alpha_ping != 0 || alpha_main != 255){
      value_ping = clamp(value_ping - fade_factor, 0, 1)
      alpha_ping = clamp(alpha_ping - fade_factor * alpha_ping, 0, 1)
      add_ping   = clamp(add_ping   - fade_factor * add_ping, 0, 1)
   }
      if(alpha_ping < 0.01) alpha_ping = 0
      if(add_ping < 0.01)   add_ping   = 0
    //DA animation
   if (isDA && alpha_DA != 1 && alpha_main == 255){
    value_DA = clamp(value_DA + fade_factor, 0, 1)
    alpha_DA = clamp(alpha_DA + fade_factor * value_DA, 0, 1)
    add_DA   = clamp(add_DA   + fade_factor * value_DA, 0, 1)
}
if (!isDA && alpha_DA != 0 || alpha_main != 255){
    value_DA = clamp(value_DA - fade_factor, 0, 1)
    alpha_DA = clamp(alpha_DA - fade_factor * alpha_DA, 0, 1)
    add_DA   = clamp(add_DA   - fade_factor * add_DA, 0, 1)
}
    if(alpha_DA < 0.01) alpha_DA = 0
    if(add_DA < 0.01)   add_DA   = 0
   //ANIM animation
    if (!isDoubletap && !isHideShot && alpha_main == 255) {
       add_anim = clamp(add_anim + fade_factor, 0, 1)
       if (alpha_anim_state == false) {
          alpha_anim = clamp(alpha_anim + fade_factor_anim, 0, 255)
          if (alpha_anim == 255)
             alpha_anim_state = true
       } else {
          alpha_anim = clamp(alpha_anim - fade_factor_anim, 0, 255)
         if (alpha_anim == 0)
             alpha_anim_state = false
      }
    } else {
      alpha_anim = clamp(alpha_anim - fade_factor * 100, 0, 255)
      add_anim   = clamp(add_anim - fade_factor * add_anim, 0, 1)
    }

   //Fake Duck animation
   if (isFakeDuck) {
      if (alpha_duck_state == false) {
         alpha_duck_anim = clamp(alpha_duck_anim + fade_factor_duck, 0, 255)
         if (alpha_duck_anim == 255)
            alpha_duck_state = true
      } else {
         alpha_duck_anim = clamp(alpha_duck_anim - fade_factor_duck, 0, 255)
         if (alpha_duck_anim == 0)
            alpha_duck_state = false
      }
   }
   if(!isFakeDuck)
      alpha_duck_anim = alpha_duck * 255

   if (isFakeDuck && add_duck != 1 && alpha_main == 255){
      value_duck = clamp(value_duck + fade_factor, 0, 1)
      add_duck   = clamp(add_duck   + fade_factor * value_duck, 0, 1)
      alpha_duck = clamp(alpha_duck + fade_factor * value_duck, 0, 1)
   }
   if (!isFakeDuck && alpha_duck != 0  || alpha_main != 255){
      value_duck = clamp(value_duck - fade_factor, 0, 1)
      add_duck   = clamp(add_duck   - fade_factor * add_duck, 0, 1)
      alpha_duck = clamp(alpha_duck - fade_factor * alpha_duck, 0, 1)
   }
   if(alpha_duck < 0.01) alpha_duck = 0
   if(add_duck < 0.01) add_duck = 0

   if(isDoubletap && Exploit.GetCharge() >= 0.5 ){
      value_arc = clamp(value_arc + fade_factor * 1.2 * value_dt, 0, 1)
     } else {
      value_arc = clamp(value_arc - fade_factor * 1.2 * value_arc, 0, 1)
     }

   if(isDoubletap && Exploit.GetCharge() >= 0.5 ){
      value_arc = clamp(value_arc + fade_factor * 1.2 * value_dt, 0, 1)
     } else {
      value_arc = clamp(value_arc - fade_factor * 1.2 * value_arc, 0, 1)
     }

   //Double tap animation
if(!isFakeDuck && isDoubletap && green_dt != 1 && Exploit.GetCharge() >= 0.3 && alpha_main == 255){
   value_dt = clamp(value_dt + fade_factor , 0, 1)
   alpha_dt = clamp(alpha_dt + fade_factor  * value_dt, 0, 1)
   green_dt = clamp(green_dt + fade_factor  * value_dt, 0, 1)
}

if(!isFakeDuck && isDoubletap) add_dt   = clamp(add_dt   + fade_factor  * value_dt, 0, 1)
if(!isDoubletap || alpha_main != 255 || isFakeDuck) alpha_dt = clamp(alpha_dt - fade_factor  * alpha_dt, 0, 1)
if(!isDoubletap || alpha_main != 255 || isFakeDuck) add_dt   = clamp(add_dt   - fade_factor  * add_dt, 0, 1)

if(!isDoubletap && alpha_dt != 0 || Exploit.GetCharge() <= 0.3  || alpha_main != 255){
   value_dt = clamp(value_dt - fade_factor , 0, 1)
   green_dt = clamp(green_dt - fade_factor * green_dt, 0, 1)

}
if(isDoubletap && red_dt != 150 && Exploit.GetCharge() >= 0.3 && alpha_main == 255)
red_dt = clamp(red_dt   - fade_factor * 75, 150, 255)

if(!isDoubletap && red_dt != 255 || Exploit.GetCharge() <= 0.3 || alpha_main != 255)
red_dt = clamp(red_dt   + fade_factor * 75 , 150, 255)
if(alpha_dt < 0.01) alpha_dt = 0
if(add_dt < 0.01) add_dt = 0
dt_color = [red_dt ,255 * green_dt,0,255 * alpha_dt]
   //Hide Shots Animation
   if(!isFakeDuck && isHideShot && !isDoubletap && alpha_hs != 1 && Exploit.GetCharge() >= 0.3 && alpha_main == 255){
      value_hs = clamp(value_hs + fade_factor , 0, 1)
      alpha_hs = clamp(alpha_hs + fade_factor  * value_hs, 0, 1)
      add_hs = clamp(alpha_hs + fade_factor  * value_hs, 0, 1)
   }

   if(!isHideShot || isDoubletap && alpha_hs != 0 || alpha_main != 255 || isFakeDuck){
      value_hs = clamp(value_hs - fade_factor , 0, 1)
      alpha_hs = clamp(alpha_hs - fade_factor  * alpha_hs, 0, 1)
      add_hs = clamp(alpha_hs - fade_factor  * add_hs, 0, 1)
   }

   hs_color = [250,200,0,alpha_hs * 255]
   colind = UI.GetColor("Misc", "Script items", "Indicators color")


    Render.String(screen_size[0] /2, screen_size[1] /2 + add_y + 1, 1, "bloodtech", [0, 0, 0, alpha_main],3);
    Render.String(screen_size[0] /2, screen_size[1] /2 + add_y, 1, "bloodtech", [colind[0], colind[1], colind[2], alpha_main],3);

    if (islowdelta && UI.IsHotkeyActive("Script items", "Dodge jitter")) {
       add_y = add_y + add_factor
       Render.String(screen_size[0] /2, screen_size[1] / 2 + add_y + 1, 1, "dodge delta", [0, 0, 0, alpha_main], 3);
       Render.String(screen_size[0] /2, screen_size[1] / 2 + add_y, 1, "dodge delta", [colind[0], colind[1], colind[2], alpha_main], 3);
    } else if (islowdelta) {
        add_y = add_y + add_factor
        Render.String(screen_size[0] /2, screen_size[1] / 2 + add_y + 1, 1, "low delta", [0, 0, 0, alpha_main], 3);
        Render.String(screen_size[0] /2, screen_size[1] / 2 + add_y, 1, "low delta", [colind[0], colind[1], colind[2], alpha_main], 3);
    } else if (isLegitAA) {
       add_y = add_y + add_factor
       Render.String(screen_size[0] /2, screen_size[1] / 2 + add_y + 1, 1, "legit aa", [0, 0, 0, alpha_main], 3);
       Render.String(screen_size[0] /2, screen_size[1] / 2 + add_y, 1, "legit aa", [colind[0], colind[1], colind[2], alpha_main], 3);
    } else if (UI.IsHotkeyActive("Script items", "Dodge jitter")) {
        add_y = add_y + add_factor
        Render.String(screen_size[0] /2, screen_size[1] / 2 + add_y + 1, 1, "dodge jitter", [0, 0, 0, alpha_main], 3);
        Render.String(screen_size[0] /2, screen_size[1] / 2 + add_y, 1, "dodge jitter", [colind[0], colind[1], colind[2], alpha_main], 3);
    } else if (UI.IsHotkeyActive("Anti-Aim", "Rage Anti-Aim", "Jitter offset")) {
        add_y = add_y + add_factor
        Render.String(screen_size[0] /2, screen_size[1] / 2 + add_y + 1, 1, "jitter", [0, 0, 0, alpha_main], 3);
        Render.String(screen_size[0] /2, screen_size[1] / 2 + add_y, 1, "jitter", [colind[0], colind[1], colind[2], alpha_main], 3);
    } else {
        add_y = add_y + add_factor
        Render.String(screen_size[0] /2, screen_size[1] / 2 + add_y + 1, 1, "static", [0, 0, 0, alpha_main], 3);
        Render.String(screen_size[0] /2, screen_size[1] / 2 + add_y, 1, "static", [colind[0], colind[1], colind[2], alpha_main], 3);
    }

   if (isFakeDuck || alpha_duck_anim > 0 && alpha_main > 50) {
      add_y = add_y + add_duck * add_factor;
      Render.String(screen_size[0] / 2, screen_size[1] / 2 + 1 + add_y, 1, "duck", [0, 0, 0, alpha_duck_anim], 3);
      Render.String(screen_size[0] / 2, screen_size[1] / 2 + add_y, 1, "duck", [158, 181, 113, alpha_duck_anim], 3);
   }

   if(isDoubletap && Exploit.GetCharge() >= 0.5 ){
      value_arc = clamp(value_arc + fade_factor * 1.2 * value_dt, 0, 1)
     } else {
      value_arc = clamp(value_arc - fade_factor * 1.2 * value_arc, 0, 1)
     }

   //render arc
    if (alpha_main > 50 && Entity.IsAlive(player)) {
      
   //971
        x = (screen_size[0] / 2 + 8)
        y = (screen_size[1] / 2 + 14 + add_dt * add_factor)
        distance = 4.5
        inner_radius = 2.3
        segments = 30
      
      if(value_arc < 0.01) value_arc = 0
        max_angle = 360 * value_arc;
      
       add_y = add_y + add_dt
       render_arc(x + 6, y + add_y - 9, distance, inner_radius, -90, max_angle, segments, [0, 0, 0, 120 * alpha_dt]);
       render_arc(x + 5, y + add_y - 10, distance, inner_radius, -90, max_angle, segments, dt_color);



         function render_arc(x, y, radius, radius_inner, start_angle, end_angle, segments, dt_color) {
          while (360 % segments != 0) {
             segments++;
          }

          segments = 360 / segments;

          for (var i = start_angle; i < start_angle + end_angle; i = i + segments) {

             var rad = i * Math.PI / 180;
               var rad2 = (i + segments) * Math.PI / 180;

             var rad_cos = Math.cos(rad)
              var rad_sin = Math.sin(rad)

              var rad2_cos = Math.cos(rad2);
              var rad2_sin = Math.sin(rad2);

              var x1_outer = x + rad_cos * radius;
              var y1_outer = y + rad_sin * radius;

              var x2_outer = x + rad2_cos * radius;
             var y2_outer = y + rad2_sin * radius;

             var x1_inner = x + rad_cos * radius_inner;
             var y1_inner = y + rad_sin * radius_inner;

             var x2_inner = x + rad2_cos * radius_inner;
             var y2_inner = y + rad2_sin * radius_inner;

             Render.Polygon([
                [x1_outer, y1_outer],
                [x2_outer, y2_outer],
                [x1_inner, y1_inner]
             ],
                dt_color
             );

             Render.Polygon([
                  [x1_inner, y1_inner],
                  [x2_outer, y2_outer],
                 [x2_inner, y2_inner]
               ],
                  dt_color
             );
          }
         }


   if(alpha_dt != 0){
       add_y = add_y + add_dt * add_factor
   Render.String(screen_size[0] /2, screen_size[1] / 2  + add_y + 1 , 1, "dt", [0, 0, 0, dt_color[3]], 3);
   Render.String(screen_size[0] /2, screen_size[1] / 2  + add_y, 1, "dt", dt_color, 3);
   }

   if(alpha_hs != 0){
       add_y = add_y + add_hs * add_factor
   Render.String(screen_size[0] /2, screen_size[1] / 2  + add_y + 1 , 1, "hide", [0, 0, 0, hs_color[3]], 3);
   Render.String(screen_size[0] /2, screen_size[1] / 2  + add_y, 1, "hide", hs_color, 3);
   }

  if (alpha_autopeek > 0) {
      add_y = add_y + add_autopeek * add_factor ;

      Render.String(screen_size[0] / 2, screen_size[1] / 2 + 1 + add_y, 1, "peek", [0, 0, 0, alpha_autopeek * 255], 3);
      Render.String(screen_size[0] / 2, screen_size[1] / 2 + add_y, 1, "peek", [73, 71, 166, alpha_autopeek * 255], 3);
   }
   if (alpha_SP > 0) {
      add_y = add_y + add_SP * add_factor ;

      Render.String(screen_size[0] / 2, screen_size[1] / 2 + 1 + add_y, 1, "safe", [0, 0, 0, alpha_SP * 255], 3);
      Render.String(screen_size[0] / 2, screen_size[1] / 2 + add_y, 1, "safe", [141, 140, 197, alpha_SP * 255], 3);
   }
   if (alpha_ping > 0) {
      add_y = add_y + add_ping * add_factor ;

      Render.String(screen_size[0] / 2, screen_size[1] / 2 + 1 + add_y, 1, "ping", [0, 0, 0, alpha_ping * 255], 3);
      Render.String(screen_size[0] / 2, screen_size[1] / 2 + add_y, 1, "ping", [141, 140, 197, alpha_ping * 255], 3);
   }
    if (alpha_DA > 0) {
    add_y = add_y + add_DA * add_factor ;

    Render.String(screen_size[0] / 2, screen_size[1] / 2 + 1 + add_y, 1, "dormant", [0, 0, 0, alpha_DA * 255], 3);
    Render.String(screen_size[0] / 2, screen_size[1] / 2 + add_y, 1, "dormant", [141, 140, 197, alpha_DA * 255], 3);
    }
    if (alpha_damage > 0) {
       add_y = add_y + add_damage * add_factor;

       Render.String(screen_size[0] / 2, screen_size[1] / 2 + 1 + add_y, 1, "dmg", [0, 0, 0, alpha_damage * 255], 3);
       Render.String(screen_size[0] / 2, screen_size[1] / 2 + add_y, 1, "dmg", [158, 181, 113, alpha_damage * 255], 3);
    }
    if (alpha_BAIM > 0) {
       add_y = add_y + add_BAIM * add_factor;

       Render.String(screen_size[0] / 2, screen_size[1] / 2 + 1 + add_y, 1, "baim", [0, 0, 0, alpha_BAIM * 255], 3);
       Render.String(screen_size[0] / 2, screen_size[1] / 2 + add_y, 1, "baim", [141, 140, 197, alpha_BAIM * 255], 3);
    }
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        
         }
      }
}

function delta() {
    local = Entity.GetLocalPlayer();
    if (!UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Desync line") || !Entity.IsValid(local) || !Entity.IsAlive(local)) return;
    font = Render.AddFont("Verdana", 8, 400);
    x = screen_size[0];
    y = screen_size[1];
    coldelt = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "line color");
    real_yaw = Local.GetRealYaw();
    fake_yaw = Local.GetFakeYaw();
    delta = Math.min(Math.abs(real_yaw - fake_yaw) / 2, 60).toFixed(0);
    delta_size = Render.TextSizeCustom(delta, font);
    Render.GradientRect(x / 2, y / 2 + 15, (45 / 60) * delta, 2, 1, coldelt, [0, 0, 0, 0]);
    Render.GradientRect(x / 2 - (45 / 60) * delta + 1, y / 2 + 15, (45 / 60) * delta, 2, 1, [0, 0, 0, 0], coldelt);
}

function anim()
{
    if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "legfucker"))
    {
        clock = clock + 0.5
        if (clock > 1)
        {
            if (UI.GetValue("Misc", "GENERAL", "Movement", "Slide walk") && !UI.GetValue("Anti-Aim", "Extra", "Jitter move"))
            {
                UI.SetValue("Misc", "GENERAL", "Movement", "Slide walk", 0);
                UI.SetValue("Anti-Aim", "Extra", "Jitter move", 1);
                clock = 0
            }
            else
            {
                UI.SetValue("Misc", "GENERAL", "Movement", "Slide walk", 1);
                UI.SetValue("Anti-Aim", "Extra", "Jitter move", 0);
                clock = 0
            }
        }
    }
}

function dodgejitter()
{
    if (UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "Dodge jitter"))
    {
        clock = clock + 0.5
        if (clock > 1)
        {
        UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Jitter offset", -6);
        clock = 0
        }
        else
        {
        UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Jitter offset", 16);
       }
    }
}

var delay = 3

function fakelags()
{
    var send = UI.GetValue("Script items", "Send Limit")
    var choke = UI.GetValue("Script items", "Choke Limit")
    if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "jitter fakelag"))
    {
    if(tickcount >= choke && !flip)
    {
        flip = true
        tickcount = 0
    }
    if(tickcount >= send && flip)
    {
        flip = false
        tickcount = 0
    }
    UI.SetValue("Anti-Aim", "Fake-Lag", "Limit", !flip ? choke : 0)
    tickcount++
   }
}

function roundstart()
{
    tickcount = 0
}

var original_naa = true

function legit_aa()
{
    if (UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "Legit AA Key"))
    {
        if (original_naa)
        {
            restrictions_cache = UI.GetValue("Misc", "PERFORMANCE & INFORMATION", "Information", "Restrictions");
            hiderealangle_cache = UI.GetValue ("Anti-Aim", "Fake angles", "Hide real angle");
            yaw_offset_cache = UI.GetValue ("Anti-Aim", "Rage Anti-Aim", "Yaw offset");
            jitter_offset_cache = UI.GetValue ("Anti-Aim", "Rage Anti-Aim", "Jitter offset");
            pitch_cache = UI.GetValue ("Anti-Aim", "Extra", "Pitch");
            original_naa = false;
        }
        UI.SetValue ("Misc", "PERFORMANCE & INFORMATION", "Information", "Restrictions", 0);
        UI.SetValue ("Anti-Aim", "Fake angles", "Hide real angle", true);
        UI.SetValue ("Anti-Aim", "Rage Anti-Aim", "Yaw offset", 180);
        UI.SetValue ("Anti-Aim", "Rage Anti-Aim", "Jitter offset", 0);
        UI.SetValue ("Anti-Aim", "Extra", "Pitch", 0);
    }
    else
    {
        if (!original_naa)
        {
            UI.SetValue ("Misc", "PERFORMANCE & INFORMATION", "Information", "Restrictions", restrictions_cache);
            UI.SetValue ("Anti-Aim", "Fake angles", "Hide real angle", hiderealangle_cache);
            UI.SetValue ("Anti-Aim", "Rage Anti-Aim", "Yaw offset", yaw_offset_cache);
            UI.SetValue ("Anti-Aim", "Rage Anti-Aim", "Jitter offset", jitter_offset_cache);
            UI.SetValue ("Anti-Aim", "Extra", "Pitch", pitch_cache);
            original_naa = true;
        }
    }
}

var lasttime = 0;
function onRender( )
{
var tag = UI.GetValue("Clantag");
var speed = 4.5;
var time = parseInt((Globals.Curtime() * speed))
if (time != lasttime)
{
if (tag == 1) {
switch ((time) % 38) {

case 1: { Local.SetClanTag(""); break; }
case 2: { Local.SetClanTag("^"); break; }
case 3: { Local.SetClanTag("B"); break; }
case 4: { Local.SetClanTag("B$"); break; }
case 5: { Local.SetClanTag("Bl"); break; }
case 6: { Local.SetClanTag("Bl{}"); break; }
case 7: { Local.SetClanTag("Blo"); break; }
case 8: { Local.SetClanTag("Blo{}"); break; }
case 9: { Local.SetClanTag("Bloo"); break; }
case 10: { Local.SetClanTag("Bloo%"); break; }
case 11: { Local.SetClanTag("Blood"); break; }
case 12: { Local.SetClanTag("Blood_"); break; }
case 13: { Local.SetClanTag("BloodT"); break; }
case 14: { Local.SetClanTag("BloodT@"); break; }
case 15: { Local.SetClanTag("BloodTe"); break; }
case 16: { Local.SetClanTag("BloodTe("); break; }
case 17: { Local.SetClanTag("BloodTec"); break; }
case 18: { Local.SetClanTag("BloodTec|"); break; }
case 19: { Local.SetClanTag("BloodTech"); break; }
case 20: { Local.SetClanTag("BloodTech"); break; }
case 21: { Local.SetClanTag("^loodTech"); break; }
case 22: { Local.SetClanTag("loodTech"); break; }
case 23: { Local.SetClanTag("$oodTech"); break; }
case 24: { Local.SetClanTag("oodTech"); break; }
case 25: { Local.SetClanTag("{}odTech"); break; }
case 26: { Local.SetClanTag("odTech"); break; }
case 27: { Local.SetClanTag("{}dTech"); break; }
case 28: { Local.SetClanTag("dTech"); break; }
case 29: { Local.SetClanTag("%Tech"); break; }
case 30: { Local.SetClanTag("Tech"); break; }
case 31: { Local.SetClanTag("_ech"); break; }
case 32: { Local.SetClanTag("ech"); break; }
case 33: { Local.SetClanTag("@ch"); break; }
case 34: { Local.SetClanTag("ch"); break; }
case 35: { Local.SetClanTag("(h"); break; }
case 36: { Local.SetClanTag("h"); break; }
case 37: { Local.SetClanTag("|"); break; }
case 38: { Local.SetClanTag(""); break; }
}
}
}
lasttime = time;
}


var scoutCach = UI.GetValue('Rage', 'SCOUT', 'Accuracy', 'Hitchance')
var revolverCach = UI.GetValue('Rage', 'HEAVY PISTOl', 'Accuracy', 'Hitchance')
function airHC() {
    var scoutAir = UI.GetValue('Misc', 'JAVASCRIPT', 'Script items', 'Jump scout hitchance')
    var revolverAir = UI.GetValue('Misc', 'JAVASCRIPT', 'Script items', 'Jump revolver hitchance')

    var local = Entity.GetLocalPlayer()
    var localWeapon = Entity.GetWeapon(local)
    var localWeaponName = Entity.GetName(localWeapon)
    var inAir = Entity.GetProp(local, 'CBasePlayer', 'm_hGroundEntity')
if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Jump scout/r8"))
{
    if (localWeaponName == 'r8 revolver' && inAir =='m_hGroundEntity') {
        UI.SetValue('Rage', 'HEAVY PISTOL', 'Accuracy', 'Hitchance', revolverAir)
    } else {
        UI.SetValue('Rage', 'HEAVY PISTOL', 'Accuracy', 'Hitchance', revolverCach)
    }
    if (localWeaponName == 'ssg 08' && inAir == 'm_hGroundEntity') {
        UI.SetValue('Rage', 'SCOUT', 'Accuracy', 'Hitchance', scoutAir)
    } else {
        UI.SetValue('Rage', 'SCOUT', 'Accuracy', 'Hitchance', scoutCach)
    }
  }
}

function r8fakelag()
{
    var local = Entity.GetLocalPlayer()
    var localWeapon = Entity.GetWeapon(local)
    var localWeaponName = Entity.GetName(localWeapon)
    if (localWeaponName == 'r8 revolver' && UI.GetValue("Script items", "Disable fakelags on r8") == 1)
    {
    UI.SetValue("Fake-Lag", "Enabled", 0)
    }
    else
    {
    UI.SetValue("Fake-Lag", "Enabled", 1)
    }
}
function ImportGrenades()
{
    var grenades = Entity.GetEntitiesByClassID(9).concat(Entity.GetEntitiesByClassID(114).concat(Entity.GetEntitiesByClassID(100)));
    for (e in grenades)
    {
        pass = false;
        for (g in positions)
        {
            if (positions[g][0] == grenades[e])
            {
                pass = true;
                continue;
            }
        }
        if (pass)
            continue;

        positions.push([grenades[e], Globals.Curtime(), [Entity.GetRenderOrigin(grenades[e])], Globals.Curtime()]);
    }
}


const clr = [
    text = [ 240, 240, 240, 255 ],
    main = [ 38, 38, 38, 160 ],
    back = [ 32, 32, 32, 255 ],
    high = [ 48, 48, 48, 255 ],
    red  = [ 240, 41, 41, 255 ],
]

var positions = [];
var trace = [];
var render = [];
var local = Entity.GetLocalPlayer();

function Clamp(v, min, max)
{
    return Math.max(Math.min(v, max), min);
}

function GrenadeWarning()
{
    var grenades = Entity.GetEntitiesByClassID(9).concat(Entity.GetEntitiesByClassID(114).concat(Entity.GetEntitiesByClassID(100)));

    if (!Entity.IsAlive(local)) { return; }
  
    for (g in grenades) {
        for (var i = 0; i < grenades.length; i++) {
          
            var g = grenades[i];
            var isInferno = Entity.GetClassID(g) === 100;
            var isHeGrenade = Entity.GetClassID(g) === 9;
            function DistanceInFeets (origin, destination) {
                var sub = [destination[0] - origin[0], destination[1] - origin[1], destination[2] - origin[2]];
                return Math.round(Math.sqrt(sub[0] ** 2 + sub[1] ** 2 + sub[2] ** 2) / 12);
            }
            var destination = Entity.GetRenderOrigin(g);
            var origin = Entity.GetEyePosition(local);
            var distance = DistanceInFeets(origin, destination);
            var screen = Render.WorldToScreen(destination);
            var isSafe = distance > (isInferno ? 15 : 20) || trace[1] < 0.61;
            if (distance > 256) { continue; }
            if (isHeGrenade && Entity.GetProp (g, "CBaseCSGrenadeProjectile", "m_nExplodeEffectTickBegin")) { continue; }
            font = Render.AddFont("Small fonts", 7, 100);
            const warning_stroke = true;
            Render.FilledCircle( screen[0], screen[1] + 36, 15, [ 255, 255, 255, 90 ])
            Render.Circle(screen[0], screen[1] + 36, 15, !isSafe && warning_stroke ? [ 240, 41, 41, 255 ] : [ 255, 255, 255, 90 ])
            Render.String(screen[0] - 8, screen[1] + 27, 0, isHeGrenade ? "I" : "K", [ 240, 240, 240, 255 ], 5);
        }
    }
}

function enQWarn()
{
    var grenades = Entity.GetEntitiesByClassID(9).concat(Entity.GetEntitiesByClassID(114).concat(Entity.GetEntitiesByClassID(100)));

    if (!Entity.IsAlive(local)) { return; }

    for (g in grenades) {
        for (var i = 0; i < grenades.length; i++) {
        
            var g = grenades[i];
            var isInferno = Entity.GetClassID(g) === 100;
            var isHeGrenade = Entity.GetClassID(g) === 9;

            /* --------------- */

            function DistanceInFeets (origin, destination) {
                var sub = [destination[0] - origin[0], destination[1] - origin[1], destination[2] - origin[2]];
                return Math.round(Math.sqrt(sub[0] ** 2 + sub[1] ** 2 + sub[2] ** 2) / 12);
                //return Math.round(sub[0] + sub[1] + sub[2]); // Для измерения в юнитах
            }

            /* --------------- */

            var destination = Entity.GetRenderOrigin(g);
            var origin = Entity.GetEyePosition(local);
            var distance = DistanceInFeets(origin, destination);
            var screen = Render.WorldToScreen(destination);
            var isSafe = distance > (isInferno ? 15 : 20) || trace[1] < 0.61;

            /* --------------- */

            if (distance > 256) { continue; }

            if (isHeGrenade && Entity.GetProp (g, "CBaseCSGrenadeProjectile", "m_nExplodeEffectTickBegin")) { continue; }

            /* --------------- */

            Render.FilledRect (screen[0] + 16, screen[1] - 12, 48, 24, clr[1]);

            Render.Polygon ([ [ screen[0] + 8,  screen[1] - 1 ], [ screen[0] + 16, screen[1] - 8 ], [ screen[0] + 16, screen[1] + 8 ] ], clr[1]);

            Render.String (screen[0] + 36, screen[1] - 5, 0, Math.round(distance / 3.28) + " m", clr[0], 3);
            Render.String (screen[0] + 20, screen[1] - 6, 0, isHeGrenade ? "I" : "K", isSafe ? clr[0] : clr[4], 6);

            /* --------------- */

            const warning_stroke = false; // true для красной обводки при опасности

            Render.Line ( screen[0] + 8, screen[1], screen[0] + 16, screen[1] - 8, !isSafe && warning_stroke ? clr[4] : clr[3])
            Render.Line ( screen[0] + 8, screen[1], screen[0] + 16, screen[1] + 8, !isSafe && warning_stroke ? clr[4] : clr[3])

            Render.Line ( screen[0] + 16, screen[1] - 12, screen[0] + 16, screen[1] - 7, !isSafe && warning_stroke ? clr[4] : clr[3])
            Render.Line ( screen[0] + 16, screen[1] + 12, screen[0] + 16, screen[1] + 8, !isSafe && warning_stroke ? clr[4] : clr[3])

            Render.Line ( screen[0] + 16, screen[1] - 12, screen[0] + 64, screen[1] - 12, !isSafe && warning_stroke ? clr[4] : clr[3])
            Render.Line ( screen[0] + 16, screen[1] + 12, screen[0] + 64, screen[1] + 12, !isSafe && warning_stroke ? clr[4] : clr[3])
            Render.Line ( screen[0] + 64, screen[1] + 12, screen[0] + 64, screen[1] - 12, !isSafe && warning_stroke ? clr[4] : clr[3])
        
            /* --------------- */

            if (isInferno)
            {
                var time = Entity.GetProp(g, "CInferno", "m_nFireEffectTickBegin") * Globals.TickInterval();
                var factor = Clamp(((time + 7) - Globals.Curtime()) / 7, 0, 7);

                Render.FilledRect(screen[0] + 16, screen[1] + 10, 48, 2, clr[2]);
                Render.FilledRect(screen[0] + 16, screen[1] + 10, Math.trunc(factor * 48), 2, clr[4]);
            }
        }
    }
}

/* ------------------------------------------------------ */

function DrawNade()
{
if (UI.GetValue("Misc", "JAVASCRIPT", "Script items","Nade warning") == true)
  {
if (UI.GetValue("Script items", "Warning type") == 0)
    {
    ImportGrenades();
    GrenadeWarning();
    };
if (UI.GetValue("Script items", "Warning type") == 1)
    {
    ImportGrenades();
    enQWarn();
    }
  }
}




function armsColor()
{
    if (UI.GetValue("Script items", "Enable Custom Arms")) {
    var team = Entity.GetProp(Entity.GetLocalPlayer(),"DT_BaseEntity", "m_iTeamNum");
    if(team == 2){ // T
    if(Convar.GetString("r_skin") == UI.GetValue("T arms skin")) return;
    Global.ExecuteCommand("r_skin " + UI.GetValue("T arms skin"));
    }
    else if(team == 3){ // CT
    if(Convar.GetString("r_skin") == UI.GetValue("CT arms skin")) return;
    Global.ExecuteCommand("r_skin " + UI.GetValue("CT arms skin"));
    }
  }
}

function get_weapon(entity) {
    if (Entity.GetName(Entity.GetWeapon(entity)) == 'g3sg1' || Entity.GetName(Entity.GetWeapon(entity)) == 'scar 20') return 'auto';
    else if (Entity.GetName(Entity.GetWeapon(entity)) == 'awp') return 'awp';
    else if (Entity.GetName(Entity.GetWeapon(entity)) == 'desert eagle') return 'deagle';
    else if (Entity.GetName(Entity.GetWeapon(entity)) == 'r8 revolver') return 'revolver';
    else if (Entity.GetName(Entity.GetWeapon(entity)) == 'ssg 08') return 'scout';
    else return 'other';
}
should_draw = false
const reset = function(){
    should_draw = false;
  
}
const bomb_planted = function(){
    should_draw = true;
}
function set_dropdown_value(value, index, enable) /*credits to ed*/ {
    var mask = 1 << index;
    return enable ? (value | mask) : (value & ~mask);
}
clamp = function (val, min, max) {
    if (val > max)
       return max
    if (min > val)
       return min
    return val
}
alpha_scope = 255

function drawscope() {
  
    var local_player = Entity.GetLocalPlayer();
    fade_factor = ((1 / .15) * Globals.Frametime()) * 200
    if (Entity.IsAlive(local_player)) {
        if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Enable custom scope")) {
            scoped = Entity.GetProp(local_player, "CCSPlayer", "m_bIsScoped");
            var offset = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Distance from crosshair");
            var height = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Size of lines");
            var color = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Scope color");
            var color2 = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Scope color 2");
              

            if (!scoped && alpha_scope != 0)
                alpha_scope = clamp(alpha_scope - fade_factor, 0, 255)
            if (scoped && alpha_scope != 255)
                alpha_scope = clamp(alpha_scope + fade_factor, 0, 255)
              
      
              
                if (alpha_scope != 0 ) {
                    Convar.SetFloat("r_drawvgui",should_draw ? 1 : 0 );
                    if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Viewmodel in scope") == 1)
                    {
                    Convar.SetFloat("fov_cs_debug", 90)
                    }
                    Render.GradientRect(screen_size[0] / 2 + offset, screen_size[1] / 2, height, 1, 1, [color[0], color[1], color[2], alpha_scope], [color2[0], color2[1], color2[2], 0]);
                    Render.GradientRect(screen_size[0] / 2 - height - offset, screen_size[1] / 2, height, 1, 1, [color2[0], color2[1], color2[2], 0], [color[0], color[1], color[2], alpha_scope]);
                    Render.GradientRect(screen_size[0] / 2, screen_size[1] / 2 + offset, 1, height, 0, [color[0], color[1], color[2], alpha_scope], [color2[0], color2[1], color2[2], 0]);
                    Render.GradientRect(screen_size[0] / 2, screen_size[1] / 2 - height - offset, 1, height, 0, [color2[0], color2[1], color2[2], 0], [color[0], color[1], color[2], alpha_scope]);
                }
             if (!scoped) {
                Convar.SetFloat("r_drawvgui", 1)
                Convar.SetFloat("fov_cs_debug", 0)
            }
        }
    } else {
        Convar.SetFloat("r_drawvgui", 1);
    }
}

const thirdperson = function() {
    local = Entity.GetLocalPlayer()
    var thirdperson_cache = UI.GetValue("Thirdperson distance"),
    hotkey_state = UI.IsHotkeyActive("Script items", "Animated thirdperson"),
    fade_factor = ((1 / .005) * Globals.Frametime())
    if(UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Enable anim thirdperson"))
    {
    if(hotkey_state && person != 1 && Entity.IsAlive(local))
        person = clamp(person - fade_factor, 49, thirdperson_cache)
    if(!hotkey_state && person != 0 || !Entity.IsAlive(local))
        person = clamp(person + fade_factor, 49, thirdperson_cache)
    if(hotkey_state && person == 49 && turned) {
        UI.ToggleHotkey("Visuals", "WORLD", "View", "Thirdperson")
        turned = 0
    }

    if(!hotkey_state && person > 49 && !turned) {
        UI.ToggleHotkey("Visuals", "WORLD", "View", "Thirdperson")
        turned = 1
    }

    if(turned && !UI.IsHotkeyActive("Visuals", "WORLD", "View", "Thirdperson") || !turned && UI.IsHotkeyActive("Visuals", "WORLD", "View", "Thirdperson"))
        UI.ToggleHotkey("Visuals", "WORLD", "View", "Thirdperson")
    if(person != 0) UI.SetValue("Visuals", "WORLD", "View", "Thirdperson", person );
    }
    else {
        UI.SetValue("Visuals", "WORLD", "View", "Thirdperson", thirdperson_cache );
    }
}

const unload = function() {
    UI.SetValue("Visuals", "WORLD", "View", "Thirdperson", thirdperson_cache );
}

function fps_boost()
{
    if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Fps Boost"))
        {
            // Disable shadows ->
            Convar.SetString("r_shadows", "0");
            Convar.SetString("cl_csm_static_prop_shadows", "0");
            Convar.SetString("cl_csm_shadows", "0");
            Convar.SetString("cl_csm_world_shadows", "0");
            Convar.SetString("cl_foot_contact_shadows", "0");
            Convar.SetString("cl_csm_viewmodel_shadows", "0");
            Convar.SetString("cl_csm_rope_shadows", "0");
            Convar.SetString("cl_csm_sprite_shadows", "0");
            // Disable blood ->
            Convar.SetString("violence_hblood", "0");
      
            // Disable 3dsky ->
            Convar.SetString("r_3dsky", "0");

            // Disable decals ->
            //Convar.SetString("r_drawdecals", "0");

            // Disable rain ->
            Convar.SetString("r_drawrain", "0");
      
            // Disable ropes ->
            Convar.SetString("r_drawropes", "0");

            // Disable sprites ->
            Convar.SetString("r_drawsprites", "0");

            // Disable water fog ->
            Convar.SetString("fog_enable_water_fog", "0");
        }
        else
        {
            // Enable shadows ->
            Convar.SetString("r_shadows", "1");
            Convar.SetString("cl_csm_static_prop_shadows", "1");
            Convar.SetString("cl_csm_shadows", "1");
            Convar.SetString("cl_csm_world_shadows", "1");
            Convar.SetString("cl_foot_contact_shadows", "1");
            Convar.SetString("cl_csm_viewmodel_shadows", "1");
            Convar.SetString("cl_csm_rope_shadows", "1");
            Convar.SetString("cl_csm_sprite_shadows", "1");
      
            // Enable blood ->
            Convar.SetString("violence_hblood", "1");
      
            // Enable 3dsky ->
            Convar.SetString("r_3dsky", "1");

            // Enable decals ->
            //Convar.SetString("r_drawdecals", "1");

            // Enable rain ->
            Convar.SetString("r_drawrain", "1");
      
            // Enable ropes ->
            Convar.SetString("r_drawropes", "1");

            // Enable sprites ->
            Convar.SetString("r_drawsprites", "1");

            // Enable water fog ->
            Convar.SetString("fog_enable_water_fog", "1");
        }
}

function training_server() {
    if (!UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Training server")) return;
    Cheat.ExecuteCommand("bot_kick");
    Cheat.ExecuteCommand("sv_cheats 1");
    Cheat.ExecuteCommand("mp_roundtime_defuse 99999999999999999999");
    Cheat.ExecuteCommand("mp_roundtime_hostage 99999999999999999999");
    Cheat.ExecuteCommand("mp_roundtime 99999999999999999999");
    Cheat.ExecuteCommand("mp_warmup_end");
    Cheat.ExecuteCommand("sv_infinite_ammo 1");
    Cheat.ExecuteCommand("mp_maxmoney 64000");
    Cheat.ExecuteCommand("mp_startmoney 64000");
    Cheat.ExecuteCommand("ammo_grenade_limit_total 6");
    Cheat.ExecuteCommand("mp_buy_anywhere 1");
    Cheat.ExecuteCommand("sv_grenade_trajectory 1");
    Cheat.ExecuteCommand("sv_showimpacts_time 10");
    Cheat.ExecuteCommand("sv_showimpacts 1");
    Cheat.ExecuteCommand("sv_grenade_trajectory_time 10");
    Cheat.ExecuteCommand("mp_buytime 99999999999999999999");
    Cheat.ExecuteCommand("mp_restartgame 1");
    Cheat.ExecuteCommand("mp_freezetime 1");
    Cheat.ExecuteCommand("cl_showpos 1");
    Cheat.ExecuteCommand("sv_airaccelerate 206");
    Cheat.ExecuteCommand("mp_respawn_on_death_ct 1");
    Cheat.ExecuteCommand("mp_respawn_on_death_t 1");
    Cheat.ExecuteCommand("god");
    UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Training server", 0)
}

UI.AddDropdown( "Sections", [ "Rage", "Anti-Aim", "Visual", "Misc" ] );
function menu(){

    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","pingspike", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Weapon Override", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Weapon Mindmg", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Jump scout/r8", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items",'Jump scout hitchance', false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items",'Jump revolver hitchance', false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Desync line", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","line color", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Arrows color", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Selected arrow color"   , false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Selected inverter color", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Display indicators", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Display arrows", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Left", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Right", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","legfucker", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Low delta", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Low delta on key", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Legit AA Key", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","jitter fakelag", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Send Limit", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Choke Limit", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Aspect ratio", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Enable chat logging", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Clantag", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Safe AWP", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Ragdoll Force", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Enable Custom Arms", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","T arms skin", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","CT arms skin", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Enable clock sync", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Enable custom scope", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Distance from crosshair", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Size of lines", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Scope color", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Scope color 2", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Peek Helper for AWP/Scout", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Animated thirdperson", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Thirdperson distance", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Training server", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Fps Boost", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Enable anim thirdperson", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Indicators color", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Warning type", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Nade warning", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Disable fakelags on r8", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Display watermark", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Watermark color", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Viewmodel in scope", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","hitlogs under crosshair", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Dodge jitter", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Dormant Aimbot", false)
    UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Adaptive autoscope", false)

    if(UI.GetValue("Script items", "Sections") == 0){
      // Rage
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Peek Helper for AWP/Scout", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Disable fakelags on r8", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Adaptive autoscope", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","pingspike", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Dormant Aimbot", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Weapon Override", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Weapon Mindmg", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Jump scout/r8", true)
        if (UI.GetValue("Misc", "JAVASCRIPT", "Script items","Jump scout/r8"))
        {
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items",'Jump scout hitchance', true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items",'Jump revolver hitchance', true)
        }
    }
    if(UI.GetValue("Script items", "Sections") == 2){
      // Visual
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Desync line", true)
        if (UI.GetValue("Misc", "JAVASCRIPT", "Script items","Desync line"))
        {
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","line color", true)
        }
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Nade warning", true)
        if (UI.GetValue("Misc", "JAVASCRIPT", "Script items","Nade warning"))
        {
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Warning type", true)
        }
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Display indicators", true)
        if (UI.GetValue("Misc", "JAVASCRIPT", "Script items","Display indicators"))
        {
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Indicators color", true)
        }
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","hitlogs under crosshair", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Enable clock sync", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Display arrows", true)
        if (UI.GetValue("Misc", "JAVASCRIPT", "Script items","Display arrows"))
        {
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Arrows color", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Selected arrow color"   , true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Selected inverter color", true)
        }
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Display watermark", true)
        if (UI.GetValue("Misc", "JAVASCRIPT", "Script items","Display watermark"))
        {
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Watermark color", true)
        }
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Enable custom scope", true)
        if (UI.GetValue("Misc", "JAVASCRIPT", "Script items","Enable custom scope"))
        {
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Viewmodel in scope", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Distance from crosshair", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Size of lines", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Scope color", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Scope color 2", true)
        }
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","hitlogs under crosshair", true)
    }
    if(UI.GetValue("Script items", "Sections") == 1){
        //Anti-Aim
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","legfucker", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Low delta", true)
        if (UI.GetValue("Misc", "JAVASCRIPT", "Script items","Low delta"))
        {
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Low delta on key", true)
        }
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Legit AA Key", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Dodge jitter", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","jitter fakelag", true)
        if (UI.GetValue("Misc", "JAVASCRIPT", "Script items","jitter fakelag"))
        {
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Send Limit", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Choke Limit", true)
        }
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Left", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Right", true)

    }
    if(UI.GetValue("Script items", "Sections") == 3){
      // Misc

        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Enable anim thirdperson", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Aspect ratio", true)
        if (UI.GetValue("Misc", "JAVASCRIPT", "Script items","Enable anim thirdperson"))
        {
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Animated thirdperson", true)
        }
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Thirdperson distance", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Enable chat logging", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Clantag", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Safe AWP", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Ragdoll Force", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Training server", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Fps Boost", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","Enable Custom Arms", true)
        if (UI.GetValue("Misc", "JAVASCRIPT", "Script items","Enable Custom Arms"))
        {
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","T arms skin", true)
        UI.SetEnabled("Misc", "JAVASCRIPT", "Script items","CT arms skin", true)
        }
    }
}
  Cheat.RegisterCallback("Draw","menu");

function Main()
{
        UI.AddCheckbox("Peek Helper for AWP/Scout");
        UI.AddCheckbox("Disable fakelags on r8")
        UI.AddCheckbox("Adaptive autoscope")
        UI.AddHotkey("pingspike")
        UI.AddHotkey("Dormant Aimbot")
        UI.AddHotkey("Weapon Override")
        UI.AddSliderInt("Weapon Mindmg", 0, 130)
        UI.AddCheckbox("Jump scout/r8")
        UI.AddSliderInt('Jump scout hitchance', 0, 100)
        UI.AddSliderInt('Jump revolver hitchance', 0, 100)

        UI.AddCheckbox("legfucker"); 
        UI.AddCheckbox("Low delta");
        UI.AddHotkey("Low delta on key");
        UI.AddHotkey("Legit AA Key");
        UI.AddHotkey("Dodge jitter")
        UI.AddCheckbox("jitter fakelag")
        UI.AddSliderInt("Send Limit", 0, 16)
        UI.AddSliderInt("Choke Limit", 0, 16)   

        UI.AddCheckbox("Desync line");
        UI.AddColorPicker("line color");
        UI.AddCheckbox("Display indicators")
        UI.AddColorPicker("Indicators color")
        UI.AddCheckbox("Display arrows")
        UI.AddColorPicker("Arrows color")
        UI.AddColorPicker("Selected arrow color")
        UI.AddColorPicker("Selected inverter color")
        UI.AddCheckbox("Display watermark")
        UI.AddColorPicker("Watermark color")
        UI.AddCheckbox("hitlogs under crosshair")
        UI.AddCheckbox("Enable clock sync")
        UI.AddHotkey("Left")
        UI.AddHotkey("Right")
        UI.AddCheckbox ("Enable custom scope");
        UI.AddCheckbox("Viewmodel in scope")
        UI.AddSliderInt ("Distance from crosshair", 0, 200);
        UI.AddSliderInt ("Size of lines", 20, 200);
        UI.AddColorPicker( "Scope color" );
        UI.AddColorPicker( "Scope color 2" );
        UI.AddCheckbox("Nade warning")
        UI.AddDropdown("Warning type", ["Default", "enQ"])

        UI.AddSliderInt("Aspect ratio", 0, 500 );
        UI.AddCheckbox("Enable anim thirdperson")
        UI.AddHotkey("Animated thirdperson")
        UI.AddSliderInt("Thirdperson distance", 50, 250)
        UI.AddCheckbox("Enable chat logging" );
        UI.AddCheckbox("Clantag");
        UI.AddCheckbox("Safe AWP");
        UI.AddCheckbox("Ragdoll Force");
        UI.AddCheckbox("Training server")
        UI.AddCheckbox("Fps Boost");
        UI.AddCheckbox("Enable Custom Arms")
        UI.AddDropdown("T arms skin", ["Default", "Nigger", "Brown", "Asian", "Red", "Tatoo", "White"])
        UI.AddDropdown("CT arms skin", ["Default", "Nigger", "Brown", "Asian", "Red", "Tatoo", "White"])
  
    //  callbacks
    Global.RegisterCallback("Draw", "drawind")
    Global.RegisterCallback("CreateMove", "ManualAA")
    Global.RegisterCallback("player_connect_full", "player_connect")
    Global.RegisterCallback("Draw", "draw")
    Global.RegisterCallback("Draw", "drawscope")
    Global.RegisterCallback( "FrameStageNotify", "fsn" )
    Global.RegisterCallback('Draw', 'safeAWP')
    Global.RegisterCallback("ragebot_fire", "ragebot_fire");
    Global.RegisterCallback("item_purchase", "item_purchase");
    Global.RegisterCallback("player_hurt", "hitlog");
    Global.RegisterCallback("Draw", "removelogs");
    Global.RegisterCallback("FrameStageNotify", "ragdollForce");
    Global.RegisterCallback("Draw", "onDraw");
    Global.RegisterCallback("CreateMove", "onCM")
    Global.RegisterCallback("CreateMove", "Low_delta");
    Global.RegisterCallback("Draw", "indication")
    Global.RegisterCallback("Draw", "delta");
    Global.RegisterCallback("CreateMove", "anim");
    Global.RegisterCallback("CreateMove", "fakelags");
    Global.RegisterCallback("CreateMove", "dodgejitter");
    Global.RegisterCallback("round_start", "roundstart")
    Global.RegisterCallback("Draw", "pingspike")
    Global.RegisterCallback("CreateMove", "legit_aa");
    Global.RegisterCallback("Draw", "onRender");
    Global.RegisterCallback('CreateMove', 'airHC')
    Cheat.RegisterCallback("Draw", "DrawNade");
    Global.RegisterCallback("Draw", "armsColor");
    Global.RegisterCallback("Draw", "helper");
    Global.RegisterCallback("Unload", "unloadhelper");
    Cheat.RegisterCallback("FrameStageNotify", "thirdperson");
    Cheat.RegisterCallback("Unload", "unload");
    Cheat.RegisterCallback("Draw", "training_server");
    Cheat.RegisterCallback( "Draw", "fps_boost" );
    Cheat.RegisterCallback("Draw", "r8fakelag")
    Cheat.RegisterCallback("Draw", "draw9");
    Cheat.RegisterCallback("player_hurt", "pHurt")
    Cheat.RegisterCallback("Draw", "drawLogs")
    Cheat.RegisterCallback("Draw", "showOrHide")
    Cheat.RegisterCallback("CreateMove", "autoscope")
    Global.RegisterCallback("CreateMove", "dormantAim");
    Global.RegisterCallback("weapon_fire", "shoot");
}
Main();
 
Последнее редактирование:
Уникальное звание
Пользователь
Статус
Оффлайн
Регистрация
8 Авг 2019
Сообщения
681
Реакции[?]
132
Поинты[?]
6K
почему ты просто суда его не кинул?
 
Сверху Снизу