Crack JS Ez crack Bloodsync for onetap v3 ( hvhforgame#3204 shit paster )

Начинающий
Статус
Оффлайн
Регистрация
12 Июн 2021
Сообщения
71
Реакции[?]
25
Поинты[?]
3K

Данный скрипт не проверялся модераторами, так как является кряком приватной LUA и в нём может присутствовать обфускация. Даже известные пользователи могут выложить вредоносный скрипт под видом крякнутого, поэтому любое использование исключительно на свой страх и риск.

Осторожно Говно - Корд!!!
--------------------------------------------------------------------------------------------------------------
Фулл паста корд с нейдхелпером и валк ботом и всякой не нужной хернёй.
--------------------------------------------------------------------------------------------------------------
По сути просто паста, которая продаётся за 50 руб.
--------------------------------------------------------------------------------------------------------------



Full code bloodsync:
UI.AddColorPicker("Watermark");
var color = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Watermark");

if (color[3] == 0)
    UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Watermark", [89, 119, 239, 255]);

function draw() {
    if(!World.GetServerString())
        return;

    var today = new Date();
    var hours1 = today.getHours();
    var minutes1 = today.getMinutes();
    var seconds1 = today.getSeconds();
    
    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() // кто это сделал - контуженный на всю голову ебаный хуесос

    color = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Watermark");

    var font = Render.AddFont("Verdana", 7, 400);
    var text = "onetap.com [1337:1:1] | " + Cheat.GetUsername() + " | delay: " + ebanaya_hueta + "ms | " + server_tickrate + "tick | " + hours + minutes + seconds;
    
    var w = Render.TextSizeCustom(text, font)[0] + 8;
    var x = Global.GetScreenSize()[0];

    x = x - w - 10;

    Render.FilledRect(x, 10, w, 2, [ color[0], color[1], color[2], 255 ]);
    Render.FilledRect(x, 12, w, 18, [ 17, 17, 17, color[3] ]);
    Render.StringCustom(x+4, 10 + 4, 0, text, [ 255, 255, 255, 255 ], font);
}

Cheat.RegisterCallback("Draw", "draw");
/*
Quake Flying damage numbers...
Author https://onetap.su/members/tilestra.54952/
*/

//Vars
var iVictim_index, First_pos, Second_pos, Third_pos, Fourth_pos, Fifth_pos, First, Second, Third, Fourth, Five, iDamageCount = iOffsetCount = YOffsetFirst = YOffsetSecond = YOffsetThird = YOffsetFourth = YOffsetFive = loadFont = HitAttack = 0; 

//Store coordinates array
const first_screen_pos = [], second_screen_pos = [], third_screen_pos = [], fourth_screen_pos = [], fifth_screen_pos = [];

//>_<
//Damage event
function EVENT_PLAYER_HURT()
{
    //Get attacker
    iAttacker = Event.GetInt("attacker"); iAttacker_index = Entity.GetEntityFromUserID(iAttacker);
  
    //Get victim
    iVictim = Event.GetInt("userid"); iVictim_index = Entity.GetEntityFromUserID(iVictim); 
  
    if(Entity.GetLocalPlayer() == iVictim_index && Entity.GetLocalPlayer() !== iAttacker_index)    return;
  
    //BEGIN ANIM
    if(Entity.GetLocalPlayer() == iAttacker_index)
    {
        //First hit
        HitAttack = 1;
      
        //Reset every 5 hit
        if(iDamageCount == 5) iDamageCount = 0; if(iOffsetCount == 5) iOffsetCount = 0;
      
        //Collect them and set only 5 hits
        iDamageCount+=1;
      
        //This is offset for Y for each
        iOffsetCount+=1;       
      
        //This shit reads every hit with a new var...
        if(iDamageCount == 1)    {    First = Event.GetInt("dmg_health");    First_pos = Entity.GetRenderOrigin(iVictim_index);    } 
        if(iDamageCount == 2)    {    Second = Event.GetInt("dmg_health");    Second_pos = Entity.GetRenderOrigin(iVictim_index);    }             
        if(iDamageCount == 3)    {    Third = Event.GetInt("dmg_health");    Third_pos = Entity.GetRenderOrigin(iVictim_index);    }     
        if(iDamageCount == 4)    {    Fourth = Event.GetInt("dmg_health");    Fourth_pos = Entity.GetRenderOrigin(iVictim_index);    }     
        if(iDamageCount == 5)    {    Five = Event.GetInt("dmg_health");    Fifth_pos = Entity.GetRenderOrigin(iVictim_index);    }

        //Setup offsets
        if(iOffsetCount == 1)    YOffsetFirst = 255; if(iOffsetCount == 2)    YOffsetSecond = 255; if(iOffsetCount == 3)    YOffsetThird = 255; if(iOffsetCount == 4)    YOffsetFourth = 255; if(iOffsetCount == 5)    YOffsetFive = 200;             
    }     
}

function HUD_REDRAW()
{
    //Once and lock font load
    if(loadFont == 0)
    {
        //this font u can get here https://onetap.su/threads/beta-in-development-onetap-hud-engine-0-1-dev-18945-18952-dec-27-2019.13647/
        fontSM2 = Render.AddFont("Verdana", 8, 550)
        loadFont = 1;
    }
  
    /*Render.StringCustomCustom(Global.GetScreenSize()[0]/2, Global.GetScreenSize()[1]/2, 1, "" + iDamageCount, [ 255, 255, 255, 255 ], fontSM2);
    Render.StringCustomCustom(Global.GetScreenSize()[0]/2, Global.GetScreenSize()[1]/2+50, 1, "" + iOffsetCount, [ 255, 255, 255, 255 ], fontSM2);*/

    //Stop flooding
    if(!HitAttack || !getCustomValue('Quake Damage Numbers'))    return;

    //Doing cycle through all players will affect on FPS heavily... so
    if(Entity.IsValid(iVictim_index))
    {
        
  
        //Setup x,y,z
        if(iDamageCount < 6)   
        {
            first_screen_pos = Render.WorldToScreen(First_pos);
            second_screen_pos = Render.WorldToScreen(Second_pos);
            third_screen_pos = Render.WorldToScreen(Third_pos);
        }
        
        color = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Color");
        //Five pieces of damage, the hell
            Render.StringCustom(first_screen_pos[0]-15+1, first_screen_pos[1]-50+YOffsetFirst-255+1, 1, "" + First, [ 0, 0,0, YOffsetFirst ], fontSM2);
            Render.StringCustom(first_screen_pos[0]-15, first_screen_pos[1]-50+YOffsetFirst-255, 1, "" + First, alp( color, YOffsetFirst ), fontSM2);
        
            Render.StringCustom(second_screen_pos[0]+15+1, second_screen_pos [1]-50+YOffsetSecond-255+1, 1, "" + Second, [ 0, 0, 0, YOffsetSecond ], fontSM2);
            Render.StringCustom(second_screen_pos[0]+15, second_screen_pos [1]-50+YOffsetSecond-255, 1, "" + Second, alp( color, YOffsetSecond ), fontSM2);
        
            Render.StringCustom(third_screen_pos[0]-25+1, third_screen_pos[1]-50+YOffsetThird-255+1, 1, "" + Third, [ 0,0,0, YOffsetThird ], fontSM2);
            Render.StringCustom(third_screen_pos[0]-25, third_screen_pos[1]-50+YOffsetThird-255, 1, "" + Third, alp( color, YOffsetThird ), fontSM2);
        
            Render.StringCustom(fourth_screen_pos[0]+25+1, fourth_screen_pos[1]-50+YOffsetFourth-255+1, 1, "" + Fourth, [ 0, 0, 0, YOffsetFourth ], fontSM2);
            Render.StringCustom(fourth_screen_pos[0]+25, fourth_screen_pos[1]-50+YOffsetFourth-255, 1, "" + Fourth, alp(color, YOffsetFourth ), fontSM2);
        
            Render.StringCustom(fifth_screen_pos[0]-10+1, fifth_screen_pos[1]-50+YOffsetFive-255+1, 1, "" + Five, [ 0, 0, 0, YOffsetFive ], fontSM2);
            Render.StringCustom(fifth_screen_pos[0]-10, fifth_screen_pos[1]-50+YOffsetFive-255, 1, "" + Five, alp( color, YOffsetFive ), fontSM2);
        
    }     
} 

function getCustomValue(name)
{
    var value = UI.GetValue("Misc", "JAVASCRIPT", "Script items", name);
    return value;
}

function pushY()
{
    //Push Y
        if(YOffsetFirst > 1)    YOffsetFirst--; if(YOffsetSecond > 1)    YOffsetSecond--; if(YOffsetThird > 1)    YOffsetThird--; if(YOffsetFourth > 1)    YOffsetFourth--; if(YOffsetFive > 1)    YOffsetFive--;
}

function alp(c, a) {
  return [c[0], c[1], c[2], a]
}

function Main()
{
    Global.RegisterCallback("Draw", "HUD_REDRAW");
    Global.RegisterCallback("player_hurt", "EVENT_PLAYER_HURT");
    Global.RegisterCallback("CreateMove", "pushY");
    UI.AddCheckbox('Quake Damage Numbers');
    UI.AddColorPicker("Color");
    UI.AddCheckbox("Premade Settings");
}

Main();
var tags = {
    "kiwihook" : "KiwiHook[Alpha]",
    "skeet"    : "gamesense",
    "To"       : "YourPresetHere",
    "Add"      : "YourPresetHere",
    "Presets"  : "YourPresetHere"
};
 
/*--------------------------------------------------------------------------------
-- Utility functions
--------------------------------------------------------------------------------*/
function collect_keys(tbl, custom) {
    var keys = Object.keys( tbl );
 
    if ( custom ) {
        keys.unshift( "Disabled" );
        keys.push( "Custom" );
    }
 
    return keys;
}
 
var __lastSetClanTag = "";
function _setClanTag(tag) {
    if ( __lastSetClanTag == tag ) return false;
    __lastSetClanTag = tag;
    Local.SetClanTag( tag );
    return true;
}
/*--------------------------------------------------------------------------------
-- Constants and variables
--------------------------------------------------------------------------------*/
 
var tag = "";
var tag_index = 0;
var tag_index_offset = 0;
var tag_length = 0;
var tag_reverse = 0;
var tag_last_index = 0;
var time_last_update = 0;
 
var update_after = Globals.Curtime();
 
var commands = 0;
 
/*--------------------------------------------------------------------------------
-- Clan tag animations
--------------------------------------------------------------------------------*/
 
function staticTag() {
    if (tag == "Disabled") return;
    _setClanTag( tag );
}
 
function timeTag() {
    var curTime = Globals.Curtime();
    if ( curTime - time_last_update < 1 ) return; // Only needs to update once per second. Just a tiny optimization.
    time_last_update = curTime;
 
    var curDate = new Date();
    var hours = curDate.getHours() + "";
    if ( hours.length == 1 ) hours = "0" + hours;
    var minutes = curDate.getMinutes() + "";
    if ( minutes.length == 1 ) minutes = "0" + minutes;
    var seconds = curDate.getSeconds() + "";
    if ( seconds.length == 1 ) seconds = "0" + seconds;
 
    var time_tag = hours + ":" + minutes + ":" + seconds;
    _setClanTag( time_tag );
}
 
function defaultTag() {
    if (tag_index == tag_last_index) return;
    _setClanTag( tag_index == 0 ? "\0" : tag.substr( 0, tag_index ) );
}
 
function reverseTag() {
    if ( tag_index == tag_last_index ) return;
 
    if ( tag_reverse <= tag_length ) {
        _setClanTag( tag.substr( 0, tag_index ) );
    } else {
        _setClanTag( (tag_length - tag_index == 0) ? "\0" : tag.substr( 0, tag_length - tag_index ) );
    }
}
 
function loopTag() {
    if ( tag_index == tag_last_index ) return;
    var loop_tag = tag;
 
    for ( var i = 0; i <= tag_index; i++ ) { // Only until we reach tag_index
        loop_tag = loop_tag + loop_tag.substr( 0, 1 );     // Copy first character to the back
        loop_tag = loop_tag.substr( 1, loop_tag.length );  // Then delete the first character
    }
 
    _setClanTag( loop_tag );
}
 
function loopTagSkip(force) {
    force = force || false;
 
    if ( tag_index == tag_last_index && !force ) return;
    var loop_tag = tag;
 
    for ( var i = 0; i <= tag_index; i++ ) { // Only until we reach tag_index
        loop_tag = loop_tag + loop_tag.substr( 0, 1 );     // Copy first character to the back
        loop_tag = loop_tag.substr( 1, loop_tag.length );  // Then delete the first character
    }
 
    var visibleTag = loop_tag.substr( 0, 15 ).trim();
    if ( visibleTag.length == 1 ) {
        var realLength = loop_tag.length / 3;
        var idx = 9 + (realLength - 8) * 3; // Figure out at which index we need to skip once
 
        if ( tag_index == idx ) {
            tag_index++;
            tag_last_index++;
            tag_index_offset++;
            return loopTagSkip( true );
        }
    }
 
    _setClanTag( loop_tag );
}
 
function killDickTag() {
    // Update once every 0.3 seconds
    var curTime = Globals.Curtime();
    if ( curTime - time_last_update < 0.3 ) return;
    time_last_update = curTime;
 
    var killdick_mode = getUIValue( menu.killDickMode, undefined, false );
    var maxAmount = getUIValue( menu.killDickLength, "text" );
 
    // Modes 0, 1, 2 use the scoreboard for maxAmount
    if ( killdick_mode < 3 ) {
        var playerEntities = killdick_mode == 0
            ? Entity.GetPlayers() // relative to
            : killdick_mode == 1
                ? Entity.GetPlayers().filter(function(e) { return Entity.IsTeammate(e); }) // relative to teammates
                : Entity.GetPlayers().filter(function(e) { return !Entity.IsTeammate(e); }); // relative to enemies
 
        // Get highest kill count
        maxAmount = Math.max.apply( Math, playerEntities.map(function(e) { return Entity.GetProp( e, "CPlayerResource", "m_iKills" ); }) );
    } else {
        // Otherwise just use maxAmount from the textbox. On invalid input, default to 1.
        maxAmount = parseInt( maxAmount );
        maxAmount = (maxAmount <= 0 || isNaN( maxAmount )) ? 1 : maxAmount;
    }
 
    // get kills for player
    var playerEntity = Entity.GetLocalPlayer();
    var kills = Entity.GetProp( playerEntity, "CPlayerResource", "m_iKills" );
 
    // calculate size percentage
    var p = maxAmount == 0 ? 0 : (kills / maxAmount); // catch division by zero
    if ( p > 1 ) p = 1;
 
    // We have 15 characters; 1 reserved for balls and 1 for the tip and at least one for shaft. Yes I just wrote that.
    var shaftAmount = Math.floor( p * 12 );
 
    _setClanTag( "8" + "=".repeat( shaftAmount + 1 ) + "D" );
}
 
var animations = {
    "Static"  : staticTag,
    "Time"    : timeTag,
    "Default" : defaultTag,
    "Reverse" : reverseTag,
    "Classic" : loopTag,
    "Classic (skip first)" : loopTagSkip,
    "Loop"    : loopTag,
    "Killdick": killDickTag // :^)
};
 
var killdickModes = [
    "Relative to all",
    "Relative to team",
    "Relative to enemies",
    "Relative to custom limit"
];
 
/*--------------------------------------------------------------------------------
-- Menu
--------------------------------------------------------------------------------*/
 
function uiTransform(key, value) {
    var t = {
        "Animation" : function(value) { // index => name, name => index
            if ( typeof value == "string" ) {
                return collect_keys( animations, false ).indexOf( value );
            }
 
            return collect_keys( animations, false )[ value ];
        },
        "Tags" : function(value) { // index => name, name => index
            if ( typeof value == "string" ) {
                return collect_keys( tags, true )[ value ].indexOf( value );
            }
 
            return collect_keys( tags, true )[ value ];
        },
        "Mode" : function(value) {
            if ( typeof value == "string" ) {
                return killdickModes.indexOf( value );
            }
 
            return killdickModes[ value ];
        }
    };
 
    if ( t[ key ] ) return t[ key ]( value );
    return value;
}
 
function setUIValue(key, value) {
    UI.SetValue( "Misc", "JAVASCRIPT", "Script items", "[TC] " + key, value );
}
 
function getUIValue(key, type, doTransform) {
    doTransform = doTransform === undefined ? true : false;
    type = type || "default";
    var raw = null;
 
    if ( type == "default" ) raw = UI.GetValue( "Misc", "JAVASCRIPT", "Script items", "[TC] " + key );
    if ( type == "text" ) {
        raw = UI.GetString( "Misc", "JAVASCRIPT", "Script items", "[TC] " + key );
        if ( !raw || !raw.length ) raw = "\0";
    }
 
    return doTransform ? uiTransform( key, raw ) : raw;
}
 
function setUIEnabled(key, value) {
    UI.SetEnabled( "Misc", "JAVASCRIPT", "Script items", "[TC] " + key, value );
}
 
var menu = {
    enabled : "Clan Tag Changer",
    tags : "Tags",
    styles : "Animation",
    killDickMode : "Mode",
    killDickLength : "Kill-dick max size at kill amount",
    speed : "Speed",
    text : "Text"
};
 
UI.AddCheckbox( "[TC] " + menu.enabled );
UI.AddDropdown( "[TC] " + menu.tags, collect_keys( tags, true ) );
UI.AddTextbox( "[TC] " + menu.text );
UI.AddDropdown( "[TC] " + menu.styles, collect_keys( animations, false ) );
UI.AddDropdown( "[TC] " + menu.killDickMode, killdickModes );
UI.AddTextbox( "[TC] " + menu.killDickLength );
UI.AddSliderInt( "[TC] " + menu.speed, 0, 100 );
setUIValue( menu.speed, 30 );
 
function handle_menu(e) {
    if ( e && e.what == menu.tags && e.after == "Disabled" ) {
        _setClanTag( "\0" ); // Set tag to nothing if Tags is set to Disabled.
    }
 
    var state = getUIValue( menu.enabled );
    var menu_tag = getUIValue( menu.tags );
    var tag_style = getUIValue( menu.styles );
    var killdick_mode = getUIValue( menu.killDickMode );
 
    setUIEnabled( menu.tags, state );
    setUIEnabled( menu.styles, state );
    setUIEnabled( menu.speed, state );
    setUIEnabled( menu.killDickMode, state && (tag_style == "Killdick") );
    setUIEnabled( menu.killDickLength, state && (tag_style == "Killdick") && (killdick_mode == killdickModes[ 3 ]) );
    setUIEnabled( menu.text, state && (menu_tag == "Custom") );
 
    if (!state) _setClanTag( "\0" );
}
 
function handle_text_change() {
    update_after = Globals.Curtime() + 1;
    // reset all
    tag_index = 0;
    tag_length = 0;
    tag_reverse = 0;
    tag_last_index = 0;
    _setClanTag( "\0" );
}
 
handle_menu()
 
// Bridge some stuff that exists in the lua...
var listeners = {};
 
function listenerCheck() {
    Object.keys( listeners ).forEach(function(key) {
        var v = getUIValue( key, listeners[ key ].type );
        if ( v != listeners[ key ].currentValue ) {
            listeners[ key ].callbacks.forEach(function(cb) {
                cb({ before : listeners[ key ].currentValue, after : v, what : key });
            });
 
            listeners[ key ].currentValue = v;
        }
    });
}
 
function listen( onElement, callback, type ) {
    if ( !listeners[ onElement ] ) {
        listeners[ onElement ] = {
            callbacks : [ callback ],
            currentValue : getUIValue( onElement, type ),
            type : type || "default"
        };
    } else {
        listeners[ onElement ].callbacks.push( callback );
    }
}
 
listen( menu.enabled, handle_menu );
listen( menu.tags, handle_menu );
listen( menu.styles, handle_menu );
listen( menu.killDickMode, handle_menu );
listen( menu.text, handle_text_change, "text" );
 
/*--------------------------------------------------------------------------------
-- Game event handling
--------------------------------------------------------------------------------*/
function net_update_end() {
    if ( !getUIValue( menu.enabled ) ) return;
 
    var local_player  = Entity.GetLocalPlayer();
    var menu_tag      = getUIValue( menu.tags );
    var tag_style     = getUIValue( menu.styles );
    var update_tag    = Globals.Curtime() > update_after; //commands == 0 || Entity.IsAlive( local_player ) == false;
 
    var isClassicVariant = tag_style == "Classic" || tag_style == "Classic (skip first)";
 
    if ( menu_tag == "Disabled" ) return;
 
    tag          = (menu_tag == "Custom") ? getUIValue( menu.text, "text" ).substr(0,15) : tags[ menu_tag ]; // clip to max length of 15 characters
 
    if ( isClassicVariant && tag.length < 8 ) {
        tag = tag + (" ".repeat( 8 - tag.length ));
    }
 
    if ( tag_style != "Classic (skip first)" ) {
        tag_index_offset = 0;
    }
 
    tag         = (tag_style == "Loop") ? tag + " " : tag;
    tag         = isClassicVariant ? (tag + " ".repeat( Math.floor( tag.length * 2 ) )) : tag;
    tag_length  = tag.length;
    tag_index   = Math.floor( ( (Globals.Curtime() * getUIValue( menu.speed ) / 10) + tag_index_offset ) % tag_length + 1 );
    tag_reverse = Math.floor( ( Globals.Curtime() * getUIValue( menu.speed ) / 10 ) % ( tag_length * 2 ) + 1 );
 
    if ( !update_tag ) return;
 
    var animation = animations[ tag_style ];
    animation();
 
    tag_last_index = tag_index;
}
 
/*
function run_command(cmd) {
    if ( !getUIValue( menu.enabled ) ) return;
 
    // Can't do this.
    commands = cmd.chokedcommands;
}
*/
 
/*
local function shutdown()
    client_set_clan_tag("\0")
end
*/
 
function onFrameStageNotify() {
    if ( Cheat.FrameStage() == 0 ) listenerCheck();
    if ( Cheat.FrameStage() == 4 ) net_update_end();
}
 
Cheat.RegisterCallback( "FrameStageNotify", "onFrameStageNotify" );
 var grenades = [];
var types = ["CSmokeGrenadeProjectile", "CDecoyProjectile",
    "CMolotovProjectile", "CBaseCSGrenadeProjectile"
];
var local = Entity.GetLocalPlayer();
var binlib = {};
 
function test() {
    var enabled = UI.GetValue("Script items",
        "[EGPred] Enable Indicators");
    if (!enabled)
        return;
    var entities = Entity.GetEntities();
    for (var i = 0; i < entities.length; i++) {
        var ent = entities[i];
        var t = Entity.GetClassName(ent);
        if (inArray(t, types)) {
            var damage = Entity.GetProp(ent, "CBaseGrenade",
                "m_flDamage");
            var opts = fetchDropdown("[EGPred] Show grenades");
            if (opts == undefined)
                opts = [];
            if (t == "CBaseCSGrenadeProjectile" && inArray(
                    "Flash + Frag", opts))
                grenade(ent, 500, "he", damage);
            else
            if (t == "CMolotovProjectile" && inArray("Molotov", opts))
                grenade(ent, 500, "mol", damage);
            else
            if (t == "CDecoyProjectile" && inArray("Decoy", opts))
                grenade(ent, 500, "decoy", damage);
            else
            if (t == "CSmokeGrenadeProjectile" && inArray("Smoke",
                    opts))
                grenade(ent, 500, "smoke", damage);
        }
    }
}
 
function grenade(ent, distanceMax, type, damage) {
    var eloc;
    var lLoc = Entity.GetHitboxPosition(local, 12);
    var name;
    var iColor = UI.GetColor("Script items",
        "[EGPred] Interior indicator");
    var xColor = UI.GetColor("Script items",
        "[EGPred] Exterior indicator");
    var exColor = UI.GetColor("Script items",
        "[EGPred] Exclamation indicator");
    var nameColor = UI.GetColor("Script items",
        "[EGPred] Name indicator");
    var distColor = UI.GetColor("Script items",
        "[EGPred] Distance indicator");
    var killColor = UI.GetColor("Script items",
        "[EGPred] Death indicator");
    var dmgColor = UI.GetColor("Script items",
         "[EGPred] Damage indication");
    var size = UI.GetValue("Script items",
         "[EGPred] Size of warning",
        "Integer");
    var sizeName = UI.GetValue("Script items",
        "[EGPred] Size of name", "Integer");
    var dispName = UI.GetValue("Script items",
        "[EGPred] Display Nade Name");
    var showDist = UI.GetValue("Script items",
        "[EGPred] Display Distance");
    var dispDmg = UI.GetValue("Script items",
        "[EGPred] Display Damage");
 
    if (type == "mol") {
        name = "Molotov";
        var eLoc = Entity.GetProp(ent, "CMolotovProjectile",
            "m_vecOrigin");
    } else if (type == "he") {
        name = "Flash/Frag";
        var eLoc = Entity.GetProp(ent, "CBaseCSGrenadeProjectile",
            "m_vecOrigin");
    } else if (type == "decoy") {
        name = "Decoy";
        var eLoc = Entity.GetProp(ent, "CDecoyProjectile",
            "m_vecOrigin");
    } else if (type == "smoke") {
        name = "Smoke";
        var eLoc = Entity.GetProp(ent, "CSmokeGrenadeProjectile",
            "m_vecOrigin");
    }
    if (!Entity.IsValid(ent) || Entity.IsDormant(ent))
        return;
    var distance = calcDist(eLoc, lLoc);
    if (distance <= distanceMax) {
        var world = Entity.GetRenderOrigin(ent);
        var cPos = Render.WorldToScreen(world);
        var willKill = false;
        var dmg;
 
       if(type == "he") {
 
        var damage = Entity.GetProp(ent, "CBaseGrenade", "m_flDamage");
        var armor = Entity.GetProp(local, "CCSPlayerResource", "m_iArmor");
        var health = Entity.GetProp(local, "CBasePlayer", "m_iHealth");
        const a = 105.0;
        const b = 25.0;
        const c = 140.0;
 
        const d = (distance - b) / (c+1);
 
        var damage = (a-18) * Math.exp(-d * d);
 
        if(armor > 0) {
            var newDmg = damage * 0.5;
            var armorDmg = (damage - newDmg) * 0.5;
 
            if(armorDmg > armor) {
                armor = armor*(1/.5);
                newDmg = damage-armorDmg;
            }
            damage = newDmg;
        }
        dmg = Math.ceil(damage);
 
        if(dmg+5 > health)
            willKill = true;
        else
            willKill = false;
       }
 
 
        size = Math.floor((size - distance/20));
        sizeName = Math.floor((sizeName - distance/20));
 
        size = adjTextSize(size);
        sizeName = adjTextSize(sizeName);
 
        for (var j = 0; j < size; j++) {
            if(willKill)
                Render.Circle(cPos[0], cPos[1], j, killColor);
            else
            if (j < (size / 1.5))
                Render.Circle(cPos[0], cPos[1], j, iColor);
            else
                Render.Circle(cPos[0], cPos[1], j, xColor);
        }
        var dmgX = (cPos[0] - (8*(sizeName/1.2)));
        var distX = (cPos[0] - (-2*(sizeName/1.2)));
 
        if(dispDmg && type == "he")
            Render.String(dmgX, cPos[1] - 60, 0, "Dmg:" + dmg, dmgColor,
                sizeName);
        if (dispName)
            Render.String(cPos[0] - 25, cPos[1] + 20, 0, name, nameColor,
                sizeName);
        if (showDist)
            Render.String(distX, cPos[1] - 60, 0, "D: " + Math.round(
                distance), distColor, sizeName);
        Render.String(cPos[0] - (size / 3.6), cPos[1] - (size / 1.3),
            0, "!", exColor, size);
    }
}
 
function adjTextSize(size) {
    if (size < 8)
        size = 8;
    if (size > 48)
        size = 48;
    if (size % 2 != 0)
        size += 1;
    return size;
}
 
function inArray(string, array) {
    if (array == [] || array == undefined)
        return false;
    for (var i = 0; i < array.length; i++) {
        if (array[i] == string)
            return true;
        else if (i + 1 >= array.length)
            return false;
    }
}
 
function calcDist(local, target) {
    var lx = local[0];
    var ly = local[1];
    var lz = local[2];
    var tx = target[0];
    var ty = target[1];
    var tz = target[2];
    var dx = lx - tx;
    var dy = ly - ty;
    var dz = lz - tz;
    return Math.sqrt(dx * dx + dy * dy + dz * dz);
}
 
function setup() {
    UI.AddSliderInt("[EGPred] Size of warning", 0, 30);
    UI.AddSliderInt("[EGPred] Size of name", 0, 30);
    UI.AddColorPicker("[EGPred] Interior indicator");
    UI.AddColorPicker("[EGPred] Exterior indicator");
    UI.AddColorPicker("[EGPred] Exclamation indicator");
    UI.AddColorPicker("[EGPred] Name indicator");
    UI.AddColorPicker("[EGPred] Death indicator");
    UI.AddColorPicker("[EGPred] Damage indicator");
    UI.AddColorPicker("[EGPred] Distance indicator");
    UI.AddCheckbox("[EGPred] Enable Indicators");
    UI.AddCheckbox("[EGPred] Display Damage");
    UI.AddCheckbox("[EGPred] Display Distance");
    UI.AddCheckbox("[EGPred] Display Nade Name");
    createDropdown("[EGPred] Show grenades", ["Smoke", "Flash + Frag",
        "Molotov", "Decoy"
    ], true);
    Global.PrintColor([0, 255, 255, 255], "\n------------------------\n[EGPred] v1.0 by Ultranite\n------------------------\n");
}
 
function dictLength(dict) {
    var count = 0;
    for (_ in dict) {
        count++;
    }
    return count;
}
 
function createDropdown(name, values, multi) {
    UI[multi ? "AddMultiDropdown" : "AddDropdown"](name, values);
    binlib[name] = {
        "multi": multi,
        "values": {}
    };
    multi && values.reverse();
    var i = 0;
    for (value in values) {
        var index = multi ? (1 << (values.length - (i + 1))) : i;
        binlib[name].values[index] = values[value];
        i++;
    }
}
 
function fetchDropdown(name) {
    var selection = (name ? [] : {})
    var bin = UI.GetValue("Misc", name);
    !name && function() {
        for (dropdown in binlib) selection[dropdown] =
            fetchDropdown(dropdown)
    }();
    if (name) {
        !binlib[name].multi && bin == 0 && selection.push(binlib[name]
            .values[0]) && function() {
            return selection;
        }();
        for (var i = dictLength(binlib[name].values) - 1; i >=
            0; i--) {
            if (!binlib[name].multi && i == 0) continue;
            var index = binlib[name].multi ? (1 << i) : i;
            if (bin - index >= 0) {
                bin -= (index);
                selection.push(binlib[name].values[index]);
            }
        }
    }
    return selection;
}
 
/*function armorReduction(damage, armorVal) {
    var armorRatio = .5;
    var armorBonus = .5;
    if (armor > 0) {
        var newDmg = (damage * armorRatio);
        var armor = (damage - newDmg) * armorBonus;
        if (armor > armorVal) {
            armor = armorVal * (1 / armorBonus);
            newDmg = damage - armor;
        }
        damage = newDmg;
    }
    return newDmg;
}*/
 
setup();
 
Global.RegisterCallback("Draw", "test");
UI.AddCheckbox("Better doubletap");

function on_ragebot_fire()
{
    
    ragebot_target_exploit = Event.GetInt("exploit");
    if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Better doubletap"))
    {
        if (ragebot_target_exploit == 2)
        {
            UI.SetValue("Rage", "GENERAL", "Exploits", "Doubletap fast recovery", true);
        }
        else
        {
            UI.SetValue("Rage", "GENERAL", "Exploits", "Doubletap fast recovery", false);
        }
    }
            
}

Global.RegisterCallback("ragebot_fire", "on_ragebot_fire");
//Made by Antipindoc

var presets = ["Glow1", "Glow2", "Glow3", "Glow4", "Glow5"]

UI.AddSliderInt("",0,0);
UI.AddCheckbox("Show Materials")
UI.AddDropdown("Glowtypes", ["Glow1", "Glow2", "Glow3", "Glow4", "Glow5"])

UI.AddColorPicker("Glow Color");
UI.AddSliderFloat("Additional Brightness",0,1)
UI.AddSliderFloat("Glow Factor",1,20)
UI.AddSliderFloat("Glow Fill",1,10)
UI.AddCheckbox("Glow only")
UI.AddCheckbox("Wireframe")

UI.AddColorPicker("Glow Color\n");
UI.AddSliderFloat("Additional Brightness\n",0,1)
UI.AddSliderFloat("Glow Factor\n",1,20)
UI.AddSliderFloat("Glow Fill\n",1,10)
UI.AddCheckbox("Glow only\n")
UI.AddCheckbox("Wireframe\n")

UI.AddColorPicker("Glow Color\n\n");
UI.AddSliderFloat("Additional Brightness\n\n",0,1)
UI.AddSliderFloat("Glow Factor\n\n",1,20)
UI.AddSliderFloat("Glow Fill\n\n",1,10)
UI.AddCheckbox("Glow only\n\n")
UI.AddCheckbox("Wireframe\n\n")

UI.AddColorPicker("Glow Color\n\n\n");
UI.AddSliderFloat("Additional Brightness\n\n\n",0,1)
UI.AddSliderFloat("Glow Factor\n\n\n",1,20)
UI.AddSliderFloat("Glow Fill\n\n\n",1,10)
UI.AddCheckbox("Glow only\n\n\n")
UI.AddCheckbox("Wireframe\n\n\n")

UI.AddColorPicker("Glow Color\n\n\n\n");
UI.AddSliderFloat("Additional Brightness\n\n\n\n",0,1)
UI.AddSliderFloat("Glow Factor\n\n\n\n",1,20)
UI.AddSliderFloat("Glow Fill\n\n\n\n",1,10)
UI.AddCheckbox("Glow only\n\n\n\n")
UI.AddCheckbox("Wireframe\n\n\n\n")
UI.AddSliderInt("",0,0);

function updateMaterials()
{
    if(UI.GetValue("Script items", "Show Materials")){
        Material.Create("Glow1");
        Material.Create("Glow2");
        Material.Create("Glow3");
        Material.Create("Glow4");
        Material.Create("Glow5");
    }else{
        Material.Destroy("Glow1")
        Material.Destroy("Glow2")
        Material.Destroy("Glow3")
        Material.Destroy("Glow4");
        Material.Destroy("Glow5");
    }
    
    vec1 = 0
    
    for(i=0;i<4;i++){
        mat_index = Material.Get(""+presets[i]);

        envmaptint = UI.GetColor("Script items", "Glow Color" + stupidstuff(i))
        brightness = UI.GetValue("Script items", "Additional Brightness" + stupidstuff(i))
        vec3 =       UI.GetValue("Script items", "Glow Factor" + stupidstuff(i))
        vec2 =       UI.GetValue("Script items", "Glow Fill" + stupidstuff(i))
        glowonly = UI.GetValue("Script items", "Glow only" + stupidstuff(i));
        wireframe = UI.GetValue("Script items", "Wireframe" + stupidstuff(i));
        Material.SetKeyValue(mat_index, "$baseTexture", "vgui/white")
        Material.SetKeyValue(mat_index, "$additive", glowonly ? "1" : "0")
        Material.SetKeyValue(mat_index, "$color", "[0 0 0]");
        Material.SetKeyValue(mat_index, "$wireframe", wireframe ? "1" : "0")
        Material.SetKeyValue(mat_index, "$envmap", "models/effects/cube_white");
        Material.SetKeyValue(mat_index, "$envmapfresnel", "1");
        Material.SetKeyValue(mat_index, "$envmapfresnelminmaxexp", ""+vector(vec1,vec2,vec3));
        Material.SetKeyValue(mat_index, "$envmaptint", ""+standart(coloradd(envmaptint, brightness)));
        Material.Refresh(mat_index);
    }
}

function stupidstuff(num){
    switch(num){
        case 0:
            return ""
            break;
        case 1:
            return "\n"
            break;
        case 2:
            return "\n\n"
            break;
        case 3:
            return "\n\n\n"
            break;
        case 4:
            return "\n\n\n\n"
    }
}

function UI_check(){
    if(UI.GetValue("Script items", "Glowtypes") == 0){
        UI.SetEnabled("Script items", "Glow Color", true);
        UI.SetEnabled("Script items", "Additional Brightness", true);
        UI.SetEnabled("Script items", "Glow Factor", true);
        UI.SetEnabled("Script items", "Glow Fill", true);
        UI.SetEnabled("Script items", "Glow only", true);
        UI.SetEnabled("Script items", "Wireframe", true);
    }else{
        UI.SetEnabled("Script items", "Glow Color", false);
        UI.SetEnabled("Script items", "Additional Brightness", false);
        UI.SetEnabled("Script items", "Glow Factor", false);
        UI.SetEnabled("Script items", "Glow Fill", false);
        UI.SetEnabled("Script items", "Glow only", false);
        UI.SetEnabled("Script items", "Wireframe", false);
    }
    
    if(UI.GetValue("Script items", "Glowtypes") == 1){
        UI.SetEnabled("Script items", "Glow Color\n", true);
        UI.SetEnabled("Script items", "Additional Brightness\n", true);
        UI.SetEnabled("Script items", "Glow Factor\n", true);
        UI.SetEnabled("Script items", "Glow Fill\n", true);
        UI.SetEnabled("Script items", "Glow only\n", true);
        UI.SetEnabled("Script items", "Wireframe\n", true);
    }else{
        UI.SetEnabled("Script items", "Glow Color\n", false);
        UI.SetEnabled("Script items", "Additional Brightness\n", false);
        UI.SetEnabled("Script items", "Glow Factor\n", false);
        UI.SetEnabled("Script items", "Glow Fill\n", false);
        UI.SetEnabled("Script items", "Glow only\n", false);
        UI.SetEnabled("Script items", "Wireframe\n", false);
    }
    
    if(UI.GetValue("Script items", "Glowtypes") == 2){
        UI.SetEnabled("Script items", "Glow Color\n\n", true);
        UI.SetEnabled("Script items", "Additional Brightness\n\n", true);
        UI.SetEnabled("Script items", "Glow Factor\n\n", true);
        UI.SetEnabled("Script items", "Glow Fill\n\n", true);
        UI.SetEnabled("Script items", "Glow only\n\n", true);
        UI.SetEnabled("Script items", "Wireframe\n\n", true);
    }else{
        UI.SetEnabled("Script items", "Glow Color\n\n", false);
        UI.SetEnabled("Script items", "Additional Brightness\n\n", false);
        UI.SetEnabled("Script items", "Glow Factor\n\n", false);
        UI.SetEnabled("Script items", "Glow Fill\n\n", false);
        UI.SetEnabled("Script items", "Glow only\n\n", false);
        UI.SetEnabled("Script items", "Wireframe\n\n", false);
    }
    
    if(UI.GetValue("Script items", "Glowtypes") == 3){
        UI.SetEnabled("Script items", "Glow Color\n\n\n", true);
        UI.SetEnabled("Script items", "Additional Brightness\n\n\n", true);
        UI.SetEnabled("Script items", "Glow Factor\n\n\n", true);
        UI.SetEnabled("Script items", "Glow Fill\n\n\n", true);
        UI.SetEnabled("Script items", "Glow only\n\n\n", true);
        UI.SetEnabled("Script items", "Wireframe\n\n\n", true);
    }else{
        UI.SetEnabled("Script items", "Glow Color\n\n\n", false);
        UI.SetEnabled("Script items", "Additional Brightness\n\n\n", false);
        UI.SetEnabled("Script items", "Glow Factor\n\n\n", false);
        UI.SetEnabled("Script items", "Glow Fill\n\n\n", false);
        UI.SetEnabled("Script items", "Glow only\n\n\n", false);
        UI.SetEnabled("Script items", "Wireframe\n\n\n", false);
    }
    
    if(UI.GetValue("Script items", "Glowtypes") == 4){
        UI.SetEnabled("Script items", "Glow Color\n\n\n\n", true);
        UI.SetEnabled("Script items", "Additional Brightness\n\n\n\n", true);
        UI.SetEnabled("Script items", "Glow Factor\n\n\n\n", true);
        UI.SetEnabled("Script items", "Glow Fill\n\n\n\n", true);
        UI.SetEnabled("Script items", "Glow only\n\n\n\n", true);
        UI.SetEnabled("Script items", "Wireframe\n\n\n\n", true);
    }else{
        UI.SetEnabled("Script items", "Glow Color\n\n\n\n", false);
        UI.SetEnabled("Script items", "Additional Brightness\n\n\n\n", false);
        UI.SetEnabled("Script items", "Glow Factor\n\n\n\n", false);
        UI.SetEnabled("Script items", "Glow Fill\n\n\n\n", false);
        UI.SetEnabled("Script items", "Glow only\n\n\n\n", false);
        UI.SetEnabled("Script items", "Wireframe\n\n\n\n", false);
    }
    
}

function vector(vec1,vec2,vec3){
    result = "[";
    result += vec1 + " ";
    result += vec2 + " ";
    result += (20-vec3) + "]";
    return result;
}
function standart(ar){
    result = "["
    result += ar[0]/255 + " ";
    result += ar[1]/255 + " ";
    result += ar[2]/255 + "\]";
    return result
}

function coloradd(ar,val){
    val = 1/val;
    temp1 = ar[0] + ((255-ar[0])/val)
    temp2 = ar[1] + ((255-ar[1])/val)
    temp3 = ar[2] + ((255-ar[2])/val)
    return [temp1, temp2, temp3, 255]
}
Cheat.RegisterCallback("Draw","UI_check")
Cheat.RegisterCallback("Material", "updateMaterials")
UI.AddCheckbox("Doubletap Teleport");
UI.SetValue("Rage", "GENERAL", "Exploits", "Teleport release", true);
function on_ragebot_fire()
{
    ragebot_target_exploit = Event.GetInt("exploit");
    if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Doubletap Teleport"))
    {
        (ragebot_target_exploit == 2) ? UI.ToggleHotkey("Rage", "GENERAL", "Exploits", "Doubletap") : UI.ToggleHotkey("Rage", "GENERAL", "Exploits", "Doubletap");
    }   
}
Global.RegisterCallback("ragebot_fire", "on_ragebot_fire");
/**

 *

 * Title: Bomb timber

 * Author: hvhforgame#3204

 * Credits: april for api snippets, Ultranite for providing me armorvalue example

*/



//region api

const global_print = Global.Print, global_print_chat = Global.PrintChat, global_print_color = Global.PrintColor, global_register_callback = Global.RegisterCallback, global_execute_command = Global.ExecuteCommand, global_frame_stage = Global.FrameStage, global_tickcount = Global.Tickcount, global_tickrate = Global.Tickrate, global_tick_interval = Global.TickInterval, global_curtime = Global.Curtime, global_realtime = Global.Realtime, global_frametime = Global.Frametime, global_latency = Global.Latency, global_get_view_angles = Global.GetViewAngles, global_set_view_angles = Global.SetViewAngles, global_get_map_name = Global.GetMapName, global_is_key_pressed = Global.IsKeyPressed, global_get_screen_size = Global.GetScreenSize, global_get_cursor_position = Global.GetCursorPosition, global_play_sound = Global.PlaySound, global_play_microphone = Global.PlayMicrophone, global_stop_microphone = Global.StopMicrophone, global_get_username = Global.GetUsername, global_set_clan_tag = Global.SetClanTag, globals_tickcount = Globals.Tickcount, globals_tickrate = Globals.Tickrate, globals_tick_interval = Globals.TickInterval, globals_curtime = Globals.Curtime, globals_realtime = Globals.Realtime, globals_frametime = Globals.Frametime, sound_play = Sound.Play, sound_play_microphone = Sound.PlayMicrophone, sound_stop_microphone = Sound.StopMicrophone, cheat_get_username = Cheat.GetUsername, cheat_register_callback = cheat_register_callback = new Proxy(Cheat.RegisterCallback, { apply: function(_, _, args) { switch(args[0]) { case 'paint': Cheat.RegisterCallback('Draw', args[1]); break; case 'create_move': Cheat.RegisterCallback('CreateMove', args[1]); break; case 'fsn': Cheat.RegisterCallback('FrameStageNotify', args[1]); break; default: Cheat.RegisterCallback(args[0], args[1]); break; } } }), cheat_execute_command = Cheat.ExecuteCommand, cheat_frame_stage = Cheat.FrameStage, cheat_print = Cheat.Print, cheat_print_chat = Cheat.PrintChat, cheat_print_color = Cheat.PrintColor, local_latency = Local.Latency, local_get_view_angles = Local.GetViewAngles, local_set_view_angles = Local.SetViewAngles, local_set_clan_tag = Local.SetClanTag, local_get_real_yaw = Local.GetRealYaw, local_get_fake_yaw = Local.GetFakeYaw, local_get_spread = Local.GetSpread, local_get_inaccuracy = Local.GetInaccuracy, world_get_map_name = World.GetMapName, world_get_server_string = World.GetServerString, input_get_cursor_position = Input.GetCursorPosition, input_is_key_pressed = Input.IsKeyPressed, render_string = Render.String, render_text_size = Render.TextSize, render_line = Render.Line, render_rect = Render.Rect, render_filled_rect = Render.FilledRect, render_gradient_rect = Render.GradientRect, render_circle = Render.Circle, render_filled_circle = Render.FilledCircle, render_polygon = Render.Polygon, render_world_to_screen = Render.WorldToScreen, render_add_font = Render.AddFont, render_find_font = Render.FindFont, render_string_custom = Render.StringCustom, render_textured_rect = Render.TexturedRect, render_add_texture = Render.AddTexture, render_text_size_custom = Render.TextSizeCustom, render_get_screen_size = Render.GetScreenSize, ui_get_value = UI.GetValue, ui_set_value = UI.SetValue, ui_add_checkbox = UI.AddCheckbox, ui_add_slider_int = UI.AddSliderInt, ui_add_slider_float = UI.AddSliderFloat, ui_add_hotkey = UI.AddHotkey, ui_add_label = UI.AddLabel, ui_add_dropdown = UI.AddDropdown, ui_add_multi_dropdown = UI.AddMultiDropdown, ui_add_color_picker = UI.AddColorPicker, ui_add_textbox = UI.AddTextbox, ui_set_enabled = UI.SetEnabled, ui_get_string = UI.GetString, ui_get_color = UI.GetColor, ui_set_color = UI.SetColor, ui_is_hotkey_active = UI.IsHotkeyActive, ui_toggle_hotkey = UI.ToggleHotkey, ui_is_menu_open = UI.IsMenuOpen, convar_get_int = Convar.GetInt, convar_set_int = Convar.SetInt, convar_get_float = Convar.GetFloat, convar_set_float = Convar.SetFloat, convar_get_string = Convar.GetString, convar_set_string = Convar.SetString, event_get_int = Event.GetInt, event_get_float = Event.GetFloat, event_get_string = Event.GetString, entity_get_entities = Entity.GetEntities, entity_get_entities_by_class_i_d = Entity.GetEntitiesByClassID, entity_get_players = Entity.GetPlayers, entity_get_enemies = Entity.GetEnemies, entity_get_teammates = Entity.GetTeammates, entity_get_local_player = Entity.GetLocalPlayer, entity_get_game_rules_proxy = Entity.GetGameRulesProxy, entity_get_entity_from_user_i_d = Entity.GetEntityFromUserID, entity_is_teammate = Entity.IsTeammate, entity_is_enemy = Entity.IsEnemy, entity_is_bot = Entity.IsBot, entity_is_local_player = Entity.IsLocalPlayer, entity_is_valid = Entity.IsValid, entity_is_alive = Entity.IsAlive, entity_is_dormant = Entity.IsDormant, entity_get_class_i_d = Entity.GetClassID, entity_get_class_name = Entity.GetClassName, entity_get_name = Entity.GetName, entity_get_weapon = Entity.GetWeapon, entity_get_weapons = Entity.GetWeapons, entity_get_render_origin = Entity.GetRenderOrigin, entity_get_prop = Entity.GetProp, entity_set_prop = Entity.SetProp, entity_get_hitbox_position = Entity.GetHitboxPosition, entity_get_eye_position = Entity.GetEyePosition, trace_line = Trace.Line, trace_bullet = Trace.Bullet, usercmd_set_movement = UserCMD.SetMovement, usercmd_get_movement = UserCMD.GetMovement, usercmd_set_angles = UserCMD.SetAngles, usercmd_force_jump = UserCMD.ForceJump, usercmd_force_crouch = UserCMD.ForceCrouch, antiaim_get_override = AntiAim.GetOverride, antiaim_set_override = AntiAim.SetOverride, antiaim_set_real_offset = AntiAim.SetRealOffset, antiaim_set_fake_offset = AntiAim.SetFakeOffset, antiaim_set_l_b_y_offset = AntiAim.SetLBYOffset, exploit_get_charge = Exploit.GetCharge, exploit_recharge = Exploit.Recharge, exploit_disable_recharge = Exploit.DisableRecharge, exploit_enable_recharge = Exploit.EnableRecharge, ragebot_override_minimum_damage = Ragebot.OverrideMinimumDamage, ragebot_override_hitchance = Ragebot.OverrideHitchance, ragebot_override_accuracy_boost = Ragebot.OverrideAccuracyBoost, ragebot_override_multipoint_scale = Ragebot.OverrideMultipointScale, ragebot_force_safety = Ragebot.ForceSafety;

//endregion



var screen_size = global_get_screen_size();

var bombsite, player_name, site = "";

var plating_time = 3.125;

var planting, planted, ignore_dropped, ignore_self = false;

var r = 108, g = 195, b = 18;

var rr = 108, gr = 195, br = 18;

var bomb_beginwhen = null;

const planting_height = 0;

const defuse_height = 0;



//Math functions

function lerp_pos(x1, y1, z1, x2, y2, z2, percentage)

{

    var x = (x2 - x1) + percentage + x1;

    var y = (y2 - y1) + percentage + y1;

    var z = (z2 - z1) + percentage + z1;

    return [x, y, z];

}

function distance3d(x1,y1,z1,x2,y2,z2)

{

    return Math.sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2);

}

function getDefuseTime(bomb_entity)

{

    var defuse_time = entity_get_prop(bomb_entity, "CPlantedC4", "m_flDefuseCountDown") - globals_curtime();

    return Math.max(0, defuse_time);

}

function getBombTime(bomb_entity)

{

    var bomb_time = entity_get_prop(bomb_entity, "CPlantedC4", "m_flC4Blow") - globals_curtime();

    return Math.max(0, bomb_time);

}

function getBombSite(bomb_entity)

{

    return bomb_site = entity_get_prop(bomb_entity, "CPlantedC4", "m_nBombSite") == 1 ? "B" : "A";

}

function getDistanceTo(a, b)

{

    var lx = a[0];

    var ly = a[1];

    var lz = a[2];

    var tx = b[0];

    var ty = b[1];

    var tz = b[2];

    var dx = lx - tx;

    var dy = ly - ty;

    var dz = lz - tz;

 

    return Math.sqrt(dx * dx + dy * dy + dz * dz);

}

function getDamage(damage, armor_value)

{

    if (armor_value > 0)

    {

        var new_value = damage * .5;

        var armor = (damage - new_value) * .5;

        if (armor > armor_value)

        {

            armor = armor_value * (1 / .5);

            new_value = damage - armor;

        }

        damage = new_value;

    }

    return damage;

}

function getBombDamage(player_entity, bomb_entity)

{

    var player_pos = entity_get_render_origin(player_entity);

    var bomb_pos = entity_get_render_origin(bomb_entity);

    var distance = getDistanceTo(player_pos, bomb_pos);

    const a = 450.7;

    const b = 75.68;

    const c = 789.2;

    const d = ((distance - b) / c);

    var damage = a * Math.exp(-d * d);

    var armor_value = entity_get_prop(player_entity, "CCSPlayerResource", "m_iArmor");



    return Math.max(Math.ceil(getDamage(damage, armor_value)), 0)

}



function draw_defuse_bar()

{

    var y = screen_size[1];

    const c4 = Entity.GetEntitiesByClassID(128)[0];

    var defused_at = entity_get_prop(c4, "CPlantedC4", "m_flDefuseCountDown");

    var defuse_length = entity_get_prop(c4, "CPlantedC4", "m_flDefuseLength");

    const timer = (Entity.GetProp(c4, "CPlantedC4", "m_flC4Blow") - Globals.Curtime()).toFixed(3);

    if (defuse_length > timer)

    {

        return;

    }

    defuse_height = Math.min(y, y * (globals_curtime() - (defused_at - defuse_length)) / defuse_length);

    render_filled_rect(15, 0, 15, render_get_screen_size()[1], [32,32,32,150]);

    render_filled_rect(15, y - defuse_height, 15, y, [79, 163, 227, 255]);

}



function on_paint()

{

    var x = screen_size[0];

    var y = screen_size[1];

    const bomb_entity = entity_get_entities_by_class_i_d(128);

    var bomb = null;



    const c4 = Entity.GetEntitiesByClassID(128)[0];

    if (planting)

    {

        if (player_name != entity_get_name(entity_get_local_player()))

        {

            render_string(17, 2, 0, bombsite + " - " + player_name, [0, 0, 0, 255], 4)

            render_string(15, 0, 0, bombsite + " - " + player_name, [r, g, b, 255], 4)

        }

        planting_height =  Math.min(y, y * (globals_curtime() - bomb_beginwhen) / plating_time);

        render_filled_rect(0, 0, 15, render_get_screen_size()[1], [32,32,32,150]);

        render_filled_rect(0, y - planting_height, 15, y, [rr,gr,br,255]);

    }

    if (planted)

    {

        if (bomb_entity != null)

        {

            bomb = bomb_entity[1];

            var local_player = entity_get_local_player();

            var bomb_time_max = convar_get_float("mp_c4timer");

            const bomb_damage = getBombDamage(local_player, c4);

            var player = entity_get_prop(c4, "CPlantedC4", "m_hBombDefuser");

            if (player == 1)

            {

                draw_defuse_bar();

            }

        }

        const timer = (Entity.GetProp(c4, "CPlantedC4", "m_flC4Blow") - Globals.Curtime()).toFixed(1);

        const planted_text = getBombSite(c4) + " - " + timer.toString() + "s";

        const height = Math.min(y, y * timer/bomb_time_max);



        render_filled_rect(0, 0, 15, render_get_screen_size()[1], [32,32,32,150]);

        render_filled_rect(0, y - height, 15, y, [rr,gr,br,255]);





        render_string(17, 2, 0, planted_text, [0, 0, 0, 255], 4)

        render_string(15, 0, 0, planted_text, [r, g, b, 255], 4)

        if (timer <= 10)

        {

            r = 230,g = 235,b = 145;

        }

        if (timer <= 5)

        {

            r = 255, g = 1, b = 1;

            rr = 255, gr = 1, br = 1;

        }

        if (timer <= 0)

        {

            r = 108, g = 195, b = 18;

            rr = 108, gr = 195, br = 18;

            planted = false;

            planting = false;

            return;

        }

        if (bomb_damage >= 3)

        {

            const damage_text= entity_get_prop(local_player, "CBasePlayer", "m_iHealth") <= bomb_damage ? "FATAL" : "-" + bomb_damage.toString() + " HP";

            const damage_color = entity_get_prop(local_player, "CBasePlayer", "m_iHealth") <= bomb_damage ? [255,1,1,255] : [230,235,145, 255];

            render_string(17, 30, 0, damage_text, [0, 0, 0, 255], 4);

            render_string(15, 28, 0, damage_text, damage_color, 4);

        }

    }

}

const a_site_array = [425, 333, 79, 262, 154, 94, 281, 204, 92, 152];

const b_site_array = [426, 422, 504, 314, 405, 536, 282, 205, 97, 153];

function beginPlant()

{

    var userid = event_get_int("userid");

    site = event_get_int("site");

    if (!userid) return;

    cheat_print("[onetap] Planting on bombsite id: " + event_get_int("site")+"\n");

    if (a_site_array.indexOf(site) > -1)

    {

        site = "A";

    }

    else if (b_site_array.indexOf(site) > -1)

    {

        site = "B";

    }

    else

    {

        return;

    }



    var userid_name = entity_get_entity_from_user_i_d(userid);

    var userid_name_final = entity_get_name(userid_name);



    planting = true;

    bombsite = site;

    player_name = userid_name_final;

    bomb_beginwhen = globals_curtime();

}

function abortPlant()

{

    planting = false;

    planted = false;

    planting_height = 0;

    defuse_height = 0;

}

function bombPlanted()

{

    planting = false;

    planted = true;

}

function reset()

{

    planting = false;

    planted = false;

    planting_height = 0;

    defuse_height = 0;

    site = "";

}

cheat_register_callback("bomb_beginplant", "beginPlant");

cheat_register_callback("bomb_abortplant", "abortPlant");

cheat_register_callback("bomb_planted", "bombPlanted");

cheat_register_callback("bomb_defused", "reset");

cheat_register_callback("round_start", "reset");

cheat_register_callback("Draw", "on_paint");
//--------------------------------------------------------//
//                                                        //
//            ▀▀█▀▀ █   █  ▀  █▀▀ ▀▀█▀▀ █ █               //
//              █   █▄█▄█ ▀█▀ ▀▀█   █   █▄█▄              //
//              ▀    ▀ ▀  ▀▀▀ ▀▀▀   ▀   ▄▄▄█              //
//                                                        //
//--------------------------------------------------------//
//                     Update 1.1                         //
//--------------------------------------------------------//
// Improvement to lag                                     //
// New design                                             //
// Added a Checkbox to see the nades all over the map     //
// Added new hvh molly pos for the maps -->               //
// shortdust, mirage, overpass                            //
//--------------------------------------------------------//--------------------------------------------------//
//                          |                             // A lot of thanks for Louisiana for helping me     //
//                          V                             // to make auto throw                               //
//--------------------------------------------------------//--------------------------------------------------//
//                     Update 1.2                         //
//--------------------------------------------------------//
// Added Automatic Throw                                  //
// Added Hotkey for throw                                 //
// Changed the text, now looks better than before         //
// Added new nade pos for the maps -->                    //
// de_train, de_mirage, de_cbble                          //
//--------------------------------------------------------//
//                          |                             //
//                          V                             //
//--------------------------------------------------------//

UI.AddCheckbox("Grenade Helper Enable")
UI.AddCheckbox("Automatic Throw")
UI.AddHotkey("Automatic Throw Hotkey")
UI.AddColorPicker("Grenade Helper Color")
UI.AddCheckbox("Render nade on all map")
UI.AddLabel("------------TwisTy LUA-------------");


var delays = []

function Delay(delay, func, times) {
    this.delay = delay;
    this.resume = Globals.Curtime()+delay;
    this.func = func;
    this.times = 0;
    this.max = times || 1;
    delays.push(this);
}

Delay.prototype.run = function() {
    this.func();
    this.times++;
    this.resume += this.delay;
    return this.times >= this.max;
}

function checkDelays() {
    currTime = Globals.Curtime();

    delays.forEach(function(delay, index) {
        currTime >= delay.resume && delay.run() && delays.splice(index, 1);
    })
}

var coords

function vector_sub(vec1, vec2) {
  return [
    vec1[0]-vec2[0],
    vec1[1]-vec2[1],
    vec1[2]-vec2[2]
  ];
}

function getAngles(localPos, pos) {
  newPos = vector_sub(pos, localPos);
  xyDist = Math.sqrt((newPos[0]*newPos[0] + newPos[1]*newPos[1]));
  yaw = Math.atan2(newPos[1], newPos[0]) * 180 / Math.PI;
  pitch = Math.atan2(-newPos[2], xyDist) * 180 / Math.PI;
  roll = 0;
  angles = [pitch, yaw, roll];
  return angles;
}


function atv(pitch, yaw) {

  return [Math.cos(pitch * Math.PI / 180) * Math.cos(yaw * Math.PI / 180), Math.cos(pitch * Math.PI / 180) * Math.sin(yaw * Math.PI / 180), -Math.sin(pitch * Math.PI / 180)]

}

  var scriptitems = ["Misc", "JAVASCRIPT", "Script Items"];

  function menu_cb() {
    var enabled = UI.GetValue(scriptitems, "Grenade Helper Enable");
    UI.SetEnabled(scriptitems, "Automatic Throw", enabled);
    UI.SetEnabled(scriptitems, "Automatic Throw Hotkey", enabled);
    UI.SetEnabled(scriptitems, "Grenade Helper Color", enabled);
    UI.SetEnabled(scriptitems, "Render nade on all map", enabled);
  }

  function grenade_helper() {
    menu_cb();
  }

function dis(a, b) {

  var ax = a[0]

  var ay = a[1]

  var az = a[2]

  var bx = b[0]

  var by = b[1]

  var bz = b[2]

  var dx = ax - bx

  var dy = ay - by

  var dz = az - bz

  return Math.sqrt( dx * dx + dy * dy + dz * dz )

}

function alp(c, a) {

  return [c[0], c[1], c[2], a]

}

test = 0
movement_autothrow = []
function draw() {

  weaponnames = {"flashbang": [43], "molotov": [46, 48], "smoke": [45], "nade": [44]}

  weapon = Entity.GetProp(Entity.GetWeapon(Entity.GetLocalPlayer()), "CEconEntity", "m_iItemDefinitionIndex")

  world  = World.GetMapName()

  color  = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Grenade Helper Color")

  var enabled = UI.GetValue(scriptitems, "Grenade Helper Enable");

  if (enabled)
  {
    if(!color) color = [255, 255, 255, 255]

    if([46, 48, 45, 43, 44].indexOf(weapon) < 0) return

    // ["", "", "",  ],
    // ["", ,[]],

    if(world == "de_cbble")
    {
      movement_autothrow = [
      ["Boost Corner1", 1,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 283.2433776855469 ],[ 450, 0, 283.2433776855469 ],[ 450, 0, 283.2433776855469 ],[ 450, 0, 270.74334716796875 ],[ 450, 0, 270.7424011230469 ],[ 450, 0, 270.7424011230469 ],[ 450, 0, 258.2424011230469 ],[ 450, 0, 258.2424011230469 ],[ 450, 0, 258.2424011230469 ],[ 450, 0, 258.2424011230469 ],[ 450, 0, 245.74240112304688 ]]],


      ]
    }
    if(world == "de_mirage")
    {
      movement_autothrow = [
      ["Under", 1,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ]]],
      ["Window", 10,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ]]],
      ["One-Way Ramp", 1,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 283.2433776855469 ],[ 450, 0, 283.2433776855469 ],[ 450, 0, 283.2433776855469 ]]],
      ]
    }
    if(world == "de_dust2")
    {
      movement_autothrow = [[]

      ]
    }
    if(world == "de_inferno")
    {
      movement_autothrow = [
      ["Pit" , 8,[[ 450.02211380004883, 0, 0 ],[ 450.65053939819336, 0, 0 ],[ 450.90695571899414, 0, 0 ],[ 450.53515625, 0, 0 ],[ 450.393945693969727, 0, 0 ],[ 450.5786018371582, 0, 0 ],[ 450.5311737060547, 0, 0 ],[ 450.2818603515625, 0, 0 ],[ 450.48575592041016, 0, 0 ],[ 450.93397521972656, 0, 0 ],[ 450.8269958496094, 0, 0 ],[ 450.3787612915039, 0, 0 ],[ 450.398193359375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ]]],
      ["Mid", 1,[[ 1.125562559813261, 0, 0 ],[ 1.1255620624870062, 0, 0 ],[ 1.12556217238307, 0, 0 ],[ 1.1255620624870062, 0, 0 ],[ 1.1255620624870062, 0, 0 ],[ 1.124624202027917, 0, 0 ],[ 1.12556217238307, 0, 0 ],[ 21.543969690799713, 0, 0 ],[ 36.43856465816498, 0, 0 ],[ 66.22589480876923, 0, 0 ],[ 81.11870193481445, 0, 0 ],[ 109.75620746612549, 0, 0 ],[ 122.38414692878723, 0, 0 ],[ 133.98439383506775, 0, 0 ],[ 133.9861981868744, 0, 0 ],[ 144.6437792778015, 0, 0 ],[ 163.4331409931183, 0, 0 ],[ 163.4331409931183, 0, 0 ],[ 179.29327392578125, 0, 0 ],[ 186.26964616775513, 0, 0 ],[ 192.68085193634033, 0, 0 ],[ 198.56950902938843, 0, 0 ],[ 192.68281269073486, 0, 0.00098419189453125 ],[ 208.95178318023682, 0, 0 ],[ 213.5128688812256, 0, 0 ],[ 221.56566047668457, 0, 0 ],[ 231.35248279571533, 0, 0 ],[ 234.10069465637207, 0, 0 ],[ 236.62394905090332, 0, 0 ],[ 238.94390296936035, 0, 0 ],[ 238.94390201568604, 0, 283.24334716796875 ],[ 238.94586277008057, 0, 283.2424011230469 ],[ 254.51007843017578, 0, 270.7424011230469 ]]],
      ["Fountain", 12,[[ 450.900423407554626, 0, 0 ],[ 450.73103332519531, 0, 0 ],[ 450.900423407554626, 0, 0 ],[ 450.3917555809021, 0, 0 ],[ 450.3917555809021, 0, 0 ],[ 450.3917555809021, 0, 0 ],[ 450.22231674194336, 0, 0 ],[ 450.08318901062012, 0, 0 ],[ 450.41434955596924, 0, 0 ],[ 450.15271377563477, 0, 0 ],[ 450.7157211303711, 0, 0 ],[ 450.5017385482788, 0, 0 ],[ 450.57388305664063, 0, 0 ],[ 450.9901828765869, 0, 0 ],[ 450.41479682922363, 0, 0 ],[ 450.06400680541992, 0, 0 ],[ 450.81544876098633, 0, 0 ],[ 450.09961318969727, 0, 0 ],[ 450.41479682922363, 0, 0 ],[ 450.81321144104004, 0, 270.7433776855469 ],[ 450.81321144104004, 0, 270.7433776855469 ],[ 450.18292808532715, 0, 245.74240112304688 ],[ 450.18292808532715, 0, 245.74240112304688 ]]],
      ["Graveyard",1,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 258.2433776855469 ],[ 450, 0, 233.24337768554688 ],[ 450, 0, 220.74337768554688 ],[ 450, 0, 195.74337768554688 ],[ 450, 0, 183.24337768554688 ],[ 450, 0, 158.24337768554688 ],[ 450, 0, 145.74337768554688 ]]],
      ["Box" , 1 ,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ]]],
      ["Box A" , 1,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 270.7433776855469 ],[ 450, 0, 258.2433776855469 ],[ 450, 0, 245.74240112304688 ],[ 450, 0, 220.74240112304688 ],[ 450, 0, 208.24240112304688 ],[ 450, 0, 195.74240112304688 ],[ 450, 0, 170.74240112304688 ]]],
      ["Archade", 12,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 283.2433776855469 ],[ 450, 0, 283.2433776855469 ],[ 450, 0, 270.7433776855469 ],[ 450, 0, 270.7433776855469 ],[ 450, 0, 245.74337768554688 ],[ 450, 0, 245.74337768554688 ],[ 450, 0, 233.2433624267578 ]]],
      ]

    }
    if(world == "de_nuke")
    {
      movement_autothrow = [[]

      ]
    }
    if(world == "de_overpass")
    {
      movement_autothrow = [[]

      ]
    }
    if(world == "de_train")
    {
      movement_autothrow = [[]

      ]
    }
    if(world == "de_cache")
    {
      movement_autothrow = [[]

      ]
    }
    if(world == "de_shortdust")
    {
      movement_autothrow = [
      ["Box", 4,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ]]],
      ["One-Way Car", 8,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ]]],

      ]
    }

    if(world == "de_cbble")        coords = [["Fountain", "Throw", "nade", 280.924866, -80.187576, -12.565859, -8.844892, -94.796295 ], ["Rock", "Throw", "molotov", 591.136230, -132.038406, 0.031250, -9.724643, -145.176041 ], ["Boost Corner", "Throw", "molotov", 47.968750, -16.031250, -23.177315, -31.504919, -124.580345 ], ["Boost Corner1", "Run + JumpThrow", "molotov", -94.259033, -239.954468, -31.968748, -18.909958, 91.239822 ],[ "One-way Long", "Crouch + Right click", "smoke", 272.031250, -291.031250, -63.906189, -30.971577, 17.418360 ],[ "B Long", "JumpThrow", "smoke", -1540.973389, -1226.978027, -25.199188, -50.672855, 41.294445 ],[ "Matrix", "Throw", "smoke", -1864.968750, -1611.968750, 96.093810, -11.221231, 136.023499 ],[ "B Long", "Throw", "smoke", -288.031250, 1020.970520, 128.093811, -51.547066, -53.167721 ],[ "Truck - front", "Throw", "smoke", -3295.975586, 79.968750, -29.906188, -36.680634, -52.524323 ],[ "Truck - right", "Throw", "smoke", -3168.031250, 79.968750, -29.906188, -47.158157, -65.556221 ],[ "Grass", "Throw", "smoke", -3167.270508, 584.685120, 0.093811, -55.144222, -61.434193 ],[ "Skyfall", "Throw", "smoke", -752.031250, -80.031250, 128.093811, 5.361639, -119.332336 ],[ "Hut - right", "Throw", "smoke", -155.970673, -16.010778, -31.906188, -50.869473, -69.637550 ],[ "Hut - left", "Throw", "smoke", -340.020111, -80.031250, -31.907466, -53.921837, -52.166801 ],[ "Sandwich", "Throw", "smoke", 47.968750, -16.031250, -23.114716, -81.378204, -89.289169 ],[ "Fountain", "Throw", "smoke", -418.514893, -95.749924, -32.562836, -75.323563, -61.343159 ],[ "B Door", "Throw", "smoke", -558.031250, -42.535999, 0.093811, -62.173512, -100.720726 ],[ "Balcony", "JumpThrow", "smoke", -2534.005371, -272.031250, -184.407272, -17.127037, -65.392319 ],[ "A Door", "Walk + Throw", "smoke", -3346.178711, 455.572449, 0.093811, -40.327240, -45.610413 ],[ "A Door", "Run + Throw", "smoke", -2989.968750, -944.371948, 32.093811, -12.160514, -4.402364 ],[ "Skyfall", "Throw", "flashbang", -780.031250, 111.931717, 128.093811, -4.768500, -92.183800 ],[ "Skyfall", "Throw", "flashbang", -590.995239, 434.631622, -0.906188, -17.854057, -108.593758 ],[ "Wood", "Throw", "flashbang", -2907.962402, -1976.022705, 143.093811, -8.300402, 94.145882 ],[ "Balcony", "Run + Throw", "molotov", -2989.968750, -944.036682, 32.093811, -15.675012, -32.634476 ],[ "Wood", "Throw", "molotov", -2907.962402, -1976.022705, 143.093811, -8.300402, 94.145882 ]]

    if(world == "de_mirage")       coords = [["One-Way Ramp", "Run + JumpThrow", "molotov", -34.403679, -1916.279053, -39.968750, 2.595078, 71.391121 ],["Car", "Throw", "molotov", -1182.872070, 679.580505, -79.968750, -9.450004, 174.482330 ],["Under", "Walk + Throw", "molotov", -34.409924, 822.263123, -135.968750, -8.459991, -150.967743 ],["One-Way Site", "Throw", "molotov", -538.933411, -1309.055664, -159.968750, -11.109911, -75.805000 ],["One-Way Box", "JumpThrow", "molotov", 663.968750, -1128.005005, -127.968750, 0.395009, -136.764679 ],["Window", "Run + Throw", "molotov", 334.825684, -149.313019, -165.968750, -17.259995, -152.143692 ],["Ramp", "Throw", "molotov", -1119.997314, -1527.024292, -156.076477,-17.370033, 0.035920],["Stairs", "Throw", "molotov", 499.251617, -1574.105713, -261.590881, -25.290028, 176.995941 ],[ "Window Mid", "JumpThrow", "smoke", 1423.964355, -248.026840, -167.906188, -25.723558, -170.518921 ],[ "Connector", "JumpThrow ", "smoke", 1135.968750, 647.996033, -261.322754, -34.518116, -140.291428 ],[ "Catwalk", "Throw", "smoke", 1423.997803, 71.985359, -112.840103, -32.653351, -163.530762 ],[ "One-way Mid", "Right click", "smoke", 369.960144, -720.522705, -162.412476, 35.376301, 124.135780 ],[ "Short", "Run + Throw", "smoke", 399.998444, 4.656666, -203.571350, -22.060497, -134.482208 ],[ "Window Mid", "Throw", "smoke", -624.243530, 615.992065, -78.914246, -51.595604, -109.421127 ],[ "Kitchen door", "Throw", "smoke", -2325.227783, 811.800659, -119.773079, -14.883981, -94.343178 ],[ "Short", "Throw", "smoke", -160.031250, 887.968750, -135.265563, -44.269619, -134.435654 ],[ "Kitchen window", "Throw", "smoke", -835.001404, 615.070190, -79.065735, -63.789238, -146.581238 ],[ "Short", "Throw", "smoke", 341.836212, -620.153992, -163.282486, -23.134167, 164.957458 ],[ "Connector + Jungle", "Throw", "smoke", 815.999512, -1457.235596, -108.906189, -26.797188, -174.613022 ],[ "Stairs", "Throw", "smoke", 1148.225586, -1183.999756, -205.509155, -41.168613, -165.354019 ],[ "Window Mid", "Run + Throw", "smoke", 1391.968750, -1011.236084, -167.906188, -42.603077, 172.188919 ],[ "Stairs", "JumpThrow", "smoke", -90.864479, -1418.000244, -115.906189, -31.895834, -62.464306 ],[ "Fireboxes", "JumpThrow", "smoke", 1391.968750, -930.076294, -167.906188, -21.037338, -151.204865 ],[ "One-way", "Throw", "smoke", 457.968750, -1711.996582, -240.886871, -10.477256, 133.144836 ],[ "Bombsite A", "Throw", "smoke", 815.998718, -1272.017944, -108.906189, -32.654591, -149.503601 ],[ "CT Spawn", "JumpThrow", "smoke", 1257.861938, -871.968750, -143.906188, -21.318205, -144.344666 ],[ "One-way", "Throw", "smoke", -1209.077515, -873.270447, -167.906188, -48.526600, 67.790833 ],[ "One-way", "Right click", "smoke", -964.056885, -2489.520264, -167.913391, -41.926632, -10.765607 ],[ "Ramp", "JumpThrow", "smoke", -2026.397583, -2029.968750, -299.060150, -15.312100, 12.573707 ],[ "One-way Kitchen", "Throw", "smoke", -2600.019287, 535.973022, -159.906188, -16.582365, -50.818062 ],[ "B Apps", "Throw", "flashbang", -2114.031250, 830.582214, -121.516441, -69.514664, 38.815456 ],[ "Connector", "Throw", "flashbang", -496.031250, -1309.031250, -159.906188, -65.176048, -10.261290 ],[ "Fireboxes", "Throw", "molotov", -31.432693, -1418.005371, -167.906188, -19.768339, -138.115036 ],[ "Tetris", "Throw", "molotov", -364.996552, -2173.031250, -176.139190, -26.004026, 44.655296 ]]

    if(world == "de_dust2")        coords = [[ "B Entrance", "Throw", "smoke", -1846.553223, 1232.569824, 32.496025, -8.613732, 118.773392 ],[ "CT Mid", "Throw", "smoke", -538.606567, 1382.031250, -111.957108, -35.360550, 53.845985 ],[ "Xbox", "Throw", "smoke", 229.130554, 112.497559, 5.215744, -40.624023, 108.758316 ],[ "Long Corner", "Throw", "smoke", 222.664124, -87.978210, 9.093811, -46.250572, 48.164497 ],[ "CT Spawn", "Run + Throw", "smoke", 860.031250, 790.031250, 3.900847, -23.414322, 43.616291 ],[ "Short (Close)", "Throw", "smoke", 489.998535, 1446.031250, 2.660506, -5.677320, 88.280685 ],[ "Long Gate", "Throw", "smoke", 1752.049561,2046.932739, 0.365111, -33.430305, -130.546280 ],[ "Lower Mid", "Throw", "smoke", -242.031250, 2278.887695, -119.931587, -32.687481, -123.649094 ],[ "Upper Tunnel", "Throw", "smoke", -985.452942, 2553.223877, 1.318862, -26.764244, -143.848251 ],[ "Bombsite B", "Throw", "flashbang", -1273.968750, 2575.968750, 67.353363, -42.043125, 1.218936 ],[ "Bombsite B", "Throw", "molotov", -760.031250, 2066.031250, -45.182931, -23.497030, 132.684860 ]]

    if(world == "de_inferno")      coords = [["Graveyard", "Run + JumpThrow", "molotov", 2017.503174, 1225.968750, 178.031250, -33.659977, -64.684898],["Mid", "Run + JumpThrow", "molotov", 2343.707520, 568.729492, 145.928940, -38.500111, -178.690613],["Fountain", "Run + JumpThrow", "molotov", 362.636536, 1726.205933, 128.376053, -39.875027, 95.339996],["Triple Box", "Throw", "molotov", 877.968750, 2393.092041, 150.504181, -13.529912, 168.994965 ],["Library", "JumpThrow", "molotov", 1314.032593, 797.901489, 153.586700, -26.509958, 10.154735 ] ,["Box", "Run + Throw", "molotov", 1364.515015, 277.541809, 135.426834, -17.755112, -48.144848],["Archade", "Run + JumpThrow", "molotov", 1287.723633, 434.031250, 125.995117, -36.354294, 55.140560],["Default", "JumpThrow", "molotov", 1961.373169, 1225.968750, 175.031250, -34.145012, -79.280289],["Stove", "Throw", "molotov", 698.401245, -267.968750, 105.031250, -21.614807, 32.599926 ],[ "Mid", "Run + Throw", "smoke", -857.968750, 449.902283, -31.604805, -44.401531, 1.405892 ], ["Pit", "Run + Throw", "molotov", 2105.090088, 1168.412354, 165.084000, -13.804811, -63.900101 ], [ "Box A", "Run + JumpThrow", "molotov", 2079.774658, 1225.998535, 180.093811, -37.500053, -89.940086], [ "Coffins", "Throw", "smoke", 338.871887, 1650.802856, 122.093810, -50.093639, 84.572739 ],[ "B Entrance", "Throw", "smoke", 460.464905, 1828.470825, 136.182693, -25.443281, 86.280159 ],[ "CT Spawn", "Throw", "smoke", 119.999580, 1587.966187, 113.307662, -34.798424, 56.149929 ],[ "Long (Deep)", "Run + Throw", "smoke", 274.681335, -224.627777, 88.093810, -41.052132, 31.799410 ],[ "Pit (Crack)", "Throw", "smoke", 704.160339, 11.968750, 88.797089, -52.337799, -2.135024 ],[ "Short (Deep)", "Throw", "smoke", 697.511902, -242.261810, 91.093810, -53.097946, 16.442726 ],[ "Library to A", "Throw", "smoke", 960.900330, 434.006409, 88.093810, -49.863846, 13.159984 ],[ "Pit to Hay", "Throw", "smoke", 726.031250, 220.962921,94.029999, -55.241890, -8.699924 ],[ "Long", "Throw", "smoke", 491.936829, -267.968750, 88.093810, -42.024933, 45.854645 ],[ "Bombsite B", "Throw", "smoke", 1971.687988, 2636.702393, 128.093811, -39.996227, 175.975357 ],[ "Connector", "Throw", "smoke", 726.031250, 288.680084, 96.093810, -43.560978, 41.450943 ],[ "One-way", "Throw", "smoke", 2631.968750, -16.031250, 84.093810, -5.692367, -179.128860 ],[ "Balcony", "Throw", "smoke", 1913.227295, 1225.968750, 174.093811, -46.497322, -87.005005 ],[ "B Entrance", "Throw", "flashbang", 498.968750, 2444.031250, 160.093811, 1.748943, 142.807571 ],[ "Banana", "Throw", "flashbang", 610.968750, 1873.031250, 134.252365, -44.186985, -0.872295 ],[ "Short", "Walk + Throw", "flashbang", 1275.968750, -111.968750, 256.093811, 9.454458, 116.691383 ],[ "Bombsite A", "Crouch + Throw", "flashbang", 1329.031250, -365.989349, 256.093811, -29.733957, -22.831499 ],[ "B Plant", "JumpThrow", "molotov", 929.176636, 3295.995117, 144.093811, -45.887463, -131.960571 ],[ "3s", "Throw", "molotov", 999.982422, 1878.530640, 149.329788, -26.647552, 141.132538 ],[ "Coffins", "Throw", "molotov", 664.968750, 1873.031250, 168.093811, -24.272781, 96.641022 ]]

    if(world == "de_nuke")         coords = [[ "Hangar", "Throw", "smoke", -164.092941, -1954.733765, -415.916107, -13.613587, 1.278547 ],[ "Red container", "Throw", "smoke", -533.003357, -833.215759, -193.634827, -30.904673, -43.816589 ],[ "Between containers", "Run + Throw", "smoke", -423.996399, -1753.002075, -415.914856, -2.624159, -50.804165 ],[ "T Outside", "JumpThrow", "smoke", 1664.031250, -280.002014, -351.906250, -25.048063, -135.212463 ]]

    if(world == "de_overpass")     coords = [["Stairs", "Run + JumpThrow", "molotov", -3750.460938, -250.358826, 520.609863, 5.050490, 35.776577 ],["Barrels", "Run + Throw", "molotov", -430.186157, -1551.968750, 150.031250, -16.164569, 101.556863 ],["Heaven", "Walk + JumpThrow", "molotov", -856.031311, -639.968750, 105.031250, 4.120225, 128.027786 ],["Barrels", "Throw", "molotov", -1580.517578, -710.171814, 135.334778, -14.950030, 60.188404 ],["Water", "Throw", "molotov", -1276.541260, -964.551147, 10.933800, -23.484703, 82.194580],[ "Toilet entrance", "Run + Throw", "smoke", -730.031250, -2225.143799, 240.093811, -51.612926, 149.045975 ],[ "B Bridge", "Throw", "smoke", -617.486389, -1509.028809, 144.093811, -48.988934, 113.071342 ],[ "B Center", "Throw", "smoke", -525.982300, -1551.984375, 144.093811, -43.807911, 110.431473 ],[ "Barrels to Pillar", "Throw", "smoke", -613.014099, -1082.017212, 42.160416, -29.337307, 99.340714 ],[ "B Center", "Throw", "smoke", -1567.968750, -1087.984619, 0.093811, -30.278185, 74.646019 ],[ "Monster to Pillar", "Throw", "smoke", -1645.986938, -1087.982300, 96.093810, -20.015800, 55.835869 ],[ "Heaven", "Throw", "smoke", -1559.968750, -728.785583, 52.574355, -33.446209, 96.293686 ],[ "B Bridge", "Throw", "smoke", -1559.999390, -361.285339, 32.421722, -43.693123, 21.193089 ],[ "Heaven", "Throw", "smoke", -2174.002441, -1151.968750, 398.197235, -26.368107, 71.543701 ],[ "Long to Boxes", "Throw", "smoke", -2025.534058, -865.001343, 395.427856, -28.313963, 114.564102 ],[ "Bank", "Throw", "smoke", -2162.000488, -519.968750, 391.460358, -29.749702, 100.836487 ],[ "Truck to Bank", "Throw", "smoke", -3612.545654, -177.626740, 512.791992, -40.392601, 51.259613 ],[ "Boxes to Truck", "Throw", "smoke", -3540.031250, -381.968750, 528.080200, -14.256992, 41.849758 ],[ "Truck", "Throw", "smoke", -2351.968750, -815.968750, 391.089905, -34.683971, 81.500427 ],[ "Trash", "Throw", "smoke", -2351.968750, -414.031250, 388.562317, -60.588089, 73.825958 ],[ "Trash", "Throw", "smoke", -3383.369629, 35.247875, 516.906006, -18.035419, 31.699080 ],[ "Long", "Crouch + Throw", "smoke", -1993.398926, 537.698242, 475.093810, -28.677984, -169.596695 ],[ "Monster", "Throw", "smoke", -1926.860962, 1311.968750, 355.030579, -46.200985, -40.010532 ],[ "One-way", "Throw", "smoke", -2191.968750, 1311.968750, 356.093811, -8.861760, -55.390415 ],[ "One-way", "Right click", "smoke", -1826.375610, 629.178894, 256.093811, 26.580435, -17.457275 ],[ "One-way", "Throw", "smoke", -2012.968750, -1231.968750, 240.093811, 16.218643, 63.144173 ],[ "Short B", "Throw", "smoke", -2115.841309, 992.920288, 480.093810, -22.936214, -57.690578 ],[ "Bombsite A", "Throw", "flashbang", -2604.023926, 1102.215088, 480.093810, -24.090078, 70.938210 ],[ "Barrels", "Throw", "molotov", -1580.023315, -480.767883, 136.093811, -20.147602, 53.764153 ],[ "Bombsite B", "Throw", "molotov", -1399.968750, -139.998840, 0.093811, -15.444187, 63.084324 ]]

    if(world == "de_train")        coords = [["B site", "Throw", "molotov", -1085.563477, -954.344543, -55.968750, -2.244908, -11.982774 ],["Default", "Walk + Throw", "molotov", 1054.867188, 426.185638, -215.982330, -14.129807, -158.603027 ],["Heaven", "Throw", "molotov", 132.170197, 499.088257, -219.968750, -30.679949, -56.869923 ],["Site", "Run + Throw", "molotov", -338.848297, 307.854095, -215.968750, -29.580017, -36.570026 ],[ "B Upper", "Throw", "smoke", -1055.968750, -1607.969116, -151.906188, -9.076089, -21.028521 ],[ "B Lower", "Throw", "smoke", -1159.978027, -1088.112549, -95.909508, -9.122071, 13.307947 ],[ "Blue to Bombsite", "Run + Throw", "smoke", -1155.979004, -1301.504395, -95.906189, -15.857571, 38.882820 ],[ "Connector", "Run + Throw", "smoke", -1159.999634, -1048.001709, -95.906189, -11.023086, 5.091055 ],[ "Ivy (right)", "Throw", "smoke", 1388.426270, 1446.000488, -223.906189, -6.188282, -95.524574 ],[ "Ivy (left)", "Run + Throw", "smoke", 1535.968750, 1775.968750, -223.906189, -9.818258, -112.486588 ],["Bombsite A to Connector", "Both buttons", "smoke", -655.968750, -399.892731, 16.093811, -46.002502, 10.890710 ],[ "Blue to Red train", "Throw", "smoke", -645.479370, 1697.721924, -209.906189, -41.564690, -65.086685 ],[ "Electric box", "Throw", "smoke", -481.865631, 1725.011597, -209.906189, -45.937080, -78.790627 ],[ "Blue train (Left)", "Throw", "smoke", -555.031250, 1262.031250, -212.532227, -68.096550, -50.974125 ],[ "Green to Red train", "Throw", "smoke", -838.162292, 1268.024414, -222.906189, -37.604507, -42.064575 ],[ "Ivy to Green train", "Throw", "smoke", -640.027832, -583.969666, 16.093811, -44.699406, 32.218452 ],[ "Bombsite A to Red train", "Throw", "smoke", -453.358459, 1286.284668, -86.490753, -25.130558, -58.731426 ],[ "Main", "Throw", "smoke", 1021.096924, -254.988556, -215.906189, -38.494926, 154.562332 ],[ "Bombsite A", "Run + Throw", "flashbang", 400.031250, -420.031250, -211.777573, -28.859020, -89.674629 ],[ "Blue train (Back)", "Run + Throw", "molotov", -790.028748, 375.928741, -215.906189, -11.270589, 27.332729 ]]

    if(world == "de_cache")        coords = [[ "Ventsroom", "Throw", "smoke", 837.744141, -872.015564, 1614.093750, -15.362073, 177.850555 ],[ "Headshot", "Throw", "smoke", 960.031250, -1463.968750, 1644.093750, -26.400745, 162.851730 ],[ "B Center", "Throw", "smoke", 827.971313, -1463.968750, 1614.093750, -21.995483, 162.191437 ],[ "Mid Center", "Throw", "smoke", 1711.974121, 463.987732, 1614.093750, -10.675973, -167.299591 ],[ "Connector", "Throw", "smoke", 1160.711182, 715.841675, 1613.093750, -31.334572, -153.088974 ],[ "White box", "Throw", "smoke", 2156.583740, -182.968750, 1613.483887, -22.077839, 161.943924 ],[ "One-way", "Throw", "smoke", 1037.031250, 513.031250, 1613.550293, -49.137814, 104.639671 ],[ "Mid (Right side)", "Throw", "smoke", 1711.968750, -71.968750, 1614.093750, -10.560504, 161.185349 ],[ "Bombsite A", "Crouch + Throw", "smoke", 154.413376, 2096.080566, 1688.093750, 9.370919, -29.337667 ],[ "Short", "Run + Throw", "smoke", 139.031250, 2197.968750, 1688.093750, -6.040052, -60.836231 ],[ "Bombsite A", "Throw", "smoke", 1319.968750, 1520.395508, 1701.093750, -57.767025, 161.424835 ],[ "Forklift", "Throw", "smoke", 1230.754150, 1612.968750, 1701.965088, -74.514435, -173.894516 ],[ "Main", "Throw", "smoke", -782.198059, 1110.000366, 1689.439697, -9.703021, 24.963852 ],[ "Main", "Throw", "smoke", -429.968750, 2244.968750, 1687.093750, -66.017174, -31.140173 ],[ "Main", "Throw", "smoke", -50.012558, 2261.968750, 1687.093750, -18.612713, -64.612831 ],[ "Vents", "Run + Throw", "smoke", -996.979553, 1440.231689, 1691.182373, -33.181599, -46.326721 ],[ "Bombsite A", "Throw", "flashbang", -358.534668, 2147.728027, 1687.093750, -17.540194, 2.039984 ],[ "Bombsite A", "Throw", "flashbang", 89.984558, 2244.983398, 1687.093750, -71.181236, -93.482628 ],[ "Bombsite B", "Both buttons", "flashbang", -633.975891, -379.968750, 1620.093750, -41.629662, -58.865555 ],[ "Mid", "Crouch + Throw", "flashbang", 114.968750, -107.322037, 1613.718506, -16.913092, -84.200432 ],[ "Mid", "Run + Throw", "flashbang", 1736.970581, 308.968750, 1614.093750, -9.157659, 162.762833 ],[ "Bombsite B", "Throw", "flashbang", 879.802185, -872.031250, 1614.093750, -14.157107, 177.892853 ],[ "Bombsite B", "Throw", "molotov", 907.649597, -1228.031250, 1614.093750, -23.876366, -179.771790 ],[ "White box", "Throw", "molotov", 605.005188, -149.968750, 1689.035889, -6.584105, 133.537994 ],[ "Boost", "Throw", "molotov", 11.759085, -148.994904, 1613.093750, -32.654572, 38.675369 ]]

    if(world == "de_shortdust")    coords = [["Box", "Run + Throw", "molotov", -309.406403, 1933.314819, 32.031250, -5.444888, -45.821072 ],["Car", "Throw", "molotov", -893.477783, 956.593933, 35.031250, -11.485014, -34.438034 ],["One-Way CT", "Throw", "molotov", -450.279297, 780.684265, 40.753510, -19.734886, -50.160259 ],["One-Way Car", "Run + Throw", "molotov", -1279.968750, 1039.968750, -170.329315, -27.609568, -18.734381 ]]


    var font1 = Render.AddFont("Verdana", 10, 600)

    var font2 = Render.AddFont("Verdana", 12, 600)

    var font3 = Render.AddFont("Verdana", 12, 500)

    var scsiz = Render.GetScreenSize()
    var scrmid = [Render.GetScreenSize()[0] / 2, Render.GetScreenSize()[1] / 2]

    var coordslenght = 0

    color_circle = [0,0,0,0]

    while(coords[coordslenght]) {

      coordslenght++

    }
    // if(UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "Automatic Throw Hotkey") && UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Automatic Throw"))
    // {
    //   get_velocity()
    // }
    for(var i = 0; i < coordslenght; i++) {

      crd = coords[i]

      if(weaponnames[crd[2]].indexOf(weapon) >= 0) {

        cds = Render.WorldToScreen([crd[3], crd[4], crd[5]])

        var distance = dis([crd[3], crd[4], crd[5]], Entity.GetRenderOrigin(Entity.GetLocalPlayer()))
        var nadeallmap = UI.GetValue(scriptitems,"Render nade on all map");

        if(nadeallmap)
        {
          if(distance >= 7000 - 255 && distance <= 7000) {
           Render.StringCustom(cds[0], cds[1], 1, crd[0], alp(color, Math.round(Math.min(255, 7000 - distance))), font1)
           continue;
          }
          if(distance < 7000 - 255 && distance >= 10) {
            Render.StringCustom(cds[0], cds[1], 1, crd[0], alp(color, 255), font1)
          }
        }else
        {
          if(distance >= 800 - 255 && distance <= 800) {
           Render.StringCustom(cds[0], cds[1], 1, crd[0], alp(color, Math.round(Math.min(255, 800 - distance))), font1)
           continue;
          }
          if(distance < 800 - 255 && distance >= 10) {
           Render.StringCustom(cds[0], cds[1], 1, crd[0], alp(color, 255), font1)
          }
        }

        if(dis([crd[3], crd[4], crd[5]], Entity.GetRenderOrigin(Entity.GetLocalPlayer())) < 10) {

          Render.StringCustom(cds[0], cds[1], 1, crd[0], alp(color, 255), font2)


          vec = atv(crd[6], crd[7])

          wec = Render.WorldToScreen([crd[3] + vec[0] * 200, crd[4] + vec[1] * 200, crd[5] + 64 + vec[2] * 200])


          Render.StringCustom(wec[0] + 14, wec[1] - 9, 0, crd[1], alp(color, 255), font3)

          Render.Line(scsiz[0] / 2, scsiz[1] / 2, wec[0], wec[1], alp(color, 255))


          if(( Math.abs(wec[0] - scrmid[0]) + Math.abs(wec[1] - scrmid[1]) ) <= 5)
          {
            color_circle = [0,255,0,255]
          }
          else {
            color_circle = [255,0,0,255]
          }

          Render.FilledCircle(wec[0], wec[1], 5, (color_circle));

          Render.Circle(wec[0], wec[1], 5, alp(color, 255))
        }
      }
    }
  }
}

coords_auto_throw = []
tickcount = 0
running  = false;

function on_create_move() {

  weaponnames = {"flashbang": [43], "molotov": [46, 48], "smoke": [45], "nade": [44]}

  weapon = Entity.GetProp(Entity.GetWeapon(Entity.GetLocalPlayer()), "CEconEntity", "m_iItemDefinitionIndex")

  world  = World.GetMapName()

  color  = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Grenade Helper Color")

  var enabled = UI.GetValue(scriptitems, "Grenade Helper Enable");

  if (enabled)
  {
    if(!color) color = [255, 255, 255, 255]

    if([46, 48, 45, 43, 44].indexOf(weapon) < 0) return

    // ["", "", "",  ],
    // ["", ,[]],

    if(world == "de_cbble")
    {
      movement_autothrow = [
      ["Boost Corner1", 1,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 283.2433776855469 ],[ 450, 0, 283.2433776855469 ],[ 450, 0, 283.2433776855469 ],[ 450, 0, 270.74334716796875 ],[ 450, 0, 270.7424011230469 ],[ 450, 0, 270.7424011230469 ],[ 450, 0, 258.2424011230469 ],[ 450, 0, 258.2424011230469 ],[ 450, 0, 258.2424011230469 ],[ 450, 0, 258.2424011230469 ],[ 450, 0, 245.74240112304688 ]]],


      ]
    }
    if(world == "de_mirage")
    {
      movement_autothrow = [
      ["Under", 1,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ]]],
      ["Window", 10,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ]]],
      ["One-Way Ramp", 1,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 283.2433776855469 ],[ 450, 0, 283.2433776855469 ],[ 450, 0, 283.2433776855469 ]]],
      ]
    }
    if(world == "de_dust2")
    {
      movement_autothrow = [[]

      ]
    }
    if(world == "de_inferno")
    {
      movement_autothrow = [
      ["Pit" , 8,[[ 450.02211380004883, 0, 0 ],[ 450.65053939819336, 0, 0 ],[ 450.90695571899414, 0, 0 ],[ 450.53515625, 0, 0 ],[ 450.393945693969727, 0, 0 ],[ 450.5786018371582, 0, 0 ],[ 450.5311737060547, 0, 0 ],[ 450.2818603515625, 0, 0 ],[ 450.48575592041016, 0, 0 ],[ 450.93397521972656, 0, 0 ],[ 450.8269958496094, 0, 0 ],[ 450.3787612915039, 0, 0 ],[ 450.398193359375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ],[ 450.009521484375, 0, 0 ]]],
      ["Mid", 1,[[ 1.125562559813261, 0, 0 ],[ 1.1255620624870062, 0, 0 ],[ 1.12556217238307, 0, 0 ],[ 1.1255620624870062, 0, 0 ],[ 1.1255620624870062, 0, 0 ],[ 1.124624202027917, 0, 0 ],[ 1.12556217238307, 0, 0 ],[ 21.543969690799713, 0, 0 ],[ 36.43856465816498, 0, 0 ],[ 66.22589480876923, 0, 0 ],[ 81.11870193481445, 0, 0 ],[ 109.75620746612549, 0, 0 ],[ 122.38414692878723, 0, 0 ],[ 133.98439383506775, 0, 0 ],[ 133.9861981868744, 0, 0 ],[ 144.6437792778015, 0, 0 ],[ 163.4331409931183, 0, 0 ],[ 163.4331409931183, 0, 0 ],[ 179.29327392578125, 0, 0 ],[ 186.26964616775513, 0, 0 ],[ 192.68085193634033, 0, 0 ],[ 198.56950902938843, 0, 0 ],[ 192.68281269073486, 0, 0.00098419189453125 ],[ 208.95178318023682, 0, 0 ],[ 213.5128688812256, 0, 0 ],[ 221.56566047668457, 0, 0 ],[ 231.35248279571533, 0, 0 ],[ 234.10069465637207, 0, 0 ],[ 236.62394905090332, 0, 0 ],[ 238.94390296936035, 0, 0 ],[ 238.94390201568604, 0, 283.24334716796875 ],[ 238.94586277008057, 0, 283.2424011230469 ],[ 254.51007843017578, 0, 270.7424011230469 ]]],
      ["Fountain", 12,[[ 450.900423407554626, 0, 0 ],[ 450.73103332519531, 0, 0 ],[ 450.900423407554626, 0, 0 ],[ 450.3917555809021, 0, 0 ],[ 450.3917555809021, 0, 0 ],[ 450.3917555809021, 0, 0 ],[ 450.22231674194336, 0, 0 ],[ 450.08318901062012, 0, 0 ],[ 450.41434955596924, 0, 0 ],[ 450.15271377563477, 0, 0 ],[ 450.7157211303711, 0, 0 ],[ 450.5017385482788, 0, 0 ],[ 450.57388305664063, 0, 0 ],[ 450.9901828765869, 0, 0 ],[ 450.41479682922363, 0, 0 ],[ 450.06400680541992, 0, 0 ],[ 450.81544876098633, 0, 0 ],[ 450.09961318969727, 0, 0 ],[ 450.41479682922363, 0, 0 ],[ 450.81321144104004, 0, 270.7433776855469 ],[ 450.81321144104004, 0, 270.7433776855469 ],[ 450.18292808532715, 0, 245.74240112304688 ],[ 450.18292808532715, 0, 245.74240112304688 ]]],
      ["Graveyard",1,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 258.2433776855469 ],[ 450, 0, 233.24337768554688 ],[ 450, 0, 220.74337768554688 ],[ 450, 0, 195.74337768554688 ],[ 450, 0, 183.24337768554688 ],[ 450, 0, 158.24337768554688 ],[ 450, 0, 145.74337768554688 ]]],
      ["Box" , 1 ,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ]]],
      ["Box A" , 1,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 270.7433776855469 ],[ 450, 0, 258.2433776855469 ],[ 450, 0, 245.74240112304688 ],[ 450, 0, 220.74240112304688 ],[ 450, 0, 208.24240112304688 ],[ 450, 0, 195.74240112304688 ],[ 450, 0, 170.74240112304688 ]]],
      ["Archade", 12,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 283.2433776855469 ],[ 450, 0, 283.2433776855469 ],[ 450, 0, 270.7433776855469 ],[ 450, 0, 270.7433776855469 ],[ 450, 0, 245.74337768554688 ],[ 450, 0, 245.74337768554688 ],[ 450, 0, 233.2433624267578 ]]],
      ]

    }
    if(world == "de_nuke")
    {
      movement_autothrow = [[]

      ]
    }
    if(world == "de_overpass")
    {
      movement_autothrow = [[]

      ]
    }
    if(world == "de_train")
    {
      movement_autothrow = [[]

      ]
    }
    if(world == "de_cache")
    {
      movement_autothrow = [[]

      ]
    }
    if(world == "de_shortdust")
    {
      movement_autothrow = [
      ["Box", 4,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ]]],
      ["One-Way Car", 8,[[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ],[ 450, 0, 0 ]]],

      ]
    }

    if(world == "de_cbble")        coords = [["Fountain", "Throw", "nade", 280.924866, -80.187576, -12.565859, -8.844892, -94.796295 ], ["Rock", "Throw", "molotov", 591.136230, -132.038406, 0.031250, -9.724643, -145.176041 ], ["Boost Corner", "Throw", "molotov", 47.968750, -16.031250, -23.177315, -31.504919, -124.580345 ], ["Boost Corner1", "Run + JumpThrow", "molotov", -94.259033, -239.954468, -31.968748, -18.909958, 91.239822 ],[ "One-way Long", "Crouch + Right click", "smoke", 272.031250, -291.031250, -63.906189, -30.971577, 17.418360 ],[ "B Long", "JumpThrow", "smoke", -1540.973389, -1226.978027, -25.199188, -50.672855, 41.294445 ],[ "Matrix", "Throw", "smoke", -1864.968750, -1611.968750, 96.093810, -11.221231, 136.023499 ],[ "B Long", "Throw", "smoke", -288.031250, 1020.970520, 128.093811, -51.547066, -53.167721 ],[ "Truck - front", "Throw", "smoke", -3295.975586, 79.968750, -29.906188, -36.680634, -52.524323 ],[ "Truck - right", "Throw", "smoke", -3168.031250, 79.968750, -29.906188, -47.158157, -65.556221 ],[ "Grass", "Throw", "smoke", -3167.270508, 584.685120, 0.093811, -55.144222, -61.434193 ],[ "Skyfall", "Throw", "smoke", -752.031250, -80.031250, 128.093811, 5.361639, -119.332336 ],[ "Hut - right", "Throw", "smoke", -155.970673, -16.010778, -31.906188, -50.869473, -69.637550 ],[ "Hut - left", "Throw", "smoke", -340.020111, -80.031250, -31.907466, -53.921837, -52.166801 ],[ "Sandwich", "Throw", "smoke", 47.968750, -16.031250, -23.114716, -81.378204, -89.289169 ],[ "Fountain", "Throw", "smoke", -418.514893, -95.749924, -32.562836, -75.323563, -61.343159 ],[ "B Door", "Throw", "smoke", -558.031250, -42.535999, 0.093811, -62.173512, -100.720726 ],[ "Balcony", "JumpThrow", "smoke", -2534.005371, -272.031250, -184.407272, -17.127037, -65.392319 ],[ "A Door", "Walk + Throw", "smoke", -3346.178711, 455.572449, 0.093811, -40.327240, -45.610413 ],[ "A Door", "Run + Throw", "smoke", -2989.968750, -944.371948, 32.093811, -12.160514, -4.402364 ],[ "Skyfall", "Throw", "flashbang", -780.031250, 111.931717, 128.093811, -4.768500, -92.183800 ],[ "Skyfall", "Throw", "flashbang", -590.995239, 434.631622, -0.906188, -17.854057, -108.593758 ],[ "Wood", "Throw", "flashbang", -2907.962402, -1976.022705, 143.093811, -8.300402, 94.145882 ],[ "Balcony", "Run + Throw", "molotov", -2989.968750, -944.036682, 32.093811, -15.675012, -32.634476 ],[ "Wood", "Throw", "molotov", -2907.962402, -1976.022705, 143.093811, -8.300402, 94.145882 ]]

    if(world == "de_mirage")       coords = [["One-Way Ramp", "Run + JumpThrow", "molotov", -34.403679, -1916.279053, -39.968750, 2.595078, 71.391121 ],["Car", "Throw", "molotov", -1182.872070, 679.580505, -79.968750, -9.450004, 174.482330 ],["Under", "Walk + Throw", "molotov", -34.409924, 822.263123, -135.968750, -8.459991, -150.967743 ],["One-Way Site", "Throw", "molotov", -538.933411, -1309.055664, -159.968750, -11.109911, -75.805000 ],["One-Way Box", "JumpThrow", "molotov", 663.968750, -1128.005005, -127.968750, 0.395009, -136.764679 ],["Window", "Run + Throw", "molotov", 334.825684, -149.313019, -165.968750, -17.259995, -152.143692 ],["Ramp", "Throw", "molotov", -1119.997314, -1527.024292, -156.076477,-17.370033, 0.035920],["Stairs", "Throw", "molotov", 499.251617, -1574.105713, -261.590881, -25.290028, 176.995941 ],[ "Window Mid", "JumpThrow", "smoke", 1423.964355, -248.026840, -167.906188, -25.723558, -170.518921 ],[ "Connector", "JumpThrow ", "smoke", 1135.968750, 647.996033, -261.322754, -34.518116, -140.291428 ],[ "Catwalk", "Throw", "smoke", 1423.997803, 71.985359, -112.840103, -32.653351, -163.530762 ],[ "One-way Mid", "Right click", "smoke", 369.960144, -720.522705, -162.412476, 35.376301, 124.135780 ],[ "Short", "Run + Throw", "smoke", 399.998444, 4.656666, -203.571350, -22.060497, -134.482208 ],[ "Window Mid", "Throw", "smoke", -624.243530, 615.992065, -78.914246, -51.595604, -109.421127 ],[ "Kitchen door", "Throw", "smoke", -2325.227783, 811.800659, -119.773079, -14.883981, -94.343178 ],[ "Short", "Throw", "smoke", -160.031250, 887.968750, -135.265563, -44.269619, -134.435654 ],[ "Kitchen window", "Throw", "smoke", -835.001404, 615.070190, -79.065735, -63.789238, -146.581238 ],[ "Short", "Throw", "smoke", 341.836212, -620.153992, -163.282486, -23.134167, 164.957458 ],[ "Connector + Jungle", "Throw", "smoke", 815.999512, -1457.235596, -108.906189, -26.797188, -174.613022 ],[ "Stairs", "Throw", "smoke", 1148.225586, -1183.999756, -205.509155, -41.168613, -165.354019 ],[ "Window Mid", "Run + Throw", "smoke", 1391.968750, -1011.236084, -167.906188, -42.603077, 172.188919 ],[ "Stairs", "JumpThrow", "smoke", -90.864479, -1418.000244, -115.906189, -31.895834, -62.464306 ],[ "Fireboxes", "JumpThrow", "smoke", 1391.968750, -930.076294, -167.906188, -21.037338, -151.204865 ],[ "One-way", "Throw", "smoke", 457.968750, -1711.996582, -240.886871, -10.477256, 133.144836 ],[ "Bombsite A", "Throw", "smoke", 815.998718, -1272.017944, -108.906189, -32.654591, -149.503601 ],[ "CT Spawn", "JumpThrow", "smoke", 1257.861938, -871.968750, -143.906188, -21.318205, -144.344666 ],[ "One-way", "Throw", "smoke", -1209.077515, -873.270447, -167.906188, -48.526600, 67.790833 ],[ "One-way", "Right click", "smoke", -964.056885, -2489.520264, -167.913391, -41.926632, -10.765607 ],[ "Ramp", "JumpThrow", "smoke", -2026.397583, -2029.968750, -299.060150, -15.312100, 12.573707 ],[ "One-way Kitchen", "Throw", "smoke", -2600.019287, 535.973022, -159.906188, -16.582365, -50.818062 ],[ "B Apps", "Throw", "flashbang", -2114.031250, 830.582214, -121.516441, -69.514664, 38.815456 ],[ "Connector", "Throw", "flashbang", -496.031250, -1309.031250, -159.906188, -65.176048, -10.261290 ],[ "Fireboxes", "Throw", "molotov", -31.432693, -1418.005371, -167.906188, -19.768339, -138.115036 ],[ "Tetris", "Throw", "molotov", -364.996552, -2173.031250, -176.139190, -26.004026, 44.655296 ]]

    if(world == "de_dust2")        coords = [[ "B Entrance", "Throw", "smoke", -1846.553223, 1232.569824, 32.496025, -8.613732, 118.773392 ],[ "CT Mid", "Throw", "smoke", -538.606567, 1382.031250, -111.957108, -35.360550, 53.845985 ],[ "Xbox", "Throw", "smoke", 229.130554, 112.497559, 5.215744, -40.624023, 108.758316 ],[ "Long Corner", "Throw", "smoke", 222.664124, -87.978210, 9.093811, -46.250572, 48.164497 ],[ "CT Spawn", "Run + Throw", "smoke", 860.031250, 790.031250, 3.900847, -23.414322, 43.616291 ],[ "Short (Close)", "Throw", "smoke", 489.998535, 1446.031250, 2.660506, -5.677320, 88.280685 ],[ "Long Gate", "Throw", "smoke", 1752.049561,2046.932739, 0.365111, -33.430305, -130.546280 ],[ "Lower Mid", "Throw", "smoke", -242.031250, 2278.887695, -119.931587, -32.687481, -123.649094 ],[ "Upper Tunnel", "Throw", "smoke", -985.452942, 2553.223877, 1.318862, -26.764244, -143.848251 ],[ "Bombsite B", "Throw", "flashbang", -1273.968750, 2575.968750, 67.353363, -42.043125, 1.218936 ],[ "Bombsite B", "Throw", "molotov", -760.031250, 2066.031250, -45.182931, -23.497030, 132.684860 ]]

    if(world == "de_inferno")      coords = [["Graveyard", "Run + JumpThrow", "molotov", 2017.503174, 1225.968750, 178.031250, -33.659977, -64.684898],["Mid", "Run + JumpThrow", "molotov", 2343.707520, 568.729492, 145.928940, -38.500111, -178.690613],["Fountain", "Run + JumpThrow", "molotov", 362.636536, 1726.205933, 128.376053, -39.875027, 95.339996],["Triple Box", "Throw", "molotov", 877.968750, 2393.092041, 150.504181, -13.529912, 168.994965 ],["Library", "JumpThrow", "molotov", 1314.032593, 797.901489, 153.586700, -26.509958, 10.154735 ] ,["Box", "Run + Throw", "molotov", 1364.515015, 277.541809, 135.426834, -17.755112, -48.144848],["Archade", "Run + JumpThrow", "molotov", 1287.723633, 434.031250, 125.995117, -36.354294, 55.140560],["Default", "JumpThrow", "molotov", 1961.373169, 1225.968750, 175.031250, -34.145012, -79.280289],["Stove", "Throw", "molotov", 698.401245, -267.968750, 105.031250, -21.614807, 32.599926 ],[ "Mid", "Run + Throw", "smoke", -857.968750, 449.902283, -31.604805, -44.401531, 1.405892 ], ["Pit", "Run + Throw", "molotov", 2105.090088, 1168.412354, 165.084000, -13.804811, -63.900101 ], [ "Box A", "Run + JumpThrow", "molotov", 2079.774658, 1225.998535, 180.093811, -37.500053, -89.940086], [ "Coffins", "Throw", "smoke", 338.871887, 1650.802856, 122.093810, -50.093639, 84.572739 ],[ "B Entrance", "Throw", "smoke", 460.464905, 1828.470825, 136.182693, -25.443281, 86.280159 ],[ "CT Spawn", "Throw", "smoke", 119.999580, 1587.966187, 113.307662, -34.798424, 56.149929 ],[ "Long (Deep)", "Run + Throw", "smoke", 274.681335, -224.627777, 88.093810, -41.052132, 31.799410 ],[ "Pit (Crack)", "Throw", "smoke", 704.160339, 11.968750, 88.797089, -52.337799, -2.135024 ],[ "Short (Deep)", "Throw", "smoke", 697.511902, -242.261810, 91.093810, -53.097946, 16.442726 ],[ "Library to A", "Throw", "smoke", 960.900330, 434.006409, 88.093810, -49.863846, 13.159984 ],[ "Pit to Hay", "Throw", "smoke", 726.031250, 220.962921,94.029999, -55.241890, -8.699924 ],[ "Long", "Throw", "smoke", 491.936829, -267.968750, 88.093810, -42.024933, 45.854645 ],[ "Bombsite B", "Throw", "smoke", 1971.687988, 2636.702393, 128.093811, -39.996227, 175.975357 ],[ "Connector", "Throw", "smoke", 726.031250, 288.680084, 96.093810, -43.560978, 41.450943 ],[ "One-way", "Throw", "smoke", 2631.968750, -16.031250, 84.093810, -5.692367, -179.128860 ],[ "Balcony", "Throw", "smoke", 1913.227295, 1225.968750, 174.093811, -46.497322, -87.005005 ],[ "B Entrance", "Throw", "flashbang", 498.968750, 2444.031250, 160.093811, 1.748943, 142.807571 ],[ "Banana", "Throw", "flashbang", 610.968750, 1873.031250, 134.252365, -44.186985, -0.872295 ],[ "Short", "Walk + Throw", "flashbang", 1275.968750, -111.968750, 256.093811, 9.454458, 116.691383 ],[ "Bombsite A", "Crouch + Throw", "flashbang", 1329.031250, -365.989349, 256.093811, -29.733957, -22.831499 ],[ "B Plant", "JumpThrow", "molotov", 929.176636, 3295.995117, 144.093811, -45.887463, -131.960571 ],[ "3s", "Throw", "molotov", 999.982422, 1878.530640, 149.329788, -26.647552, 141.132538 ],[ "Coffins", "Throw", "molotov", 664.968750, 1873.031250, 168.093811, -24.272781, 96.641022 ]]

    if(world == "de_nuke")         coords = [[ "Hangar", "Throw", "smoke", -164.092941, -1954.733765, -415.916107, -13.613587, 1.278547 ],[ "Red container", "Throw", "smoke", -533.003357, -833.215759, -193.634827, -30.904673, -43.816589 ],[ "Between containers", "Run + Throw", "smoke", -423.996399, -1753.002075, -415.914856, -2.624159, -50.804165 ],[ "T Outside", "JumpThrow", "smoke", 1664.031250, -280.002014, -351.906250, -25.048063, -135.212463 ]]

    if(world == "de_overpass")     coords = [["Stairs", "Run + JumpThrow", "molotov", -3750.460938, -250.358826, 520.609863, 5.050490, 35.776577 ],["Barrels", "Run + Throw", "molotov", -430.186157, -1551.968750, 150.031250, -16.164569, 101.556863 ],["Heaven", "Walk + JumpThrow", "molotov", -856.031311, -639.968750, 105.031250, 4.120225, 128.027786 ],["Barrels", "Throw", "molotov", -1580.517578, -710.171814, 135.334778, -14.950030, 60.188404 ],["Water", "Throw", "molotov", -1276.541260, -964.551147, 10.933800, -23.484703, 82.194580],[ "Toilet entrance", "Run + Throw", "smoke", -730.031250, -2225.143799, 240.093811, -51.612926, 149.045975 ],[ "B Bridge", "Throw", "smoke", -617.486389, -1509.028809, 144.093811, -48.988934, 113.071342 ],[ "B Center", "Throw", "smoke", -525.982300, -1551.984375, 144.093811, -43.807911, 110.431473 ],[ "Barrels to Pillar", "Throw", "smoke", -613.014099, -1082.017212, 42.160416, -29.337307, 99.340714 ],[ "B Center", "Throw", "smoke", -1567.968750, -1087.984619, 0.093811, -30.278185, 74.646019 ],[ "Monster to Pillar", "Throw", "smoke", -1645.986938, -1087.982300, 96.093810, -20.015800, 55.835869 ],[ "Heaven", "Throw", "smoke", -1559.968750, -728.785583, 52.574355, -33.446209, 96.293686 ],[ "B Bridge", "Throw", "smoke", -1559.999390, -361.285339, 32.421722, -43.693123, 21.193089 ],[ "Heaven", "Throw", "smoke", -2174.002441, -1151.968750, 398.197235, -26.368107, 71.543701 ],[ "Long to Boxes", "Throw", "smoke", -2025.534058, -865.001343, 395.427856, -28.313963, 114.564102 ],[ "Bank", "Throw", "smoke", -2162.000488, -519.968750, 391.460358, -29.749702, 100.836487 ],[ "Truck to Bank", "Throw", "smoke", -3612.545654, -177.626740, 512.791992, -40.392601, 51.259613 ],[ "Boxes to Truck", "Throw", "smoke", -3540.031250, -381.968750, 528.080200, -14.256992, 41.849758 ],[ "Truck", "Throw", "smoke", -2351.968750, -815.968750, 391.089905, -34.683971, 81.500427 ],[ "Trash", "Throw", "smoke", -2351.968750, -414.031250, 388.562317, -60.588089, 73.825958 ],[ "Trash", "Throw", "smoke", -3383.369629, 35.247875, 516.906006, -18.035419, 31.699080 ],[ "Long", "Crouch + Throw", "smoke", -1993.398926, 537.698242, 475.093810, -28.677984, -169.596695 ],[ "Monster", "Throw", "smoke", -1926.860962, 1311.968750, 355.030579, -46.200985, -40.010532 ],[ "One-way", "Throw", "smoke", -2191.968750, 1311.968750, 356.093811, -8.861760, -55.390415 ],[ "One-way", "Right click", "smoke", -1826.375610, 629.178894, 256.093811, 26.580435, -17.457275 ],[ "One-way", "Throw", "smoke", -2012.968750, -1231.968750, 240.093811, 16.218643, 63.144173 ],[ "Short B", "Throw", "smoke", -2115.841309, 992.920288, 480.093810, -22.936214, -57.690578 ],[ "Bombsite A", "Throw", "flashbang", -2604.023926, 1102.215088, 480.093810, -24.090078, 70.938210 ],[ "Barrels", "Throw", "molotov", -1580.023315, -480.767883, 136.093811, -20.147602, 53.764153 ],[ "Bombsite B", "Throw", "molotov", -1399.968750, -139.998840, 0.093811, -15.444187, 63.084324 ]]

    if(world == "de_train")        coords = [["B site", "Throw", "molotov", -1085.563477, -954.344543, -55.968750, -2.244908, -11.982774 ],["Default", "Walk + Throw", "molotov", 1054.867188, 426.185638, -215.982330, -14.129807, -158.603027 ],["Heaven", "Throw", "molotov", 132.170197, 499.088257, -219.968750, -30.679949, -56.869923 ],["Site", "Run + Throw", "molotov", -338.848297, 307.854095, -215.968750, -29.580017, -36.570026 ],[ "B Upper", "Throw", "smoke", -1055.968750, -1607.969116, -151.906188, -9.076089, -21.028521 ],[ "B Lower", "Throw", "smoke", -1159.978027, -1088.112549, -95.909508, -9.122071, 13.307947 ],[ "Blue to Bombsite", "Run + Throw", "smoke", -1155.979004, -1301.504395, -95.906189, -15.857571, 38.882820 ],[ "Connector", "Run + Throw", "smoke", -1159.999634, -1048.001709, -95.906189, -11.023086, 5.091055 ],[ "Ivy (right)", "Throw", "smoke", 1388.426270, 1446.000488, -223.906189, -6.188282, -95.524574 ],[ "Ivy (left)", "Run + Throw", "smoke", 1535.968750, 1775.968750, -223.906189, -9.818258, -112.486588 ],["Bombsite A to Connector", "Both buttons", "smoke", -655.968750, -399.892731, 16.093811, -46.002502, 10.890710 ],[ "Blue to Red train", "Throw", "smoke", -645.479370, 1697.721924, -209.906189, -41.564690, -65.086685 ],[ "Electric box", "Throw", "smoke", -481.865631, 1725.011597, -209.906189, -45.937080, -78.790627 ],[ "Blue train (Left)", "Throw", "smoke", -555.031250, 1262.031250, -212.532227, -68.096550, -50.974125 ],[ "Green to Red train", "Throw", "smoke", -838.162292, 1268.024414, -222.906189, -37.604507, -42.064575 ],[ "Ivy to Green train", "Throw", "smoke", -640.027832, -583.969666, 16.093811, -44.699406, 32.218452 ],[ "Bombsite A to Red train", "Throw", "smoke", -453.358459, 1286.284668, -86.490753, -25.130558, -58.731426 ],[ "Main", "Throw", "smoke", 1021.096924, -254.988556, -215.906189, -38.494926, 154.562332 ],[ "Bombsite A", "Run + Throw", "flashbang", 400.031250, -420.031250, -211.777573, -28.859020, -89.674629 ],[ "Blue train (Back)", "Run + Throw", "molotov", -790.028748, 375.928741, -215.906189, -11.270589, 27.332729 ]]

    if(world == "de_cache")        coords = [[ "Ventsroom", "Throw", "smoke", 837.744141, -872.015564, 1614.093750, -15.362073, 177.850555 ],[ "Headshot", "Throw", "smoke", 960.031250, -1463.968750, 1644.093750, -26.400745, 162.851730 ],[ "B Center", "Throw", "smoke", 827.971313, -1463.968750, 1614.093750, -21.995483, 162.191437 ],[ "Mid Center", "Throw", "smoke", 1711.974121, 463.987732, 1614.093750, -10.675973, -167.299591 ],[ "Connector", "Throw", "smoke", 1160.711182, 715.841675, 1613.093750, -31.334572, -153.088974 ],[ "White box", "Throw", "smoke", 2156.583740, -182.968750, 1613.483887, -22.077839, 161.943924 ],[ "One-way", "Throw", "smoke", 1037.031250, 513.031250, 1613.550293, -49.137814, 104.639671 ],[ "Mid (Right side)", "Throw", "smoke", 1711.968750, -71.968750, 1614.093750, -10.560504, 161.185349 ],[ "Bombsite A", "Crouch + Throw", "smoke", 154.413376, 2096.080566, 1688.093750, 9.370919, -29.337667 ],[ "Short", "Run + Throw", "smoke", 139.031250, 2197.968750, 1688.093750, -6.040052, -60.836231 ],[ "Bombsite A", "Throw", "smoke", 1319.968750, 1520.395508, 1701.093750, -57.767025, 161.424835 ],[ "Forklift", "Throw", "smoke", 1230.754150, 1612.968750, 1701.965088, -74.514435, -173.894516 ],[ "Main", "Throw", "smoke", -782.198059, 1110.000366, 1689.439697, -9.703021, 24.963852 ],[ "Main", "Throw", "smoke", -429.968750, 2244.968750, 1687.093750, -66.017174, -31.140173 ],[ "Main", "Throw", "smoke", -50.012558, 2261.968750, 1687.093750, -18.612713, -64.612831 ],[ "Vents", "Run + Throw", "smoke", -996.979553, 1440.231689, 1691.182373, -33.181599, -46.326721 ],[ "Bombsite A", "Throw", "flashbang", -358.534668, 2147.728027, 1687.093750, -17.540194, 2.039984 ],[ "Bombsite A", "Throw", "flashbang", 89.984558, 2244.983398, 1687.093750, -71.181236, -93.482628 ],[ "Bombsite B", "Both buttons", "flashbang", -633.975891, -379.968750, 1620.093750, -41.629662, -58.865555 ],[ "Mid", "Crouch + Throw", "flashbang", 114.968750, -107.322037, 1613.718506, -16.913092, -84.200432 ],[ "Mid", "Run + Throw", "flashbang", 1736.970581, 308.968750, 1614.093750, -9.157659, 162.762833 ],[ "Bombsite B", "Throw", "flashbang", 879.802185, -872.031250, 1614.093750, -14.157107, 177.892853 ],[ "Bombsite B", "Throw", "molotov", 907.649597, -1228.031250, 1614.093750, -23.876366, -179.771790 ],[ "White box", "Throw", "molotov", 605.005188, -149.968750, 1689.035889, -6.584105, 133.537994 ],[ "Boost", "Throw", "molotov", 11.759085, -148.994904, 1613.093750, -32.654572, 38.675369 ]]

    if(world == "de_shortdust")    coords = [["Box", "Run + Throw", "molotov", -309.406403, 1933.314819, 32.031250, -5.444888, -45.821072 ],["Car", "Throw", "molotov", -893.477783, 956.593933, 35.031250, -11.485014, -34.438034 ],["One-Way CT", "Throw", "molotov", -450.279297, 780.684265, 40.753510, -19.734886, -50.160259 ],["One-Way Car", "Run + Throw", "molotov", -1279.968750, 1039.968750, -170.329315, -27.609568, -18.734381 ]]

    var scsiz = Render.GetScreenSize()
    var scrmid = [Render.GetScreenSize()[0] / 2, Render.GetScreenSize()[1] / 2]

    var coordslenght = 0

    color_circle = [0,0,0,0]

    while(coords[coordslenght]) {

      coordslenght++

    }
    for(var i = 0; i < coordslenght; i++) {

      crd = coords[i]

      if(weaponnames[crd[2]].indexOf(weapon) >= 0) {

        cds = Render.WorldToScreen([crd[3], crd[4], crd[5]])

        var distance = dis([crd[3], crd[4], crd[5]], Entity.GetRenderOrigin(Entity.GetLocalPlayer()))
        var nadeallmap = UI.GetValue(scriptitems,"Render nade on all map");
        if(dis([crd[3], crd[4], crd[5]], Entity.GetRenderOrigin(Entity.GetLocalPlayer())) < 10) {

          vec = atv(crd[6], crd[7])
          local_player = Entity.GetLocalPlayer()

          if(UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "Automatic Throw Hotkey") && UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Automatic Throw") && !running)
          {
            eye_pos = Entity.GetEyePosition(local_player)
            angles = getAngles(eye_pos , [crd[3] + vec[0] * 200, crd[4] + vec[1] * 200, crd[5] + 64 + vec[2] * 200])
            UserCMD.SetAngles([angles[0],angles[1],angles[2]])
            tickcount = Global.Tickcount()

            running = true
          //  coords_auto_throw = crd
            for(t = 0; t < movement_autothrow.length;t++)
            {
              if(movement_autothrow[t][0] == crd[0])
              {
                crd[8] = movement_autothrow[t][2]
                crd[9] = movement_autothrow[t][1]
              }
            }
            coords_auto_throw = crd
            auto_throw_repeat()
          }
        }
      }
    }
  }
}

function auto_throw()
{
  tick = Global.Tickcount()
  if (coords_auto_throw[8] == null)
  {

    if((coords_auto_throw[1].includes("Jump") || coords_auto_throw[1].includes("Throw")) && !coords_auto_throw[1].includes("Run")&&  !coords_auto_throw[1].includes("Walk"))
    {

      if(tick - tickcount == 1)
      {
        Cheat.ExecuteCommand( "+attack" );
      }
      if(tick - tickcount == 2)
      {
        if(coords_auto_throw[1].includes("Jump"))
          UserCMD.ForceJump()
        Cheat.ExecuteCommand( "-attack" );
        new Delay(Global.TickInterval() * 2 - Global.TickInterval() / 100 , stop_attack);
        running = false;
      }
      return
    }

    running = false
    return
  }
  jump_throw = false;
  for(i = 0; i < coords_auto_throw[8].length;i++)
  {
    if(coords_auto_throw[8][i][2] != 0)
    {
      jump_throw = true;
      break;
    }
  }
  if(tick - tickcount < coords_auto_throw[8].length)
  {
      UserCMD.SetMovement( [coords_auto_throw[8][tick - tickcount][0],0,0]);
      if(tick - tickcount < coords_auto_throw[8].length - 1)
      {
        if(coords_auto_throw[8][tick-tickcount+1][2] != 0 && coords_auto_throw[8][tick-tickcount][2] == 0)
        {
          Cheat.ExecuteCommand( "+attack" );
        }
      }
      if(tick - tickcount - 1 >= 0 && coords_auto_throw[8][tick-tickcount][2] != 0 && coords_auto_throw[8][tick - tickcount - 1][2] == 0)
      {
        UserCMD.ForceJump()
        Cheat.ExecuteCommand( "-attack" );
        running = false;
      }
      if(!jump_throw)
      {
        if(tick - tickcount == 1)
          Cheat.ExecuteCommand( "+attack" );
        if(tick - tickcount == coords_auto_throw[8].length - coords_auto_throw[9])
        {
          Cheat.ExecuteCommand( "-attack" );

          running = false;
        }
      }
  }
}
throw_tick = 0
function stop_attack()
{
    Cheat.ExecuteCommand( "-attack" );
}
function set_false()
{
  running = false
}
function auto_throw_repeat()
{
  if (coords_auto_throw[8] == null)
  {
    if((coords_auto_throw[1].includes("Jump") || coords_auto_throw[1].includes("Throw"))&&  !coords_auto_throw[1].includes("Run") &&  !coords_auto_throw[1].includes("Walk"))
    {

      for(i = 0; i < 2;i++)
      {
        new Delay(Global.TickInterval() * i - Global.TickInterval() / 100 , auto_throw);
      }
      new Delay(Global.TickInterval() * 3 - Global.TickInterval() / 100 , set_false);
      return
    }
    new Delay(Global.TickInterval() * 0 - Global.TickInterval() / 100 , set_false)
    return
  }
  for(i = 1; i <= coords_auto_throw[8].length;i++)
  {
    new Delay(Global.TickInterval() * i - Global.TickInterval() / 100 , auto_throw);
  }
}

//REMEMBER TO DELETE THIS AFTER ALL NADES

// function get_velocity()
// {
//     var velocity = Entity.GetProp( Entity.GetLocalPlayer(), "CBasePlayer", "m_vecVelocity[0]" );
//     vel = [velocity[0],velocity[1],velocity[2]]
//     velocity_first = vel[0]
//     if(Math.abs(velocity_first) > 1)
//     {
//       Cheat.Print("[ " + ("450") + ", " + "0" + ", " + (Math.abs(velocity[2])).toString() + " ],")
//     }
// }

// Callback
Cheat.RegisterCallback("CreateMove", "checkDelays");

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

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

Global.RegisterCallback("Draw", "draw")
UI.AddCheckbox("premium trashtalk");

const normal_killsays = ["ez", "too fucking easy", "effortless", "easiest kill of my life",
    "retard blasted", "cleans?", "nice memesense retard", "hello mind explaining what happened there",
    "pounce out of your window disgusting tranny, you shouldnt exist in this world",
    "а вы че клины???", "обоссал мемюзера лол", "ты че там отлетел то",
    "lmao ur so ugly irl like bro doesnt it hurt to live like that, btw you know you can just end it all",
    "ROFL NICE *DEAD* HHHHHHHHHHHHHHHHHH", "take the cooldown and let your team surr retard",
    "go take some estrogen tranny", "uid police here present your user identification number right now",
    "нищий улетел", "*DEAD* пофикси нищ", "сразу видно юид иссуе хуле тут",
    "у мамки что кфг иссуе была шо тебя родила", "а ты и в жизни ньюкамыч????", "сука не позорься и ливни лол",
    "юид полиция подьехала открывай дверь уебыч", "набутылирован лол", "tranny holzed",
    "але ты там из хрущевки выеди а потом вырыгивай блять", "как там с мамкой комнату разделять АХАХАХХАХА как ты на акк накопил блять",
    "найс 0.5х0.5м комната блять ХАХАХАХА ТЫ ТАМ ЖЕ ДАЖЕ ПОВЕСИТЬСЯ НЕ МОЖЕШЬ МЕСТА НЕТ ПХПХПХППХ", "better buy the superior hack!",
    "на мыло и веревку то деньги есть нищ????", "whatcha shootin at retard", "опущены стяги, легион и.. А БЛЯТЬ ТЫЖ ТУТ ОПУЩ НАХУЙ ПХГАХААХАХАХАХА)))))))",
    "але какая с юидом ситуация)))", "бля че тут эта нищая собака заскулила", "не хотелось даже руки об тебя марать нищ сука", "ебать ты красиво на бутылку упал",
    "прости что без смазки)))", "алло это скорая? тут такая ситуация нищ упал))) ОЙ А ВЫ НИЩАМ ТО НЕ ПОМОГАЕТЕ?? ПОНЯТНО Я ПОЙДУ ТОГДА))))))))", "nice 0.5x0.5m room you poorfag, how the fuck did you afford an acc hhhhhh", "вырыгнись из окна нахуй боберхук юзер",
    "тяжело с мемсенсом наверно????", "imagine losing at video games couldn't ever be me", "але а противники то где???", "nice chromosome count you sell??", "nice thirdworldspeak ROFL", "как ты на пк накопил даже не знаю )))))))))",
    "iq больше двух будет пмнешь ок????", "НИХУЯ ТАМ НЬЮКАМЫЧА ОРОШИЛИ СТРУЕЙ МОЧИ АХАХХАХАХАХАХАХАХА", "дал юид за щеку проверяй", "nn4ik shat on"
];
    
const hs_killsays = ["ez", "effortless", "1", "nice antiaim, you sell?", "you pay for that?",
    "refund right now", "consider suicide", "bro are u clean?",
    "another retard blasted",
    "hhhhhhhhhhhhhhhhhh 1, you pay for that? refund so maybe youll afford some food for your family thirdworld monkey",
    "paster abandoned the match and received a 7 day competitive matchmaking cooldown",
    "freeqn.net/refund.php", "refund your rainbowhook right now pasteuser dog",
    "бля эт пиздец че какие то там нищи с мемсенсом рыгают блять",
    "тебе права голоса не давали thirdworlder ебаный",
    "на завод иди",
    "JAJAJAJJAJA NICE RAINBOWPASTE ROFL",
    "140er????", "get good get vantap4ik",
    "1 but all you need to fix your problems is a rope and a chair you ugly shit",
    "who (kto) are you (nn4ik) wattafak mens???????", "must be an uid issue", "holy shit consider refunding your trash paste rofl",
    "hello please refund your subpar product",
    "ебать тебя унесло", "рефандни пожалуйста",
    "на бутылку русак",
    "a вы (you) сэр собственно кто (who)?",
    "бля пиздос может рефнешь???",
    "как там жизнь с рупастой??????",
    "але может не будешь тратить мамкину зарплату на говнопасты???",
    "stop spending your lunch money on shitpastes retard",
    "бля я рядом только прошел а ты уже упал АУУ НИЩ С ТОБОЙ ВСЕ ХОРОШО??????????))))))",
    "ой нищий упал щас скорую вызовем",
    "ой а кто (who) ты (you) такой вотзефак мен))))))",
    "thats going in my media compilation right there get shamed retard rofl",
    "imagine the only thing you eat being bullets man being a thirdworlder must suck rofl", "so fucking ez", "bot_kick", "where the enemies at????",
    "але найс упал нищ ЛОООООООЛ", "с тобой там все хорошо????????????? а да ты нищ нахуя я спрашиваю ПХАХАХАХАХХА",
    "жаль конечно что против нищей играть надо)))", "тебе даже спин не поможет блять, нахуй ты вообще живешь", "ты можешь заселлить лишнюю хромосому???",
    "научи потом как так сосать на хвх", "когда не накопил на гормоны и чулки)))))))))))))", "как там жизнь на мамкину пенсию???????", "але я бот_кик в консоль вроде прописал а вас там не кикнуло эт че баг??)))))))))",
    "крякоюзер down, на завод нахуй", "я не понял ты такой жирный потомучто дошики каждый день жрешь???? нормальную работу найди может на еду денег хватит))))))))))))",
    "насрал тебе в ротешник проверяй", "нихуя ты там как самолет отлетел ХАХАХХАХАХАХАХХХААХАА"
];

function on_player_death()
{
    if(UI.GetValue("Misc", "premium trashtalk"))
    {
        const victim = Entity.GetEntityFromUserID(Event.GetInt("userid"));
        const attacker = Entity.GetEntityFromUserID(Event.GetInt("attacker"));
        const headshot = Event.GetInt("headshot") == 1;
        
        if(Entity.IsLocalPlayer(attacker) && attacker != victim)
        {
            const normal_say = normal_killsays[Math.floor(Math.random() * normal_killsays.length)];
            const hs_say = hs_killsays[Math.floor(Math.random() * hs_killsays.length)];
            
            if(headshot && Math.random() * 2 > 1) //gamer style randomizer
            {
                Cheat.ExecuteCommand("say " + hs_say);
                return;
            }
            Cheat.ExecuteCommand("say " + normal_say);
        }
    }
}

var killsay_amt = normal_killsays.length + hs_killsays.length;

Cheat.Print("trashtalk js loaded, killsay count: " + killsay_amt + "\n");
Cheat.RegisterCallback("player_death", "on_player_death");
 

/**

 *

 * Title: Disable chams while scoped

 * Author: leed

 *

*/



//region api

const global_print = Global.Print, global_print_chat = Global.PrintChat, global_print_color = Global.PrintColor, global_register_callback = Global.RegisterCallback, global_execute_command = Global.ExecuteCommand, global_frame_stage = Global.FrameStage, global_tickcount = Global.Tickcount, global_tickrate = Global.Tickrate, global_tick_interval = Global.TickInterval, global_curtime = Global.Curtime, global_realtime = Global.Realtime, global_frametime = Global.Frametime, global_latency = Global.Latency, global_get_view_angles = Global.GetViewAngles, global_set_view_angles = Global.SetViewAngles, global_get_map_name = Global.GetMapName, global_is_key_pressed = Global.IsKeyPressed, global_get_screen_size = Global.GetScreenSize, global_get_cursor_position = Global.GetCursorPosition, global_play_sound = Global.PlaySound, global_play_microphone = Global.PlayMicrophone, global_stop_microphone = Global.StopMicrophone, global_get_username = Global.GetUsername, global_set_clan_tag = Global.SetClanTag, globals_tickcount = Globals.Tickcount, globals_tickrate = Globals.Tickrate, globals_tick_interval = Globals.TickInterval, globals_curtime = Globals.Curtime, globals_realtime = Globals.Realtime, globals_frametime = Globals.Frametime, sound_play = Sound.Play, sound_play_microphone = Sound.PlayMicrophone, sound_stop_microphone = Sound.StopMicrophone, cheat_get_username = Cheat.GetUsername, cheat_register_callback = cheat_register_callback = new Proxy(Cheat.RegisterCallback, { apply: function(_, _, args) { switch(args[0]) { case 'paint': Cheat.RegisterCallback('Draw', args[1]); break; case 'create_move': Cheat.RegisterCallback('CreateMove', args[1]); break; case 'fsn': Cheat.RegisterCallback('FrameStageNotify', args[1]); break; default: Cheat.RegisterCallback(args[0], args[1]); break; } } }), cheat_execute_command = Cheat.ExecuteCommand, cheat_frame_stage = Cheat.FrameStage, cheat_print = Cheat.Print, cheat_print_chat = Cheat.PrintChat, cheat_print_color = Cheat.PrintColor, local_latency = Local.Latency, local_get_view_angles = Local.GetViewAngles, local_set_view_angles = Local.SetViewAngles, local_set_clan_tag = Local.SetClanTag, local_get_real_yaw = Local.GetRealYaw, local_get_fake_yaw = Local.GetFakeYaw, local_get_spread = Local.GetSpread, local_get_inaccuracy = Local.GetInaccuracy, world_get_map_name = World.GetMapName, world_get_server_string = World.GetServerString, input_get_cursor_position = Input.GetCursorPosition, input_is_key_pressed = Input.IsKeyPressed, render_string = Render.String, render_text_size = Render.TextSize, render_line = Render.Line, render_rect = Render.Rect, render_filled_rect = Render.FilledRect, render_gradient_rect = Render.GradientRect, render_circle = Render.Circle, render_filled_circle = Render.FilledCircle, render_polygon = Render.Polygon, render_world_to_screen = Render.WorldToScreen, render_add_font = Render.AddFont, render_find_font = Render.FindFont, render_string_custom = Render.StringCustom, render_textured_rect = Render.TexturedRect, render_add_texture = Render.AddTexture, render_text_size_custom = Render.TextSizeCustom, render_get_screen_size = Render.GetScreenSize, ui_get_value = UI.GetValue, ui_set_value = UI.SetValue, ui_add_checkbox = UI.AddCheckbox, ui_add_slider_int = UI.AddSliderInt, ui_add_slider_float = UI.AddSliderFloat, ui_add_hotkey = UI.AddHotkey, ui_add_label = UI.AddLabel, ui_add_dropdown = UI.AddDropdown, ui_add_multi_dropdown = UI.AddMultiDropdown, ui_add_color_picker = UI.AddColorPicker, ui_add_textbox = UI.AddTextbox, ui_set_enabled = UI.SetEnabled, ui_get_string = UI.GetString, ui_get_color = UI.GetColor, ui_set_color = UI.SetColor, ui_is_hotkey_active = UI.IsHotkeyActive, ui_toggle_hotkey = UI.ToggleHotkey, ui_is_menu_open = UI.IsMenuOpen, convar_get_int = Convar.GetInt, convar_set_int = Convar.SetInt, convar_get_float = Convar.GetFloat, convar_set_float = Convar.SetFloat, convar_get_string = Convar.GetString, convar_set_string = Convar.SetString, event_get_int = Event.GetInt, event_get_float = Event.GetFloat, event_get_string = Event.GetString, entity_get_entities = Entity.GetEntities, entity_get_entities_by_class_i_d = Entity.GetEntitiesByClassID, entity_get_players = Entity.GetPlayers, entity_get_enemies = Entity.GetEnemies, entity_get_teammates = Entity.GetTeammates, entity_get_local_player = Entity.GetLocalPlayer, entity_get_game_rules_proxy = Entity.GetGameRulesProxy, entity_get_entity_from_user_i_d = Entity.GetEntityFromUserID, entity_is_teammate = Entity.IsTeammate, entity_is_enemy = Entity.IsEnemy, entity_is_bot = Entity.IsBot, entity_is_local_player = Entity.IsLocalPlayer, entity_is_valid = Entity.IsValid, entity_is_alive = Entity.IsAlive, entity_is_dormant = Entity.IsDormant, entity_get_class_i_d = Entity.GetClassID, entity_get_class_name = Entity.GetClassName, entity_get_name = Entity.GetName, entity_get_weapon = Entity.GetWeapon, entity_get_weapons = Entity.GetWeapons, entity_get_render_origin = Entity.GetRenderOrigin, entity_get_prop = Entity.GetProp, entity_set_prop = Entity.SetProp, entity_get_hitbox_position = Entity.GetHitboxPosition, entity_get_eye_position = Entity.GetEyePosition, trace_line = Trace.Line, trace_bullet = Trace.Bullet, usercmd_set_movement = UserCMD.SetMovement, usercmd_get_movement = UserCMD.GetMovement, usercmd_set_angles = UserCMD.SetAngles, usercmd_force_jump = UserCMD.ForceJump, usercmd_force_crouch = UserCMD.ForceCrouch, antiaim_get_override = AntiAim.GetOverride, antiaim_set_override = AntiAim.SetOverride, antiaim_set_real_offset = AntiAim.SetRealOffset, antiaim_set_fake_offset = AntiAim.SetFakeOffset, antiaim_set_l_b_y_offset = AntiAim.SetLBYOffset, exploit_get_charge = Exploit.GetCharge, exploit_recharge = Exploit.Recharge, exploit_disable_recharge = Exploit.DisableRecharge, exploit_enable_recharge = Exploit.EnableRecharge, ragebot_override_minimum_damage = Ragebot.OverrideMinimumDamage, ragebot_override_hitchance = Ragebot.OverrideHitchance, ragebot_override_accuracy_boost = Ragebot.OverrideAccuracyBoost, ragebot_override_multipoint_scale = Ragebot.OverrideMultipointScale, ragebot_force_safety = Ragebot.ForceSafety;

//endregion (credits to april)



function on_paint()

{

    var scoped = entity_get_prop(entity_get_local_player(), "CCSPlayer", "m_bIsScoped");



    if (ui_is_menu_open() || !entity_is_alive(entity_get_local_player()) || !entity_get_local_player()) return;

    ui_set_value("Visual", "SELF", "Chams", "Configure", 0);

    ui_set_value("Visual", "SELF", "Chams", "Visible override", scoped ? false : true);

}



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

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

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

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

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

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

    return true;
}

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

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

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

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

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

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


UI.AddCheckbox( "[HMR] Hit/Miss Ratio" );
UI.AddCheckbox( "[HMR] Reset on round start" );

var x = 30, y = 420;

var gun_fired = false;
var font_size = 4;

var other_weapons =
[
    "knife",
    "knife_t",
    "hegrenade",
    "smokegrenade",
    "molotov",
    "incgrenade",
    "flashbang",
    "decoy",
    "taser"
];

var shots =
{
    fired: 0,
    hit: 0,
    missed: 0,
    hit_chance: 0,
    miss_chance: 0
};

function is_gun(weapon_name) {
    
    for(var i = 0; i < other_weapons.length; i++) {
        
        if(weapon_name == "weapon_" + other_weapons[i]) {

            return false;

        }

    }

    return true;

}

function weapon_fire() {
    var player_id = Event.GetInt("userid");
    var player_weapon = Event.GetString("weapon");

    if(Entity.IsLocalPlayer(Entity.GetEntityFromUserID(player_id)) && is_gun(player_weapon)) {

        shots.fired = shots.fired + 1;
        gun_fired = true;

    }
}

function player_hurt() {
    var attacker_id = Event.GetInt("attacker");
    var attacker_weapon = Event.GetString("weapon");

    if(Entity.IsLocalPlayer(Entity.GetEntityFromUserID(attacker_id)) && is_gun(attacker_weapon) && gun_fired) {

        shots.hit = shots.hit + 1;
        gun_fired = false;

    }
}

function round_prestart() {
    if( UI.GetValue("Misc", "JAVASCRIPT", "Script Items", "[HMR] Reset on round start") ) {
        for (var key in shots){
            shots[key] = 0;
        }
    }
}

function main() {

    if(Global.GetMapName() == "" || !UI.GetValue("Misc", "JAVASCRIPT", "Script Items", "[HMR] Hit/Miss Ratio"))
        return;
    
    shots.missed = shots.fired - shots.hit;
    shots.hit_chance = ( (shots.hit / shots.fired) * 100 );
    shots.miss_chance = ( (shots.missed / shots.fired) * 100 );
    
    text_size = Render.TextSize("total: " + shots.fired, font_size);

    Render.String(x, y, 0, "total: " + shots.fired, [255, 255, 255, 255], font_size);

    Render.String(x, y + (text_size[1]-12), 0, "hit: " + shots.hit, [30, 190, 40, 255], font_size);

    Render.String(x, y + (text_size[1]-12)*2, 0, "miss: " + shots.missed, [200, 60, 40, 255], font_size);

    if(shots.fired > 0) {

        Render.String(x, y + (text_size[1]-12)*3, 0, shots.hit + " / " + shots.fired + " = " + Math.round(shots.hit_chance), [30, 95, 190, 255], font_size);

        Render.String(x, y + (text_size[1]-12)*4, 0, shots.missed + " / " + shots.fired + " = " + Math.round(shots.miss_chance), [25,175,115, 255], font_size);

    }

}

Global.RegisterCallback("weapon_fire", "weapon_fire");
Global.RegisterCallback("player_hurt", "player_hurt");
Global.RegisterCallback("round_prestart", "round_prestart");

Global.RegisterCallback("Draw", "main");
UI.AddCheckbox("Low delta");
UI.AddDropdown( "Low delta type", [ "Custom", "On key" ] );
const lowdelta_modes = UI.AddMultiDropdown("Low delta modes", [ "Slow walk", "Low HP", "Standing" ]);
UI.AddHotkey("Low delta on key");

function SetEnabled()
{
    if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Low delta"))
    {
       UI.SetEnabled("Misc", "JAVASCRIPT", "Script items", "Low delta type", 1)
    }
    else
    {
       UI.SetEnabled("Misc", "JAVASCRIPT", "Script items", "Low delta type", 0)
    }

    if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Low delta type") == 0 && UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Low delta"))
    {
       UI.SetEnabled("Misc", "JAVASCRIPT", "Script items", "Low delta modes", 1)
       UI.SetEnabled("Misc", "JAVASCRIPT", "Script items", "Low delta on key", 0)
    }
    else if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Low delta type") == 1 && UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Low delta"))
    {
       UI.SetEnabled("Misc", "JAVASCRIPT", "Script items", "Low delta modes", 0)
       UI.SetEnabled("Misc", "JAVASCRIPT", "Script items", "Low delta on key", 1)
    }
    else
    {
       UI.SetEnabled("Misc", "JAVASCRIPT", "Script items", "Low delta modes", 0)
       UI.SetEnabled("Misc", "JAVASCRIPT", "Script items", "Low delta on key", 0)
    }
}

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()
{
    localplayer_index = Entity.GetLocalPlayer( );
    const lowdelta_dropdown_value = UI.GetValue.apply(null, lowdelta_modes);
 
    var velocity = get_velocity(localplayer_index)
    var health = get_health(localplayer_index)
    var LowHP = false
    var SlowWalk = false
    var Standing = false
    var Onkey = false

    if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Low delta") && UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Low delta type") == 0)
    {
       if (lowdelta_dropdown_value & (1 << 0) && UI.IsHotkeyActive("Anti-Aim", "Extra", "Slow walk"))
       SlowWalk = true
       else
       SlowWalk = false

       if (lowdelta_dropdown_value & (1 << 1) && health < 50)
       LowHP = true
       else
       LowHP = false

       if (lowdelta_dropdown_value & (1 << 2) && velocity < 3)
       Standing = true
       else
       Standing = false
    }
    else if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Low delta") && UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Low delta type") == 1)
    {
       if (UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "Low delta on key"))
       Onkey = true
       else
       Onkey = false
    }

        if (Standing == true || LowHP == true || SlowWalk == true || Onkey == true && UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Low delta"))
        {
            UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", 10);
            UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Jitter offset", 0);
            AntiAim.SetOverride(1);
            AntiAim.SetFakeOffset(0);
            AntiAim.SetRealOffset(-26);
        }
        else
        {
            UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", 0);
            AntiAim.SetOverride(0);
        }
}

function drawString()
{
    const fontpixel = Render.AddFont( "Verdana", 8, 100);
    const lowdelta_dropdown_value = UI.GetValue.apply(null, lowdelta_modes);
    var SFOnkey = false
    var screen_size = Global.GetScreenSize();

    localplayer_index = Entity.GetLocalPlayer( );
    localplayer_alive = Entity.IsAlive( localplayer_index );

    SlowWalk = false
    LowHP = false
    Standing = false
    Onkey = false

    if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Low delta") && UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Low delta type") == 0)
    {
       if (lowdelta_dropdown_value & (1 << 0) && UI.IsHotkeyActive("Anti-Aim", "Extra", "Slow walk"))
       SlowWalk = true
       else
       SlowWalk = false

       if (lowdelta_dropdown_value & (1 << 1) && health < 50)
       LowHP = true
       else
       LowHP = false

       if (lowdelta_dropdown_value & (1 << 2) && velocity < 3)
       Standing = true
       else
       Standing = false
    }
    else if (UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Low delta") && UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Low delta type") == 1)
    {
       if (UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "Low delta on key"))
       Onkey = true
       else
       Onkey = false
    }
 
    if (Standing == true || LowHP == true || SlowWalk == true || Onkey == true)
    {
        drawIND = true
    }
    else
    {
        drawIND = false
    }
 
    if (drawIND == true && localplayer_alive == true && UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Low delta") == true)
    {
       Render.StringCustom(screen_size[0] /2 , screen_size[1] /2 +25, 1, "LOW DELTA", [ 255, 0, 0, 255 ], fontpixel );
    }
}

Global.RegisterCallback("Draw", "drawString");
Global.RegisterCallback("Draw", "SetEnabled");
Cheat.RegisterCallback("CreateMove", "Low_delta");
//same tick+same attacker->same bullet

Cheat.RegisterCallback("Draw", "drawHitListFunc");
Cheat.RegisterCallback("round_start", "resetFunc");
Cheat.RegisterCallback("player_hurt", "pHurtFunc");
Cheat.RegisterCallback("ragebot_fire", "rFireFunc");
//UI.AddSliderInt("Max logs", 0, 100);

/*UI.AddCheckbox("Enable IDs");
UI.AddCheckbox("Enable Hitboxes");
UI.AddCheckbox("Enable Victims");
UI.AddCheckbox("Enable Weapons");
UI.AddCheckbox("Enable Damages");
UI.AddCheckbox("Enable Hit chance");
UI.AddCheckbox("Enable Exploits");*/

var ragebot_tick = 0;
var ragebot_hitbox_target = 0;
var ragebot_hitchance_target = 0;
var ragebot_exploit_target = 0;

var hits = [];

function resetFunc() {hits = [];}

function rFireFunc() {
    ragebot_tick = Globals.Curtime(); // to verify if I miss don't wanna be retarded;
  
    ragebot_hitbox_target = getHitboxName(Event.GetInt("hitbox"));
    ragebot_hitchance_target = Event.GetInt("hitchance");
    ragebot_exploit_target = Event.GetInt("exploit") > 0 ? "yes" : "-";
}

function drawHitListFunc() {
       if (!Entity.GetLocalPlayer() || !Entity.IsValid(Entity.GetLocalPlayer()))
        return;
Render.FilledRect( pos[0], pos[1], 420, 15, [ 0, 0, 0, 180 ] );
Render.FilledRect( pos[0], pos[1], 420, 23 + (hits.length * 12), [ 0, 0, 0, 120 ] );
    const IDs = true;
    const hitboxes = true;
    const victims = true;
    const weapons = false;
    const damages = true;
    const healths = false;
    const hitchances = true;
    const exploits = true;
  
    var requiredX = 0;
    var ID_x = 45;
    var hitbox_x = 100;
    var victim_x = 100;
    var weapon_x = 80;
    var damage_x = 50;
    var health_x = 50;
    var hitchance_x = 90;
    var exploit_x = 70;
  
    requiredX += IDs ? ID_x : 0;
    requiredX += hitboxes ? hitbox_x : 0;
    requiredX += victims ? victim_x : 0;
    requiredX += weapons ? weapon_x : 0;
    requiredX += damages ? damage_x : 0;
    requiredX += healths ? health_x : 0;
    requiredX += hitchances ? hitchance_x : 0;
    requiredX += exploits ? exploit_x : 0;
  
    const foregroundBounds = drawMenu(100, 100, 50 + (requiredX), 65 + (hits.length * 12), [11,223,234,255], [6,80,80,255], "Hitlist", true);

    //Render.Line(foregroundBounds[0], foregroundBounds[1] + 15, foregroundBounds[2] +106, foregroundBounds[1] + 15, [255, 255, 255, 200]);
   font = Render.AddFont("Small Fonts", 5, 100);
   font1 = Render.AddFont("Verdana", 7, 500)
    var cY = 20;
    oY = 12;
    pX = 10;
    if (IDs) {
        draw_outline_text(pos[0]+10, pos[1]+3.75, 0, "ID", [255, 255, 255, 255], font);
        pX += ID_x;
    }
    if (victims) {
        draw_outline_text(foregroundBounds[0] + pX, pos[1]+3.75, 0, "PLAYER", [255, 255, 255, 255], font);
        pX += victim_x;
    }
    if (hitboxes) {
        draw_outline_text(foregroundBounds[0]-20 + pX, pos[1]+3.75, 0, "HITBOX", [255, 255, 255, 255], font);
        pX += hitbox_x;
    }
    if (damages) {
        draw_outline_text(foregroundBounds[0]-45 + pX, pos[1]+3.75, 0, "DAMAGE", [255, 255, 255, 255], font);
        pX += damage_x;
    }
    if (hitchances) {
        draw_outline_text(foregroundBounds[0]-20 + pX, pos[1]+3.75, 0, "HIT CHANCE", [255, 255, 255, 255], font);
        pX += hitchance_x;
    }
    if (exploits) {
        draw_outline_text(foregroundBounds[0]-40 + pX, pos[1]+3.75, 0, "EXPLOIT", [255, 255, 255, 255], font);
        pX += exploit_x;
    }
    if (weapons) {
        Render.String(foregroundBounds[0] + pX, foregroundBounds[1] + 2, 0, "WEAPON", [255, 255, 255, 200], 8);
        pX += weapon_x;
    }
    if (healths) {
        Render.String(foregroundBounds[0] + pX, foregroundBounds[1] + 2, 0, "HP", [255, 255, 255, 200], 8);
        pX += health_x;
    } 
  
    for (var  i = 0; i < hits.length; i++) {
        currentHit = hits[i];
        //sY = 15 or 16 ???
        pX = 10;
        if (IDs) {
            if (currentHit[5] <= 0){
            Render.FilledRect( pos[0], pos[1] + cY, 2, 10, [ 255, 50, 50, 255 ] );
            Render.FilledRect( pos[0]+1, pos[1] + cY, 1, 10, [ 0, 0, 0, 125 ] );
            }else{
            Render.FilledRect( pos[0], pos[1] + cY, 2, 10, [ 65, 105, 225, 255 ] );
            Render.FilledRect( pos[0]+1, pos[1] + cY, 1, 10, [ 0, 0, 0, 125 ] );
            }
            Render.StringCustom(pos[0]+11, pos[1]-2+1 + cY, 0, currentHit[0], [0, 0, 0, 150], font1); //ID
            Render.StringCustom(pos[0]+10, pos[1]-2 + cY, 0, currentHit[0], [255, 255, 255, 255], font1); //ID
            pX += ID_x;
        }
        if (victims) {
            if (currentHit[5] <= 0){
            Render.StringCustom(foregroundBounds[0] + pX+1, pos[1]-2 + cY+1, 0, currentHit[2].length > 10 ? currentHit[2].substring(0, 10) + "..." : currentHit[2], [0, 0, 0, 150], font1); //VICTIMl  og.name.slice(0, getCustomValue('Max Name Size'))
            Render.StringCustom(foregroundBounds[0] + pX, pos[1]-2 + cY, 0, currentHit[2].length > 10 ? currentHit[2].substring(0, 10) + "..." : currentHit[2], [255, 150, 150, 255], font1); //VICTIM
            }else{
            Render.StringCustom(foregroundBounds[0] + pX+1, pos[1]-2 + cY+1, 0, currentHit[2].length > 10 ? currentHit[2].substring(0, 10) + "..." : currentHit[2], [0, 0, 0, 150], font1); //VICTIMl  og.name.slice(0, getCustomValue('Max Name Size'))
            Render.StringCustom(foregroundBounds[0] + pX, pos[1]-2 + cY, 0, currentHit[2].length > 10 ? currentHit[2].substring(0, 10) + "..." : currentHit[2], [255, 255, 255, 255], font1); //VICTIM
            }
            pX += victim_x;
        }
        if (hitboxes) {
            Render.StringCustom(foregroundBounds[0]-20 + pX+1, pos[1]-2 + cY+1, 0, currentHit[1], [0, 0, 0, 150], font1); //HITBOX
            Render.StringCustom(foregroundBounds[0]-20 + pX, pos[1]-2 + cY, 0, currentHit[1], [255, 255, 255, 255], font1); //HITBOX
            pX += hitbox_x;
        }
        if (damages) {
            if (currentHit[5] <= 0){
            Render.StringCustom(foregroundBounds[0]-45 + pX+1, pos[1]-2 + cY+1, 0, currentHit[4], [0, 0, 0, 150], font1); //DAMAGE
            Render.StringCustom(foregroundBounds[0]-45 + pX, pos[1]-2 + cY, 0, currentHit[4], [255, 150, 150, 255], font1); //DAMAGE
            }else{
            Render.StringCustom(foregroundBounds[0]-45 + pX+1, pos[1]-2 + cY+1, 0, currentHit[4]+" ("+currentHit[5]+")", [0, 0, 0, 150], font1); //DAMAGE
            Render.StringCustom(foregroundBounds[0]-45 + pX, pos[1]-2 + cY, 0, currentHit[4]+" ("+currentHit[5]+")", [255, 255, 255, 255], font1); //DAMAGE
            }
            pX += damage_x;
        }
        if (healths) {
            Render.String(foregroundBounds[0]-20 + pX, foregroundBounds[1] + cY, 0, currentHit[5], [255, 255, 255, 200], 8); //HITCHANCE
            pX += health_x;
        }
        if (hitchances) {
            Render.StringCustom(foregroundBounds[0]-20 + pX+1, pos[1]-2 + cY+1, 0, currentHit[6], [0, 0, 0, 150], font1); //REMAINING HEALTH
            Render.StringCustom(foregroundBounds[0]-20 + pX, pos[1]-2 + cY, 0, currentHit[6], [255, 255, 255, 255], font1); //REMAINING HEALTH
            pX += hitchance_x;
        }
        if (exploits) {

            Render.StringCustom(foregroundBounds[0]-40 + pX, pos[1]-2 + cY, 0, currentHit[7], [0, 0, 0, 150], font1); //HITCHANCE
            Render.StringCustom(foregroundBounds[0]-40 + pX, pos[1]-2 + cY, 0, currentHit[7], [255, 255, 255, 255], font1); //HITCHANCE
            pX += exploit_x;
        }
        if (weapons) {
            Render.String(foregroundBounds[0] + pX, foregroundBounds[1] + cY, 0, currentHit[3], [255, 255, 255, 200], 8); //WEAPON
            pX += weapon_x;
        }
        cY += oY;
        
    }
  

    if (hits.length > 5) hits.shift();
}


var curID = 0;
function pHurtFunc() {
    if (Entity.GetEntityFromUserID(Event.GetInt("attacker")) != Entity.GetLocalPlayer()) return;
    curID++;
  
   // var hitbox = "Generic";
    if (ragebot_tick == Globals.Curtime()) hitbox = ragebot_hitbox_target;

    var id = curID.toString(); 
    var victimName = Entity.GetName(Entity.GetEntityFromUserID(Event.GetInt("userid")));
    var weaponName = Event.GetString("weapon");
    var damageDealt = Event.GetInt("dmg_health").toString();
    var healthRemaining = Event.GetInt("health").toString();
    var hitchance = ragebot_hitchance_target.toString() + "%";
    var exploit = ragebot_exploit_target.toString();
  
    hits.push(
    [
    id,
    hitbox,
    victimName,
    weaponName,
    damageDealt,
    healthRemaining,
    hitchance,
    exploit
    ]
  
    );
}
function draw_outline_text (x, y, align, string, color, fontname) { //this is really messy but it does the job
    Render.StringCustom(x - 1, y - 1, align, string, [0, 0, 0, 255], fontname);
    Render.StringCustom(x - 1, y, align, string, [0, 0, 0, 255], fontname);
    Render.StringCustom(x - 1, y + 1, align, string, [0, 0, 0, 255], fontname);
    
    Render.StringCustom(x, y + 1, align, string, [0, 0, 0, 255], fontname);
    Render.StringCustom(x, y - 1, align, string, [0, 0, 0, 255], fontname);
    
    Render.StringCustom(x + 1, y - 1, align, string, [0, 0, 0, 255], fontname);
    Render.StringCustom(x + 1, y, align, string, [0, 0, 0, 255], fontname);
    Render.StringCustom(x + 1, y + 1, align, string, [0, 0, 0, 255], fontname);
    
    Render.StringCustom(x, y, align, string, color, fontname);
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var firstRun = true;
var pos = [0, 0];
function drawMenu(x, y, sX, sY, foreColor, darkForeColor, title, draggable) {

    if (firstRun) {
        pos = [x, y];
        firstRun = false;
    }

    //We return the position of the foreground

    baseBackground = [pos[0] + 4, pos[1] + 4, sX - 8, sY - 8];

    foregroundPos = [baseBackground[0] + 4, baseBackground[1] + 28, baseBackground[2] - 8, baseBackground[3] - 32];

    //Outline
   // outlineBox(pos[0], pos[1], sX, sY, [20, 20, 20, 255])

    //Far background
   // Render.FilledRect(pos[0], pos[1], sX, sY, [20, 20, 20, 130]);

    //Base background outline
    //outlineBox(baseBackground[0]-1, baseBackground[1]-1, baseBackground[2]+1, baseBackground[3]+1, [70, 70, 70, 255]);

    //Base background
    //Render.FilledRect(baseBackground[0], baseBackground[1], baseBackground[2], baseBackground[3], [40, 40, 40, 200]);

    //Title
   // Render.String( pos[0] + (sX / 2), baseBackground[1] + 5, 1, title, [230, 230, 230, 255], 8 );

    //Title 'Underline'
    stringSize = Render.TextSize(title, 8);

   // Render.GradientRect(foregroundPos[0], baseBackground[1] + stringSize[1] + 5, foregroundPos[2], 5, 0, foreColor, darkForeColor);

    //Foreground outline
    //outlineBox(foregroundPos[0]-1, foregroundPos[1]-1, foregroundPos[2]+1, foregroundPos[3]+1, [70, 70, 70, 255]);

    //Foreground
    //Render.FilledRect(foregroundPos[0], foregroundPos[1], foregroundPos[2], foregroundPos[3], [20, 20, 20, 130]);
    if (draggable) operateDrag(baseBackground[0] , baseBackground[1], sX - 5, stringSize[1] + 5); //ideally this should be called from createMove but for now I'll put that in TODO.

    return foregroundPos;
}
var dragOffset = [];
function operateDrag(x, y, sX, sY) {
    if (!beingClicked(x,x+sX,y,y+sY) && dragOffset.length == 0 || !Input.IsKeyPressed(0x01)) {dragOffset = [];return;}
  

    cursorPosition = Input.GetCursorPosition();
  
    cX = cursorPosition[0];
    cY = cursorPosition[1];

    if (dragOffset.length == 0) {dragOffset = [cX - x, cY - y];}
  
    pos = [cX - dragOffset[0], cY - dragOffset[1]];
}
function outlineBox(x, y, sX, sY, color) {
    //top left -> top right
    Render.Line(x, y, x + sX, y, color);

    //top right -> bottom right
    Render.Line( x + sX, y, x + sX, y + sY, color);

    //bottom right -> bottom left
    Render.Line( x + sX, y + sY, x, y + sY, color);

    //bottom left -> top left
    Render.Line( x, y + sY, x, y, color);

}
function beingClicked(maxLeft, maxRight, maxTop, maxBottom) {
    cursorPosition = Input.GetCursorPosition();
  
    return ( Input.IsKeyPressed(0x01) && cursorPosition[0] > maxLeft && cursorPosition[0] < maxRight
    &&    cursorPosition[1] < maxBottom && cursorPosition[1] > maxTop);
}
function drawButton(x, y, sX, sY, text, foreColor, backColor, borderColor, fontSize, centerText, textOffset) {
    Render.FilledRect(x, y, sX, sY, backColor);
    outlineBox(x, y, sX, sY, borderColor);
    Render.String(x + (centerText ? sX / 2 : textOffset), y + (sY / 3), centerText ? 1 : 0, text, foreColor, fontSize);
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//useful shit, not required.
function getRandomInt(min, max) {
    min = Math.ceil(min);
    max = Math.floor(max);
    return Math.floor(Math.random() * (max - min + 1)) + min; //both bounds are inclusive.
}
function getVal(valName) { return UI.GetValue("Script items", valName);}
function setVal(valName, val) { UI.SetValue("Misc", "JAVASCRIPT", "Script items", valName, val);}
function padStr(source, desiredLen) {
    const sourceLen = source.length;
    var newStr = source;
    const requiredAddition = desiredLen - sourceLen;
    if (requiredAddition == 0) newStr = newStr.substring(0, desiredLen);
  
    while (newStr.length != desiredLen) newStr += " ";
  
    return newStr;
}

function getHitboxName(hitgroup) {
    hitbox = "-";
  
    switch (hitgroup) {
        case 0:
        hitbox =  "head";
        break;
        case 1:
        hitbox =  "neck";
        break;
        case 2:
        hitbox =  "stomach";
        break;
        case 3:
        hitbox =  "stomach";
        break;
        case 4:
        hitbox =  "chest";
        break;
        case 5:
        hitbox =  "chest";
        break;
        case 6:
        hitbox =  "chest";
        break;
        case 7:
        hitbox =  "leg";
        break;
        case 8:
        hitbox =  "leg";
        break;
        case 9:
        hitbox =  "leg";
        break;
        case 10:
        hitbox =  "leg";
        break;
        case 11:
        hitbox =  "leg";
        break;
        case 12:
        hitbox =  "leg";
        break;
        case 13:
        hitbox =  "hand";
        break;
        case 14:
        hitbox =  "hand";
        break;
        case 15:
        hitbox =  "hand";
        break;
        case 16:
        hitbox =  "hand";
        break;
        case 17:
        hitbox =  "hand";
        break;
        case 18:
        hitbox =  "hand";
    }
    
    return hitbox; // I didn't use yours in the end as the shit was more or less the same and I love my code
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
UI.AddCheckbox("Console filter")

function consolefilter() {
    if (UI.GetValue("Script items", "Console filter")) {
        Cheat.ExecuteCommand("con_filter_enable 1 ");
        Cheat.ExecuteCommand("con_filter_text  out hajksddsnkjcakhkjash");
        Cheat.ExecuteCommand("con_filter_text  hjkasdhjadskdhasjkasd 1");
    }
}

Cheat.RegisterCallback("Draw", "consolefilter")


//Я мог использовать Convar.SetString и Convar.SetInt но мне так похуй

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

 *

 * Title: Bomb timber

 * Author: hvhforgame#3204

 * Credits: april for api snippets, Ultranite for providing me armorvalue example

*/



//region api

const global_print = Global.Print, global_print_chat = Global.PrintChat, global_print_color = Global.PrintColor, global_register_callback = Global.RegisterCallback, global_execute_command = Global.ExecuteCommand, global_frame_stage = Global.FrameStage, global_tickcount = Global.Tickcount, global_tickrate = Global.Tickrate, global_tick_interval = Global.TickInterval, global_curtime = Global.Curtime, global_realtime = Global.Realtime, global_frametime = Global.Frametime, global_latency = Global.Latency, global_get_view_angles = Global.GetViewAngles, global_set_view_angles = Global.SetViewAngles, global_get_map_name = Global.GetMapName, global_is_key_pressed = Global.IsKeyPressed, global_get_screen_size = Global.GetScreenSize, global_get_cursor_position = Global.GetCursorPosition, global_play_sound = Global.PlaySound, global_play_microphone = Global.PlayMicrophone, global_stop_microphone = Global.StopMicrophone, global_get_username = Global.GetUsername, global_set_clan_tag = Global.SetClanTag, globals_tickcount = Globals.Tickcount, globals_tickrate = Globals.Tickrate, globals_tick_interval = Globals.TickInterval, globals_curtime = Globals.Curtime, globals_realtime = Globals.Realtime, globals_frametime = Globals.Frametime, sound_play = Sound.Play, sound_play_microphone = Sound.PlayMicrophone, sound_stop_microphone = Sound.StopMicrophone, cheat_get_username = Cheat.GetUsername, cheat_register_callback = cheat_register_callback = new Proxy(Cheat.RegisterCallback, { apply: function(_, _, args) { switch(args[0]) { case 'paint': Cheat.RegisterCallback('Draw', args[1]); break; case 'create_move': Cheat.RegisterCallback('CreateMove', args[1]); break; case 'fsn': Cheat.RegisterCallback('FrameStageNotify', args[1]); break; default: Cheat.RegisterCallback(args[0], args[1]); break; } } }), cheat_execute_command = Cheat.ExecuteCommand, cheat_frame_stage = Cheat.FrameStage, cheat_print = Cheat.Print, cheat_print_chat = Cheat.PrintChat, cheat_print_color = Cheat.PrintColor, local_latency = Local.Latency, local_get_view_angles = Local.GetViewAngles, local_set_view_angles = Local.SetViewAngles, local_set_clan_tag = Local.SetClanTag, local_get_real_yaw = Local.GetRealYaw, local_get_fake_yaw = Local.GetFakeYaw, local_get_spread = Local.GetSpread, local_get_inaccuracy = Local.GetInaccuracy, world_get_map_name = World.GetMapName, world_get_server_string = World.GetServerString, input_get_cursor_position = Input.GetCursorPosition, input_is_key_pressed = Input.IsKeyPressed, render_string = Render.String, render_text_size = Render.TextSize, render_line = Render.Line, render_rect = Render.Rect, render_filled_rect = Render.FilledRect, render_gradient_rect = Render.GradientRect, render_circle = Render.Circle, render_filled_circle = Render.FilledCircle, render_polygon = Render.Polygon, render_world_to_screen = Render.WorldToScreen, render_add_font = Render.AddFont, render_find_font = Render.FindFont, render_string_custom = Render.StringCustom, render_textured_rect = Render.TexturedRect, render_add_texture = Render.AddTexture, render_text_size_custom = Render.TextSizeCustom, render_get_screen_size = Render.GetScreenSize, ui_get_value = UI.GetValue, ui_set_value = UI.SetValue, ui_add_checkbox = UI.AddCheckbox, ui_add_slider_int = UI.AddSliderInt, ui_add_slider_float = UI.AddSliderFloat, ui_add_hotkey = UI.AddHotkey, ui_add_label = UI.AddLabel, ui_add_dropdown = UI.AddDropdown, ui_add_multi_dropdown = UI.AddMultiDropdown, ui_add_color_picker = UI.AddColorPicker, ui_add_textbox = UI.AddTextbox, ui_set_enabled = UI.SetEnabled, ui_get_string = UI.GetString, ui_get_color = UI.GetColor, ui_set_color = UI.SetColor, ui_is_hotkey_active = UI.IsHotkeyActive, ui_toggle_hotkey = UI.ToggleHotkey, ui_is_menu_open = UI.IsMenuOpen, convar_get_int = Convar.GetInt, convar_set_int = Convar.SetInt, convar_get_float = Convar.GetFloat, convar_set_float = Convar.SetFloat, convar_get_string = Convar.GetString, convar_set_string = Convar.SetString, event_get_int = Event.GetInt, event_get_float = Event.GetFloat, event_get_string = Event.GetString, entity_get_entities = Entity.GetEntities, entity_get_entities_by_class_i_d = Entity.GetEntitiesByClassID, entity_get_players = Entity.GetPlayers, entity_get_enemies = Entity.GetEnemies, entity_get_teammates = Entity.GetTeammates, entity_get_local_player = Entity.GetLocalPlayer, entity_get_game_rules_proxy = Entity.GetGameRulesProxy, entity_get_entity_from_user_i_d = Entity.GetEntityFromUserID, entity_is_teammate = Entity.IsTeammate, entity_is_enemy = Entity.IsEnemy, entity_is_bot = Entity.IsBot, entity_is_local_player = Entity.IsLocalPlayer, entity_is_valid = Entity.IsValid, entity_is_alive = Entity.IsAlive, entity_is_dormant = Entity.IsDormant, entity_get_class_i_d = Entity.GetClassID, entity_get_class_name = Entity.GetClassName, entity_get_name = Entity.GetName, entity_get_weapon = Entity.GetWeapon, entity_get_weapons = Entity.GetWeapons, entity_get_render_origin = Entity.GetRenderOrigin, entity_get_prop = Entity.GetProp, entity_set_prop = Entity.SetProp, entity_get_hitbox_position = Entity.GetHitboxPosition, entity_get_eye_position = Entity.GetEyePosition, trace_line = Trace.Line, trace_bullet = Trace.Bullet, usercmd_set_movement = UserCMD.SetMovement, usercmd_get_movement = UserCMD.GetMovement, usercmd_set_angles = UserCMD.SetAngles, usercmd_force_jump = UserCMD.ForceJump, usercmd_force_crouch = UserCMD.ForceCrouch, antiaim_get_override = AntiAim.GetOverride, antiaim_set_override = AntiAim.SetOverride, antiaim_set_real_offset = AntiAim.SetRealOffset, antiaim_set_fake_offset = AntiAim.SetFakeOffset, antiaim_set_l_b_y_offset = AntiAim.SetLBYOffset, exploit_get_charge = Exploit.GetCharge, exploit_recharge = Exploit.Recharge, exploit_disable_recharge = Exploit.DisableRecharge, exploit_enable_recharge = Exploit.EnableRecharge, ragebot_override_minimum_damage = Ragebot.OverrideMinimumDamage, ragebot_override_hitchance = Ragebot.OverrideHitchance, ragebot_override_accuracy_boost = Ragebot.OverrideAccuracyBoost, ragebot_override_multipoint_scale = Ragebot.OverrideMultipointScale, ragebot_force_safety = Ragebot.ForceSafety;

//endregion



var screen_size = global_get_screen_size();

var bombsite, player_name, site = "";

var plating_time = 3.125;

var planting, planted, ignore_dropped, ignore_self = false;

var r = 108, g = 195, b = 18;

var rr = 108, gr = 195, br = 18;

var bomb_beginwhen = null;

const planting_height = 0;

const defuse_height = 0;



//Math functions

function lerp_pos(x1, y1, z1, x2, y2, z2, percentage)

{

    var x = (x2 - x1) + percentage + x1;

    var y = (y2 - y1) + percentage + y1;

    var z = (z2 - z1) + percentage + z1;

    return [x, y, z];

}

function distance3d(x1,y1,z1,x2,y2,z2)

{

    return Math.sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2);

}

function getDefuseTime(bomb_entity)

{

    var defuse_time = entity_get_prop(bomb_entity, "CPlantedC4", "m_flDefuseCountDown") - globals_curtime();

    return Math.max(0, defuse_time);

}

function getBombTime(bomb_entity)

{

    var bomb_time = entity_get_prop(bomb_entity, "CPlantedC4", "m_flC4Blow") - globals_curtime();

    return Math.max(0, bomb_time);

}

function getBombSite(bomb_entity)

{

    return bomb_site = entity_get_prop(bomb_entity, "CPlantedC4", "m_nBombSite") == 1 ? "B" : "A";

}

function getDistanceTo(a, b)

{

    var lx = a[0];

    var ly = a[1];

    var lz = a[2];

    var tx = b[0];

    var ty = b[1];

    var tz = b[2];

    var dx = lx - tx;

    var dy = ly - ty;

    var dz = lz - tz;

 

    return Math.sqrt(dx * dx + dy * dy + dz * dz);

}

function getDamage(damage, armor_value)

{

    if (armor_value > 0)

    {

        var new_value = damage * .5;

        var armor = (damage - new_value) * .5;

        if (armor > armor_value)

        {

            armor = armor_value * (1 / .5);

            new_value = damage - armor;

        }

        damage = new_value;

    }

    return damage;

}

function getBombDamage(player_entity, bomb_entity)

{

    var player_pos = entity_get_render_origin(player_entity);

    var bomb_pos = entity_get_render_origin(bomb_entity);

    var distance = getDistanceTo(player_pos, bomb_pos);

    const a = 450.7;

    const b = 75.68;

    const c = 789.2;

    const d = ((distance - b) / c);

    var damage = a * Math.exp(-d * d);

    var armor_value = entity_get_prop(player_entity, "CCSPlayerResource", "m_iArmor");



    return Math.max(Math.ceil(getDamage(damage, armor_value)), 0)

}



function draw_defuse_bar()

{

    var y = screen_size[1];

    const c4 = Entity.GetEntitiesByClassID(128)[0];

    var defused_at = entity_get_prop(c4, "CPlantedC4", "m_flDefuseCountDown");

    var defuse_length = entity_get_prop(c4, "CPlantedC4", "m_flDefuseLength");

    const timer = (Entity.GetProp(c4, "CPlantedC4", "m_flC4Blow") - Globals.Curtime()).toFixed(3);

    if (defuse_length > timer)

    {

        return;

    }

    defuse_height = Math.min(y, y * (globals_curtime() - (defused_at - defuse_length)) / defuse_length);

    render_filled_rect(15, 0, 15, render_get_screen_size()[1], [32,32,32,150]);

    render_filled_rect(15, y - defuse_height, 15, y, [79, 163, 227, 255]);

}



function on_paint()

{

    var x = screen_size[0];

    var y = screen_size[1];

    const bomb_entity = entity_get_entities_by_class_i_d(128);

    var bomb = null;



    const c4 = Entity.GetEntitiesByClassID(128)[0];

    if (planting)

    {

        if (player_name != entity_get_name(entity_get_local_player()))

        {

            render_string(17, 2, 0, bombsite + " - " + player_name, [0, 0, 0, 255], 4)

            render_string(15, 0, 0, bombsite + " - " + player_name, [r, g, b, 255], 4)

        }

        planting_height =  Math.min(y, y * (globals_curtime() - bomb_beginwhen) / plating_time);

        render_filled_rect(0, 0, 15, render_get_screen_size()[1], [32,32,32,150]);

        render_filled_rect(0, y - planting_height, 15, y, [rr,gr,br,255]);

    }

    if (planted)

    {

        if (bomb_entity != null)

        {

            bomb = bomb_entity[1];

            var local_player = entity_get_local_player();

            var bomb_time_max = convar_get_float("mp_c4timer");

            const bomb_damage = getBombDamage(local_player, c4);

            var player = entity_get_prop(c4, "CPlantedC4", "m_hBombDefuser");

            if (player == 1)

            {

                draw_defuse_bar();

            }

        }

        const timer = (Entity.GetProp(c4, "CPlantedC4", "m_flC4Blow") - Globals.Curtime()).toFixed(1);

        const planted_text = getBombSite(c4) + " - " + timer.toString() + "s";

        const height = Math.min(y, y * timer/bomb_time_max);



        render_filled_rect(0, 0, 15, render_get_screen_size()[1], [32,32,32,150]);

        render_filled_rect(0, y - height, 15, y, [rr,gr,br,255]);





        render_string(17, 2, 0, planted_text, [0, 0, 0, 255], 4)

        render_string(15, 0, 0, planted_text, [r, g, b, 255], 4)

        if (timer <= 10)

        {

            r = 230,g = 235,b = 145;

        }

        if (timer <= 5)

        {

            r = 255, g = 1, b = 1;

            rr = 255, gr = 1, br = 1;

        }

        if (timer <= 0)

        {

            r = 108, g = 195, b = 18;

            rr = 108, gr = 195, br = 18;

            planted = false;

            planting = false;

            return;

        }

        if (bomb_damage >= 3)

        {

            const damage_text= entity_get_prop(local_player, "CBasePlayer", "m_iHealth") <= bomb_damage ? "FATAL" : "-" + bomb_damage.toString() + " HP";

            const damage_color = entity_get_prop(local_player, "CBasePlayer", "m_iHealth") <= bomb_damage ? [255,1,1,255] : [230,235,145, 255];

            render_string(17, 30, 0, damage_text, [0, 0, 0, 255], 4);

            render_string(15, 28, 0, damage_text, damage_color, 4);

        }

    }

}

const a_site_array = [425, 333, 79, 262, 154, 94, 281, 204, 92, 152];

const b_site_array = [426, 422, 504, 314, 405, 536, 282, 205, 97, 153];

function beginPlant()

{

    var userid = event_get_int("userid");

    site = event_get_int("site");

    if (!userid) return;

    cheat_print("[onetap] Planting on bombsite id: " + event_get_int("site")+"\n");

    if (a_site_array.indexOf(site) > -1)

    {

        site = "A";

    }

    else if (b_site_array.indexOf(site) > -1)

    {

        site = "B";

    }

    else

    {

        return;

    }



    var userid_name = entity_get_entity_from_user_i_d(userid);

    var userid_name_final = entity_get_name(userid_name);



    planting = true;

    bombsite = site;

    player_name = userid_name_final;

    bomb_beginwhen = globals_curtime();

}

function abortPlant()

{

    planting = false;

    planted = false;

    planting_height = 0;

    defuse_height = 0;

}

function bombPlanted()

{

    planting = false;

    planted = true;

}

function reset()

{

    planting = false;

    planted = false;

    planting_height = 0;

    defuse_height = 0;

    site = "";

}

cheat_register_callback("bomb_beginplant", "beginPlant");

cheat_register_callback("bomb_abortplant", "abortPlant");

cheat_register_callback("bomb_planted", "bombPlanted");

cheat_register_callback("bomb_defused", "reset");

cheat_register_callback("round_start", "reset");

cheat_register_callback("Draw", "on_paint");
UI.AddSliderFloat("LBY offset", -180, 180)
UI.AddSliderFloat("Real offset", -180, 180)
UI.AddSliderFloat("Fake offset", -180, 180)


function main(){
    var LBYOffset = UI.GetValue ("Misc", "JAVASCRIPT", "Script Items", "LBY offset")
    var RealOffset = UI.GetValue ("Misc", "JAVASCRIPT", "Script Items", "Real offset")
    var FakeOffset = UI.GetValue ("Misc", "JAVASCRIPT", "Script Items", "Fake offset")

    var inverted = UI.IsHotkeyActive("Anti-Aim", "Fake angles", "Inverter")

    if(inverted){
        AntiAim.SetOverride(1);
        AntiAim.SetFakeOffset(-FakeOffset);
        AntiAim.SetRealOffset(-RealOffset);
        AntiAim.SetLBYOffset(-LBYOffset);
    } else {
        AntiAim.SetOverride(1);
        AntiAim.SetFakeOffset(FakeOffset);
        AntiAim.SetRealOffset(RealOffset);
        AntiAim.SetLBYOffset(LBYOffset);
    }


}

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


UI.AddDropdown("Anti hit by sanchezj", ["Off", "On Hit", "On Shot"]);
function GetScriptOption(name)
{
    var Value = UI.GetValue("Misc", "JAVASCRIPT", "Script Items", name);
    return Value;
}

function radian(degree)
{
    return degree * Math.PI / 180.0;
}

function ExtendVector(vector, angle, extension)
{
    var radianAngle = radian(angle);
    return [extension * Math.cos(radianAngle) + vector[0], extension * Math.sin(radianAngle) + vector[1], vector[2]];
}

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

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 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 VectorDot(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 ClosestPointOnRay(target, rayStart, rayEnd)
{
    var to = VectorSubtract(target, rayStart);
    var dir = VectorSubtract(rayEnd, rayStart);
    var length = VectorLength(dir[0], dir[1], dir[2]);
    dir = VectorNormalize(dir);

    var rangeAlong = VectorDot(dir, to);
    if (rangeAlong < 0.0)
    {
        return rayStart;
    }
    if (rangeAlong > length)
    {
        return rayEnd;
    }
    return VectorAdd(rayStart, VectorMultiply(dir, [rangeAlong, rangeAlong, rangeAlong]));
}

function Flip()
{
    UI.ToggleHotkey("Anti-Aim", "Fake angles", "Inverter");
}

var lastHitTime = 0.0;
var lastImpactTimes =
[
    0.0
];
var lastImpacts =
[
    [0.0, 0.0, 0.0]
];

function OnHurt()
{
    if (GetScriptOption("Anti Bruteforce") == 0) return;
    if (Entity.GetEntityFromUserID(Event.GetInt("userid")) !== Entity.GetLocalPlayer()) return;
    var hitbox = Event.GetInt('hitgroup');

    if (hitbox == 1 || hitbox == 6 || hitbox == 7)  //head, both toe
    {
        var curtime = Global.Curtime();
        if (Math.abs(lastHitTime - curtime) > 0.5)   //0.2s backtrack + 0.2 extand + 0.1 extra
        {
            lastHitTime = curtime;
            Flip();
        }
    }
}

function OnBulletImpact()
{
    if (GetScriptOption("Anti Bruteforce") !== 2) return;

    var curtime = Global.Curtime();
    if (Math.abs(lastHitTime - curtime) < 0.5) return;

    var entity = Entity.GetEntityFromUserID(Event.GetInt("userid"));
    var impact = [Event.GetFloat("x"), Event.GetFloat("y"), Event.GetFloat("z"), curtime];
    var source;
    if (Entity.IsValid(entity) && Entity.IsEnemy(entity))
    {
        if (!Entity.IsDormant(entity))
        {
            source = Entity.GetEyePosition(entity);
        }
        else if (Math.abs(lastImpactTimes[entity] - curtime) < 0.1)
        {
            source = lastImpacts[entity];
        }
        else
        {
            lastImpacts[entity] = impact;
            lastImpactTimes[entity] = curtime;
            return;
        }
        var local = Entity.GetLocalPlayer();
        var localEye = Entity.GetEyePosition(local);
        var localOrigin = Entity.GetProp(local, "CBaseEntity", "m_vecOrigin");
        var localBody = VectorMultiply(VectorAdd(localEye, localOrigin), [0.5, 0.5, 0.5]);

        var bodyVec = ClosestPointOnRay(localBody, source, impact);
        var bodyDist = VectorDistance(localBody, bodyVec);
        
        if (bodyDist < 128.0)       //he clearly shot at us!
        {
            var realAngle = Local.GetRealYaw();
            var fakeAngle = Local.GetFakeYaw();

            var headVec = ClosestPointOnRay(localEye, source, impact);
            var headDist = VectorDistance(localEye, headVec);
            var feetVec = ClosestPointOnRay(localOrigin, source, impact);
            var feetDist = VectorDistance(localOrigin, feetVec);

            var closestRayPoint;
            var realPos;
            var fakePos;

            if (bodyDist < headDist && bodyDist < feetDist)     //that's a pelvis
            {                                                   //pelvis direction = goalfeetyaw + 180       
                closestRayPoint = bodyVec;
                realPos = ExtendVector(bodyVec, realAngle + 180.0, 10.0);
                fakePos = ExtendVector(bodyVec, fakeAngle + 180.0, 10.0);
            }
            else if (feetDist < headDist)                       //ow my toe
            {                                                   //toe direction = goalfeetyaw -30 +- 90
                closestRayPoint = feetVec;
                var realPos1 = ExtendVector(bodyVec, realAngle - 30.0 + 90.0, 10.0);
                var realPos2 = ExtendVector(bodyVec, realAngle - 30.0 - 90.0, 10.0);
                var fakePos1 = ExtendVector(bodyVec, fakeAngle - 30.0 + 90.0, 10.0);
                var fakePos2 = ExtendVector(bodyVec, fakeAngle - 30.0 - 90.0, 10.0);
                if (VectorDistance(feetVec, realPos1) < VectorDistance(feetVec, realPos2))
                {
                    realPos = realPos1;
                }
                else
                {
                    realPos = realPos2;
                }
                if (VectorDistance(feetVec, fakePos1) < VectorDistance(feetVec, fakePos2))
                {
                    fakePos = fakePos1;
                }
                else
                {
                    fakePos = fakePos2;
                }
            }
            else                                                //ow my head i feel like i slept for 2 days
            {
                closestRayPoint = headVec;
                realPos = ExtendVector(bodyVec, realAngle, 10.0);
                fakePos = ExtendVector(bodyVec, fakeAngle, 10.0);
            }

            if (VectorDistance(closestRayPoint, fakePos) < VectorDistance(closestRayPoint, realPos))        //they shot at our fake. they will probably not gonna shoot it again.
            {
                lastHitTime = curtime;
                Flip();
            }
        }

        lastImpacts[entity] = impact;
        lastImpactTimes[entity] = curtime;
    }
}

Cheat.RegisterCallback("player_hurt", "OnHurt");
Cheat.RegisterCallback("bullet_impact", "OnBulletImpact");
var oldHitChance = UI.GetValue("Rage", "SCOUT", "Accuracy", "Hitchance");
var oldAccBoost = UI.GetValue("Rage", "SCOUT", "Accuracy", "Accuracy boost");

UI.AddCheckbox("Jumpscout Hitchance");
UI.AddSliderInt("Hitchance", 1, 100);
UI.AddSliderInt("Accuracy Boost", 1, 100);

var isInAir = function(){
if(Global.IsKeyPressed((0x20))){
return true;
}else{
return false;
}
}

function updateValues(){
if(isInAir()){
var Hitchance = UI.GetValue("Script Items","Hitchance");
var AccuracyBoost = UI.GetValue("Script Items", "Accuracy Boost");
UI.SetValue("Rage", "SCOUT", "Accuracy", "Hitchance", Hitchance);
UI.SetValue("Rage", "SCOUT", "Accuracy", "Accuracy boost", AccuracyBoost);
}else{
UI.SetValue("Rage", "SCOUT", "Accuracy", "Hitchance", oldHitChance);
UI.SetValue("Rage", "SCOUT", "Accuracy", "Accuracy boost", oldAccBoost);
}
}

Global.RegisterCallback("CreateMove", "updateValues");
var easing = {
    lerp: function(a, b, percentage) {
        return a + (b - a) * percentage
    }
}

var anti_aimbot = {
    get_desync: function() {
        var RealYaw = Local.GetRealYaw();
        var FakeYaw = Local.GetFakeYaw();
        var delta = Math.min(Math.abs(RealYaw - FakeYaw) / 2, 58).toFixed(1);

        return delta
    }
}

Render.OutlineStringCustom = function(x, y, alignid, text, color, font) {
    Render.StringCustom(x - 1, y - 1, alignid, text, [0, 0, 0, color[3]], font);
    Render.StringCustom(x - 1, y, alignid, text, [0, 0, 0, color[3]], font);

    Render.StringCustom(x - 1, y + 1, alignid, text, [0, 0, 0, color[3]], font);   
    Render.StringCustom(x, y + 1, alignid, text, [0, 0, 0, color[3]], font);

    Render.StringCustom(x, y - 1, alignid, text, [0, 0, 0, color[3]], font);
    Render.StringCustom(x + 1, y - 1, alignid, text, [0, 0, 0, color[3]], font);

    Render.StringCustom(x + 1, y, alignid, text, [0, 0, 0, color[3]], font);
    Render.StringCustom(x + 1, y + 1, alignid, text, [0, 0, 0, color[3]], font);

    Render.StringCustom(x, y, alignid, text, color, font);
}

var vars = {
    anim_x_stand: 0,
    anim_y_stand: 0,
    anim_alpha_stand: 0,
    anim_y_os: 0,
    anim_line: 0,
    anim_width_sp: 0,
    default_height: 65,
    default_width: 170
}

UI.AddColorPicker("Main color")

UI.AddSliderInt("Add x", -1000, 1000)
UI.AddSliderInt("Add y", -1000, 1000)

UI.AddCheckbox("Enable line")

UI.SetValue("Script Items", "Add x", -20)
UI.SetValue("Script Items", "Add y", 30)

UI.SetColor("Script Items", "Main color", [255, 255, 255, 255])

var render_holo_panel = function() {
    var local = Entity.GetLocalPlayer()

    var fonts = {
        verdana_7: Render.AddFont("Verdana", 7, 400),
        small_font: Render.AddFont("Small fonts", 5, 400)
    }

    var body_yaw = anti_aimbot.get_desync()

    var hitbox = Entity.GetHitboxPosition(local, 3)
    var world_stand = Render.WorldToScreen(hitbox)

    var color = UI.GetColor("Script Items", "Main color")
    var color_fake = [170 + (154 - 186) * body_yaw / 60 , 0 + (255 - 0) * body_yaw / 60 , 16 + (0 - 16) * body_yaw / 60 , 255]

    if (UI.IsHotkeyActive("Visuals", "World", "View", "Thirdperson")) {
        vars.anim_x_stand = easing.lerp(vars.anim_x_stand, world_stand[0], Globals.Frametime() * 8)
        vars.anim_y_stand = easing.lerp(vars.anim_y_stand, world_stand[1], Globals.Frametime() * 8)

        vars.anim_alpha_stand = easing.lerp(vars.anim_alpha_stand, 1, Globals.Frametime() * 22)
    } else {
        vars.anim_alpha_stand = easing.lerp(vars.anim_alpha_stand, 0, Globals.Frametime() * 22)

        if (vars.anim_alpha_stand <= 0) {
            anim_x_stand = 0
            anim_y_stand = 0
        }
    }

    if (UI.IsHotkeyActive("Rage", "Exploits", "Doubletap")) {
        vars.default_height = easing.lerp(vars.default_height, 78, Globals.Frametime() * 8)
        vars.anim_y_os = easing.lerp(vars.anim_y_os, 0, Globals.Frametime() * 8)
        vars.anim_line = easing.lerp(vars.anim_line, 75, Globals.Frametime() * 8)
    } else {
        vars.default_height = easing.lerp(vars.default_height, 65, Globals.Frametime() * 8)
        vars.anim_y_os = easing.lerp(vars.anim_y_os, -15, Globals.Frametime() * 8)
        vars.anim_line = easing.lerp(vars.anim_line, 85, Globals.Frametime() * 8)
    }

    vars.anim_width_sp = easing.lerp(vars.anim_width_sp, (28 / 58) * body_yaw, Globals.Frametime() * 4)

    var add_y = UI.GetValue("Script Items", "Add y")
    var add_x = UI.GetValue("Script Items", "Add x")
    var add_line_x = 100

    if (add_x <= -280) {
        add_line_x = 100 + vars.default_width
    }

    Render.FilledRect(vars.anim_x_stand + 100 + add_x, vars.anim_y_stand - 150 + add_y, vars.default_width, vars.default_height, [15, 15, 15, 100 * vars.anim_alpha_stand])
    Render.FilledRect(vars.anim_x_stand + 100 + add_x, vars.anim_y_stand - 150 + add_y, vars.default_width, 2, [color[0], color[1], color[2], 255 * vars.anim_alpha_stand])

    if (UI.GetValue("Script Items", "Enable line")) {
        Render.Line(vars.anim_x_stand, vars.anim_y_stand, vars.anim_x_stand + add_line_x + add_x, vars.anim_y_stand - vars.anim_line + add_y, [255, 255, 255, 125 * vars.anim_alpha_stand]);
    }

    Render.OutlineStringCustom(vars.anim_x_stand + 107 + add_x, vars.anim_y_stand - 143 + add_y, 0, "ANTI-AIMBOT DEBUG", [255, 255, 255, 255 * vars.anim_alpha_stand], fonts.small_font)

    var dec = [ color_fake[0] - (color_fake[0] / 100 * 50), color_fake[1] - (color_fake[1] / 100 * 50), color_fake[2] - (color_fake[2] / 100 * 50) ]

    Render.GradientRect(vars.anim_x_stand + 107 + add_x, vars.anim_y_stand - 125 + add_y - 4, 2, 18 / 2, 0, [dec[0], dec[1], dec[2], 0 * vars.anim_alpha_stand], [color_fake[0], color_fake[1], color_fake[2], 255 * vars.anim_alpha_stand]);
    Render.GradientRect(vars.anim_x_stand + 107 + add_x, vars.anim_y_stand - 125 + add_y + 18 / 2 - 4, 2, 18 / 2, 0, [color_fake[0], color_fake[1], color_fake[2], 255 * vars.anim_alpha_stand], [dec[0], dec[1], dec[2], 0 * vars.anim_alpha_stand]);

    var f_text = "FAKE (" + body_yaw.toString() + ")"
    Render.StringCustom(vars.anim_x_stand + 115 + add_x, vars.anim_y_stand - 122 + add_y - 5, 0, f_text, [255, 255, 255, 255 * vars.anim_alpha_stand], fonts.verdana_7);

    Render.OutlineStringCustom(vars.anim_x_stand + 107 + add_x, vars.anim_y_stand - 102 + add_y, 0, "SP:", [255, 255, 255, 255 * vars.anim_alpha_stand], fonts.small_font)

    Render.FilledRect(vars.anim_x_stand + 123 + add_x, vars.anim_y_stand - 102 + add_y + 2, 28, 7, [15, 15, 15, 100 * vars.anim_alpha_stand])
    Render.FilledRect(vars.anim_x_stand + 123 + 28 + 5 + add_x, vars.anim_y_stand - 102 + add_y + 2, 28, 7, [15, 15, 15, 100 * vars.anim_alpha_stand])

    if (Local.GetRealYaw() - Local.GetFakeYaw() > 0) {
        Render.FilledRect(vars.anim_x_stand + 123 + add_x, vars.anim_y_stand - 102 + add_y + 2, vars.anim_width_sp, 7, [color[0], color[1], color[2], 255 * vars.anim_alpha_stand])
    } else if (Local.GetRealYaw() - Local.GetFakeYaw() < 0){
        Render.FilledRect(vars.anim_x_stand + 123 + 28 + 5 + add_x, vars.anim_y_stand - 102 + 2 + add_y, vars.anim_width_sp, 7, [color[0], color[1], color[2], 255 * vars.anim_alpha_stand])
    }

    var realtime = Globals.Realtime() % 3
    var alpha = Math.floor(Math.sin(realtime * 4) * (255 / 2 - 1) + 255 / 2)

    if (UI.IsHotkeyActive("Rage", "Exploits", "Doubletap")) {
        Render.OutlineStringCustom(vars.anim_x_stand + 107 + add_x, vars.anim_y_stand - 88 + add_y, 0, "SHIFTING TICKBASE", [255, 255, 255, alpha * vars.anim_alpha_stand], fonts.small_font)
    }

    var state_os = "OFF"
    var os_color = [255, 0, 0, 255]

    if (UI.IsHotkeyActive("Rage", "Exploits", "Hide shots")) {
        state_os = "ON"
        os_color = [0, 255, 0, 255]
    }

    Render.OutlineStringCustom(vars.anim_x_stand + 100 + vars.default_width - 13 - Render.TextSizeCustom(state_os, fonts.small_font)[0] / 2 + add_x, vars.anim_y_stand - 88 + vars.anim_y_os + add_y, 0, state_os, [os_color[0], os_color[1], os_color[2], 255 * vars.anim_alpha_stand], fonts.small_font)
    Render.OutlineStringCustom(vars.anim_x_stand + 100 + vars.default_width - 13 - Render.TextSizeCustom(state_os, fonts.small_font)[0] / 2 - 24 + add_x, vars.anim_y_stand - 88 + vars.anim_y_os + add_y, 0, "OSAA:", [255, 255, 255, 255 * vars.anim_alpha_stand], fonts.small_font)
}
Cheat.RegisterCallback("Draw", "render_holo_panel")
Cheat.RegisterCallback("CreateMove", "aaLoop");

multiplierOptions = [-2, -1, 1, 2];

function aaLoop() {
    AntiAim.SetOverride(1);

    //if (getRandomIntInclusive(0, 4)) AntiAim.SetFakeOffset(-10);
    //else if (getRandomIntInclusive(0, 4)) AntiAim.SetFakeOffset(10);
    //else {
        AntiAim.SetFakeOffset(getRandomIntInclusive(20, 40));
        AntiAim.SetRealOffset(getRandomIntInclusive(30, 50) * multiplierOptions[getRandomIntInclusive(0, multiplierOptions.length)]);
    //}
}



function getRandomIntInclusive(min, max) {
    min = Math.ceil(min);
    max = Math.floor(max);
    return Math.floor(Math.random() * (max - min + 1)) + min; //The maximum is inclusive and the minimum is inclusive
  }
UI.AddColorPicker("[GWarn] Circle color")
UI.AddColorPicker("[GWarn] Line color")











var lines = []
var hits = []
var pmolotov = []
var tracer_lines = []
var setid = "m_nForceBone"
var name = "m_nBody"
var name2 = "CBaseCSGrenadeProjectile"
var id = 1

function grenade_warning_tick() {
    entities = Entity.GetEntitiesByClassID(9).concat(Entity.GetEntitiesByClassID(114));
    for (var i = 0; i < entities.length; i++) {
        entity = entities[i]
        if (Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_nExplodeEffectTickBegin') == 0) {
            Entity.SetProp(entity, name2, name, Entity.GetProp(entity, name2, name) + 1)
        }
    }
    if (entities.length == 0) {
        hits = []
        lines = []
        pmolotov = []
    }
    entities = Entity.GetEntitiesByClassID(9)
    for (var i = 0; i < entities.length; i++) {
        entity = entities[i]
        var vel = Entity.GetProp(entity, 'CBaseGrenade', 'm_vecVelocity');
        if (Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_flAnimTime') != Math.round(vel[0]) && Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_nExplodeEffectTickBegin') == 0) {
            Entity.SetProp(entity, 'CBaseCSGrenade', 'm_flAnimTime', Math.round(vel[0]))
            var mx = vel[0] * 0.015
            var my = vel[2] * 0.015
            var mz = vel[1] * 0.015
            Entity.SetProp(entity, 'CBaseCSGrenadeProjectile', setid, id)
            id++
            var x = Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_vecOrigin')[0]
            var y = Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_vecOrigin')[2]
            var z = Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_vecOrigin')[1]
            var hittable = false
            for (var i = 0; i < 109 - Entity.GetProp(entity, name2, name); i++) {
                my = my - 0.0712
                var hit = []
                var hitbox = [
                    [
                        [x - 2, z - 2, y - 2],
                        [x + mx - 2, z + mz - 2, y + my - 2]
                    ],
                    [
                        [x - 2, z - 2, y + 2],
                        [x + mx - 2, z + mz - 2, y + my + 2]
                    ],
                    [
                        [x + 2, z + 2, y - 2],
                        [x + mx + 2, z + mz + 2, y + my - 2]
                    ],
                    [
                        [x + 2, z + 2, y + 2],
                        [x + mx + 2, z + mz + 2, y + my + 2]
                    ]
                ]
                for (var v = 0; v < hitbox.length; v++) {
                    var h = hitbox[v]
                    var res = 0
                    res = Trace.Line(entity, h[0], h[1])[1]
                    if (res != 1) {
                        var ny = h[0][2] + 10
                        var nx = h[1][0]
                        var nz = h[1][1]
                        var fny = h[0][2]
                        var fnx = h[1][0]
                        var fnz = h[1][1]
                        vres = Trace.Line(entity, [fnx, fnz, fny], [nx, nz, ny])[1]
                        var start = [x, z, y]
                        var end = [x - mx, z - mz, y - 30]
                        vres1 = Trace.Line(entity, start, end)[1]
                        if (vres == 1 && vres1 == 1) {
                            hittable = true
                            hit = [x + mx * (res), z + mz * (res), y + my * (res)]
                            break;
                        } else {
                            my = my * -0.45
                            mx = mx * 0.45
                            mz = mz * 0.45
                            break
                        }
                    }
                }
                if (hit.length > 1) {
                    hits.push([
                        [hit[0], hit[1], hit[2]], Globals.Tickcount() + i, false, Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_flAnimTime'), Globals.Tickcount()
                    ])
                    break;
                }
               lines.push([
                        [x, z, y],
                        [x + mx, z + mz, y + my], Globals.Tickcount() + i, Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_flAnimTime')
                    ])
                x = x + mx
                y = y + my
                z = z + mz
            }
            if (!hittable) {
                hits.push([
                    [x, z, y], Globals.Tickcount() + i, false, Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_flAnimTime'), Globals.Tickcount()
                ])
            }
        }
    }
    entities = Entity.GetEntitiesByClassID(114)
    for (var i = 0; i < entities.length; i++) {
        entity = entities[i]

        var vel = Entity.GetProp(entity, 'CBaseGrenade', 'm_vecVelocity');
        if (Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_flAnimTime') != Math.round(vel[0]) && Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_nExplodeEffectTickBegin') == 0) {
            Entity.SetProp(entity, 'CBaseCSGrenade', 'm_flAnimTime', Math.round(vel[0]))
            var mx = vel[0] * 0.015
            var my = vel[2] * 0.015
            var mz = vel[1] * 0.015
            Entity.SetProp(entity, 'CBaseCSGrenadeProjectile', setid, id)
            id++

            var x = Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_vecOrigin')[0]
            var y = Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_vecOrigin')[2]
            var z = Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_vecOrigin')[1]
            var hittable = false
            for (var i = 0; i < 130 - Entity.GetProp(entity, name2, name); i++) {
                my = my - 0.0712
                var hit = []
                var hitbox = [
                    [
                        [x - 2, z - 2, y - 2],
                        [x + mx - 2, z + mz - 2, y + my - 2]
                    ],
                    [
                        [x - 2, z - 2, y + 2],
                        [x + mx - 2, z + mz - 2, y + my + 2]
                    ],
                    [
                        [x + 2, z + 2, y - 2],
                        [x + mx + 2, z + mz + 2, y + my - 2]
                    ],
                    [
                        [x + 2, z + 2, y + 2],
                        [x + mx + 2, z + mz + 2, y + my + 2]
                    ]
                ]
                for (var v = 0; v < hitbox.length; v++) {
                    var h = hitbox[v]
                    var res = 0
                    res = Trace.Line(entity, h[0], h[1])[1]
                    if (res != 1) {
                        var ny = h[0][2] + 10
                        var nx = h[1][0]
                        var nz = h[1][1]
                        var fny = h[0][2]
                        var fnx = h[1][0]
                        var fnz = h[1][1]
                        vres = Trace.Line(entity, [fnx, fnz, fny], [nx, nz, ny])[1]
                        var start = [x, z, y]
                        var end = [x - mx, z - mz, y - 20]
                        vres1 = Trace.Line(entity, start, end)[1]
                        if (vres == 1 && vres1 == 1) {
                            hittable = true
                            hit = [x + mx * (res), z + mz * (res), y + my * (res)]
                            break;
                        } else {
                            if (vres1 != 1) {
                                pmolotov.push([
                                    [x, z, y], Globals.Tickcount(), Globals.Tickcount() + i, Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_flAnimTime')
                                ])
                                hits.push([
                                    [x, z, y], Globals.Tickcount() + i, true, Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_flAnimTime')
                                ])
                                return
                            }
                            my = my * -0.45
                            mx = mx * 0.45
                            mz = mz * 0.45
                            break
                        }
                    }
                }
                if (hit.length > 1) {
                    hits.push([
                        [hit[0], hit[1], hit[2]], Globals.Tickcount() + i, true, Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_flAnimTime'), Globals.Tickcount()
                    ])
                    break;
                }
               lines.push([
                        [x, z, y],
                        [x + mx, z + mz, y + my], Globals.Tickcount() + i, Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_flAnimTime')
                    ])
                x = x + mx
                y = y + my
                z = z + mz
            }
            if (!hittable) {
                hits.push([
                    [x, z, y], Globals.Tickcount() + i, true, Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_flAnimTime'), Globals.Tickcount()
                ])
            }
        }
    }
    const contains = function(arr, contain) {
        for (var i = 0; i < arr.length; i++) {
            var object = arr[i]
            if (object == contain) {
                return true
            }
        }
        return false;
    }
    entities = Entity.GetEntitiesByClassID(9).concat(Entity.GetEntitiesByClassID(114));
    var array = []
    for (var i = 0; i < entities.length; i++) {
        entity = entities[i]
        if (Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_nExplodeEffectTickBegin') == 0) {
            array.push(Entity.GetProp(entity, 'CBaseCSGrenadeProjectile', 'm_flAnimTime'))
        }
    }
    for (var i = 0; i < hits.length; i++) {
        var object = hits[i]
        if (!contains(array, object[3])) {
            hits[i][1] = 0;
        }
    }
    for (var i = 0; i < lines.length; i++) {
        var object = lines[i]
        if (!contains(array, object[3])) {
            lines[i][2] = 0;
        }
    }
    for (var i = 0; i < pmolotov.length; i++) {
        var object = pmolotov[i]
        if (!contains(array, object[3])) {
            pmolotov[i][2] = 1;
            pmolotov[i][1] = -5;
        }
    }
}

function draw_warning(xzy) {
    var circle_color = UI.GetColor("Script items", "[GWarn] Circle color")
    const draw_ind = function(x, y, alpha, str, oof, xzy) {
        Render.FilledCircle(x, y, oof ? (18 + Globals.Tickcount() / 7 % 5) : 20, [20, 20, 20, 175])
        Render.Circle(x, y, oof ? (18 + Globals.Tickcount() / 7 % 5) : 19, [232, 232, 232, 200])
        Render.String(x-4.9, y-18.6, 0, str, [255, 250, 175, 200], 4)
    }
    var x = Render.WorldToScreen(xzy[0])[0]
    var y = Render.WorldToScreen(xzy[0])[1]
    var str = xzy[2] ? "!" : "!";
    var alpha = (xzy[1] - Globals.Tickcount()) * 2
    if (alpha < 1)
        return;
    size = Render.GetScreenSize()


    if (x < 0 || x > size[0] || y > size[1] || y < 0) {
        var yaw = (Local.GetViewAngles()[1])
            var myorig = Entity.GetRenderOrigin(Entity.GetLocalPlayer())
            var orig = xzy[0]
            var x = orig[0] - myorig[0]
            var z = orig[1] - myorig[1]
            var atan = Math.atan2(z, x)
            var deg = atan * (180 / Math.PI);
            deg -= yaw + 90;
            atan = deg / 180 * Math.PI;
            var cos = Math.cos(atan) * -1
            var sin = Math.sin(atan)
            draw_ind(size[0] / 2 + cos * 150, size[1] / 2 + sin * 150, 255, str, true, xzy[0])
    } else {
        draw_ind(x, y, 255, str, false, xzy[0])
    }
}
/* ui init */

UI.AddSliderFloat("", 0, 0)
UI.AddCheckbox("Quick peek")
UI.AddColorPicker("Quick peek fill color")
UI.AddColorPicker("Quick peek outline color")
UI.AddHotkey("Quick peek hotkey")
UI.AddSliderInt("Radius", 5, 20)

/* variables */
var pi = 3.141592653589793;
var state = [
    false, // moving
    false, // in air
    false, // has shot
    false // has to move
]
var saved_pos = Entity.GetLocalPlayer() != null && Entity.IsAlive(Entity.GetLocalPlayer()) && Entity.GetRenderOrigin(Entity.GetLocalPlayer()) || [0, 0, 0];
var latest_velocity = 0;
var timer = Globals.Realtime()+1.5

/* functions */
function d2r(num) { return num*(pi/180) }
function draw_circle_3d(x, y, z, radius, degrees, start_at, clr, filled, fill_clr) {
    var accuracy = 8;
    var old_x, old_y;
    degrees = degrees < 361 && degrees || 360; degrees = degrees > -1 && degrees || 0
    start_at = start_at+1
    for (rot=start_at; rot < degrees+start_at+1; rot+=start_at*accuracy) {
        rot_r = d2r(rot)
        line_x = radius * Math.cos(rot_r) + x, line_y = radius * Math.sin(rot_r) + y
        var curr = Render.WorldToScreen([line_x, line_y, z]), cur = Render.WorldToScreen([x, y, z]);
        if (cur[0] != null && curr[0] != null && old_x != null) {
            if (filled)
                Render.Polygon([ [curr[0], curr[1]], [old_x, old_y], [cur[0], cur[1]] ], fill_clr)
            Render.Line(curr[0], curr[1], old_x, old_y, clr)
        }
        old_x = curr[0], old_y = curr[1];
    }
}
function go_to(goal) {
    var local = Entity.GetLocalPlayer();
    if (local == null || !Entity.IsAlive(local)) return;

    var pos = Entity.GetRenderOrigin(local);
    var viewAngles = Local.GetViewAngles();
    var moveTo_x = pos[0] - goal[0], moveTo_y = pos[1] - goal[1];
    var tv_x = moveTo_x * Math.cos(viewAngles[1] / 180 * pi) + moveTo_y * Math.sin(viewAngles[1] / 180 * pi), tv_y = moveTo_y * Math.cos(viewAngles[1] / 180 * pi) - moveTo_x * Math.sin(viewAngles[1] / 180 * pi);
    UserCMD.SetMovement([-tv_x*20, tv_y*20, 0]);
}
function get_velocity(ent) {
    var velocity = Entity.GetProp(ent, "CBasePlayer", "m_vecVelocity[0]");
    return Math.sqrt(velocity[0] * velocity[0] + velocity[1] * velocity[1]);
}

/* callbacks */
function on_paint() {
    var local = Entity.GetLocalPlayer();
    if (local == null || !Entity.IsAlive(local) || !UI.GetValue("Misc", "Quick peek")) return;
    var pos = Entity.GetRenderOrigin(local);
    var distance_x = Math.floor(pos[0]-saved_pos[0]), distance_y = Math.floor(pos[1]-saved_pos[1]), distance = distance_x+distance_y;
    var flags = Entity.GetProp(local, "CBasePlayer", "m_fFlags");
    var color = UI.GetColor("Misc", "Quick peek outline color"), color2 = UI.GetColor("Misc", "Quick peek fill color");
    if (distance_x > 700 || distance_x < -700 || distance_y > 700 || distance_y < -700) {
        if (!state[1])
            saved_pos[0] = pos[0], saved_pos[1] = pos[1], saved_pos[2] = pos[2]
    }

    state[1] = flags == 256
    state[0] = Input.IsKeyPressed(0x57) /*W is held*/ || Input.IsKeyPressed(0x41) /*A is held*/ || Input.IsKeyPressed(0x53) /*S is held*/ || Input.IsKeyPressed(0x44) /*D is held*/
    state[3] = !state[0] && !state[1]
    if (state[2] && latest_velocity > 6) state[3] = true
    if (timer < Globals.Realtime()) {
        timer = timer+1.2
        latest_velocity = Math.floor(get_velocity(local))
    }

    if (UI.IsHotkeyActive("Misc", "Quick peek hotkey")) {
        draw_circle_3d(saved_pos[0], saved_pos[1], saved_pos[2], UI.GetValue("Misc", "Radius"), 360, 0, color, true, color2);
    } else {
        saved_pos[0] = pos[0], saved_pos[1] = pos[1], saved_pos[2] = pos[2]
    }
    if (state[3]) {
        if (Math.floor(pos[0]) == Math.floor(saved_pos[0]) && Math.floor(pos[1]) == Math.floor(saved_pos[1]) || distance_x > -8 && distance_x < 8 && distance_y > -8 && distance_y < 8) {
            state[3] = false
            state[2] = false
        }
    }
}
function on_fire() {
    if (Entity.GetEntityFromUserID(Event.GetString("userid")) == Entity.GetLocalPlayer())
        state[2] = true
}
function on_createmove() {
    if (state[3] && UI.GetValue("Misc", "Quick peek"))
        go_to(saved_pos);
}
Cheat.RegisterCallback("CreateMove", "on_createmove")
Cheat.RegisterCallback("Draw", "on_paint")
Cheat.RegisterCallback("weapon_fire", "on_fire")
UI.AddLabel("----------Created--by--oXEKo----------")
UI.AddHotkey("Auto peek key")
UI.AddColorPicker("Auto peek active glow color")
UI.AddColorPicker("Auto peek pasive glow color")
UI.AddSliderFloat( "Glow radius", 0.0, 25.0 )
UI.AddSliderFloat( "Detalization glow", 0.0, 0.9 )
UI.AddSliderInt( "Polygon count", 11, 180)

function draw_circle_3d(x, y, z, start_at, color1, v1, autopeekactive, color2) {
    
    var detalization = 1 - UI.GetValue("Script items", "Detalization glow")
    var Polygoncount = UI.GetValue("Script items", "Polygon count")
    
    const v2 = color1[3] / v1
    const v3 = color2[3] / v1
    
    var ra = 0.0
    var accuracy = 10
    var old_x
    var old_y
    start_at = start_at + 1
    for (; ra <= v1; ra += detalization) {
        for (rot=start_at; rot < 360 + start_at + 1; rot+=accuracy) {
            rot_r = rot * (Math.PI / Polygoncount)
            line_x = ra * Math.cos(rot_r) + x
            line_y = ra * Math.sin(rot_r) + y
            var curr = Render.WorldToScreen([line_x, line_y, z])
            var cur = Render.WorldToScreen([x, y, z]);
            if (cur[0] != null && curr[0] != null && old_x != null) {
                if(!autopeekactive)
                    Render.Polygon([ [curr[0], curr[1]], [old_x, old_y], [cur[0], cur[1]] ], [color2[0], color2[1], color2[2], color2[3] - v3 * ra])
                else
                    Render.Polygon([ [curr[0], curr[1]], [old_x, old_y], [cur[0], cur[1]] ], [color1[0], color1[1], color1[2], color1[3] - v2 * ra])
            }
            old_x = curr[0], old_y = curr[1];
        }
    }
}

var active = false

function on_fire(){
    if (Entity.GetEntityFromUserID(Event.GetString("userid")) == Entity.GetLocalPlayer()){
        active = true
    }
}

Cheat.RegisterCallback("weapon_fire", "on_fire")

function drawglow() {
    
    if(!Entity.IsAlive(Entity.GetLocalPlayer()))
        return
    
    var color1 = UI.GetColor("Script items", "Auto peek active glow color")
    var color2 = UI.GetColor("Script items", "Auto peek pasive glow color")
    var radius = UI.GetValue("Script items", "Glow radius")
    var velocity = Entity.GetProp(Entity.GetLocalPlayer(), "CBasePlayer", "m_vecVelocity[0]")
    var speed = Math.sqrt(velocity[0] * velocity[0] + velocity[1] * velocity[1] + velocity[2] * velocity[2])
    var localorigin = Entity.GetRenderOrigin( Entity.GetLocalPlayer( ) );
    
    if(UI.IsHotkeyActive("Script items", "Auto peek key")){
        
        if(active && canstop(localorigin[0] ,local_origin[0], localorigin[1] ,local_origin[1]))
            active = false
        
        draw_circle_3d(local_origin[0], local_origin[1], local_origin[2], 0.150, color1, radius, active, color2)
        
    }
    else{
        local_origin = Entity.GetRenderOrigin( Entity.GetLocalPlayer( ) );
        active = false
    }
}

Global.RegisterCallback("Draw", "drawglow");


function CreateMove() {
    
    if(!Entity.IsAlive(Entity.GetLocalPlayer()))
        return
    
    if(active)
        move_to_start(local_origin)
}

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

function move_to_start(destination, a) {
    var local = Entity.GetLocalPlayer()
    var origin = Entity.GetRenderOrigin(local)
    origin[2] = Entity.GetEyePosition(local)[2]
    var delta = [destination[0] - origin[0], destination[1] - origin[1], destination[2] - origin[2]]
    var yaw = Local.GetViewAngles()[1]
    var cmdMove = []

    var speed = 14

    cmdMove[0] = (((Math.sin(yaw / 180 * Math.PI)) * delta[1]) + (Math.cos(yaw / 180 * Math.PI) * delta[0])) * 14
    cmdMove[1] = (((Math.sin(yaw / 180 * Math.PI)) * delta[0]) + (Math.cos(yaw / 180 * Math.PI) * -delta[1])) * 14
    cmdMove[2] = 0

    var length = Math.sqrt(delta[0] * delta[0] + delta[1] * delta[1] + delta[2] * delta[2])
    var velo = Entity.GetProp(local, "DT_CSPlayer", "m_vecVelocity[0]")
    var length2 = Math.sqrt(velo[0] * velo[0] + velo[1] * velo[1] + velo[2] * velo[2])

    UserCMD.SetMovement(cmdMove);
    return length < (a ? a : 1) && (length2 < 2 || a);
}

function canstop(x_from, x_to, y_from, y_to){
    
    var x_radius = Math.floor(x_from) - Math.floor(x_to) < 0 ? Math.floor(x_from) - Math.floor(x_to) * -1 : Math.floor(x_from) - Math.floor(x_to)
    var y_radius = Math.floor(y_from) - Math.floor(y_to) < 0 ? Math.floor(y_from) - Math.floor(y_to) * -1 : Math.floor(y_from) - Math.floor(y_to)   
    
    if(x_radius < 2 && y_radius < 2)
        return true
    else
        return false
}
function HSVtoRGB(h, s, v) { // i dont know who this belongs to but whoever it is i credit you :D
    var r, g, b, i, f, p, q, t;
    if (arguments.length === 1) {
        s = h.s, v = h.v, h = h.h;
    }
    i = Math.floor(h * 6);
    f = h * 6 - i;
    p = v * (1 - s);
    q = v * (1 - f * s);
    t = v * (1 - (1 - f) * s);
    switch (i % 6) {
        case 0: r = v, g = t, b = p; break;
        case 1: r = q, g = v, b = p; break;
        case 2: r = p, g = v, b = t; break;
        case 3: r = p, g = q, b = v; break;
        case 4: r = t, g = p, b = v; break;
        case 5: r = v, g = p, b = q; break;
    }
    return {
        r: Math.round(r * 255),
        g: Math.round(g * 255),
        b: Math.round(b * 255)
    };
}
function draw(){
    var local = Entity.GetLocalPlayer();
    if(!local || !Entity.IsValid(local)) return;
    var rgb = HSVtoRGB(Global.Tickcount() % 350 / 350,1,1);
    var screensize = Global.GetScreenSize();
    Render.FilledRect(0,0,screensize[0],2,[rgb.r,rgb.g,rgb.b,255])
}Global.RegisterCallback("Draw", "draw");


var local = Entity.GetLocalPlayer();
var shot_time = 0;
var stuck_time = 0;
UI.AddHotkey("Enable Auto Walk");

function draw()
{
    if (!Entity.IsAlive(local) || World.GetMapName() == "")
        return;
    if (!UI.IsHotkeyActive("Script items", "Enable Auto Walk"))
        return;
    eyeAngles = Local.GetViewAngles();
    origin = Entity.GetProp(local, "CBasePlayer", "m_vecOrigin");
    offset = Entity.GetProp(local, "CBasePlayer", "m_vecViewOffset[2]");
    head = vector_add(origin, [0, 0, offset[0]]);
    e_V = angle_to_vec(eyeAngles[0], eyeAngles[1]);
    stop_feet = [head[0] + e_V[0] * 50, head[1] + e_V[1] * 50, origin[2]];
    stop = [head[0] + e_V[0] * 50, head[1] + e_V[1] * 50, head[2] + e_V[2] * 50];
    world = Render.WorldToScreen(head);
    world_stop_feet = Render.WorldToScreen(stop_feet);
    Render.Line(world[0], world[1], world_stop_feet[0], world_stop_feet[1], [255, 255, 255, 255]);
    Render.Circle(world[0], world[1], 5, [255, 255, 255, 255]);
}

function move()
{
    scoped = Entity.GetProp(local, "CCSPlayer", "m_bIsScoped");
    if (!Entity.IsAlive(local) || World.GetMapName() == "")
        return;
    if (!UI.IsHotkeyActive("Script items", "Enable Auto Walk"))
        return;
    if (Globals.Curtime() - shot_time > 1 && !scoped)
    {
        shot_time = 0;
    }
    else
    {
        UserCMD.SetMovement([40, 0, 0]);
        return;
    }
    eyeAngles = Local.GetViewAngles();
    origin = Entity.GetProp(local, "CBasePlayer", "m_vecOrigin");
    offset = Entity.GetProp(local, "CBasePlayer", "m_vecViewOffset[2]");
    flags = Entity.GetProp(local, "CBasePlayer", "m_fFlags");
    head = vector_add(origin, [0, 0, offset[0]]);
    e_V = angle_to_vec(eyeAngles[0], eyeAngles[1]);
    e_V_right = angle_to_vec(eyeAngles[0], eyeAngles[1] + 90);
    e_V_left = angle_to_vec(eyeAngles[0], eyeAngles[1] - 90);
    stop_feet = [head[0] + e_V[0] * 80, head[1] + e_V[1] * 80, origin[2]];
    stop = [head[0] + e_V[0] * 80, head[1] + e_V[1] * 80, (head[2] + 20) + e_V[2] * 100];
    stop_left = [head[0] + e_V_left[0] * 8192, head[1] + e_V_left[1] * 8192, head[2] + e_V_left[2] * 8192];
    stop_right = [head[0] + e_V_right[0] * 8192, head[1] + e_V_right[1] * 8192, head[2] + e_V_right[2] * 8192];
    trace_feet = Trace.Line(local, head, stop_feet);
    trace_straight = Trace.Line(local, head, stop);
    trace_left = Trace.Line(local, head, stop_left);
    trace_right = Trace.Line(local, head, stop_right);
    angles = Local.GetViewAngles();
    UserCMD.SetMovement([450, 0, 0]);
    velocity = Entity.GetProp(local, "CBasePlayer", "m_vecVelocity[0]");
    speed = Math.sqrt(velocity[0] * velocity[0] + velocity[1] * velocity[1]);
    if (trace_straight[1] < 1 && trace_feet[1] == 1)
    {
        UserCMD.ForceCrouch();
        return;
    }
    if (flags == 263)
        return;
    rand = Math.random() * 180;
    if (speed < 25 && Globals.Tickcount() - stuck_time > 4)
    {
        stuck_time = Globals.Tickcount();
        if (trace_left[1] < trace_right[1])
        {
            UserCMD.SetAngles([angles[0], -rand * angles[1], angles[2]]);
            UserCMD.SetMovement([-450, 450, 0]);
        }
        else
        {
            UserCMD.SetAngles([angles[0], rand * angles[1], angles[2]]);
            UserCMD.SetMovement([-450, -450, 0]);
        }
        UserCMD.ForceJump();
    }
    if (trace_straight[1] < .9)
    {
        if (trace_left[1] < trace_right[1])
        {
            UserCMD.SetMovement([0, -450, 450]);
            UserCMD.SetAngles([angles[0], angles[1] + 5, angles[2]]);
        }
        else
        {
            UserCMD.SetAngles([angles[0], angles[1] - 5, angles[2]]);
            UserCMD.SetMovement([0, 450, 450]);
        }
    }
    if (trace_feet[1] < .7)
    {
        UserCMD.ForceJump();
        UserCMD.ForceCrouch();
    }
}

function on_shot()
{
    if (Entity.IsLocalPlayer(Entity.GetEntityFromUserID(Event.GetInt("userid"))))
    {
        shot_time = Globals.Curtime();
    }
}

function degreesToRadians(degress)
{
    return degress * Math.PI / 180.0;
}

function angle_to_vec(pitch, yaw)
{
    var p = degreesToRadians(pitch);
    var y = degreesToRadians(yaw)
    var sin_p = Math.sin(p);
    var cos_p = Math.cos(p);
    var sin_y = Math.sin(y);
    var cos_y = Math.cos(y);
    return [cos_p * cos_y, cos_p * sin_y, -sin_p];
}

function vector_add(vec, vec2)
{
    newVec = [
        vec[0] + vec2[0],
        vec[1] + vec2[1],
        vec[2] + vec2[2]
    ]
    return newVec;
}
Cheat.RegisterCallback("Draw", "draw");
Cheat.RegisterCallback("weapon_fire", "on_shot");
Cheat.RegisterCallback("CreateMove", "move");
Cheat.RegisterCallback("CreateMove", "aaLoop");

//JS MADE BY FATAL WIT <3

multiplierOptions = [-2, -1, 1, 2];

function aaLoop()
{
    AntiAim.SetOverride(1);
    AntiAim.SetFakeOffset(getRandomIntInclusive(20, 40));
    AntiAim.SetRealOffset(getRandomIntInclusive(30, 50) * multiplierOptions[getRandomIntInclusive(0, multiplierOptions.length)]);
}



function getRandomIntInclusive(min, max)
{
    min = Math.ceil(min);
    max = Math.floor(max);
    return Math.floor(Math.random() * (max - min + 1)) + min; //The maximum is inclusive and the minimum is inclusive
}
/*
 * Made by b1g UIDer exnull
 * You can take code from this script but mention me please.
 * Still in development!
 * 574265328bc422cdecaafe191bc16a785afe831a8c669de388b389e2cdf0f5ea
 * 5e5a67e79d277bb8b0f5ffac2a90ceded134c9e08fa5fd6739c2fb12bf780849
 * null#7403
 */

var hentaiScripts = {
    colorHelper: {
        getColor(r, g, b) {
            return [r, g, b, 255];
        },

        getColorAlpha(r, g, b, a) {
            var alpha = 255 * a;

            if(alpha < 0) {
                alpha = 0;
            } else if(alpha > 255) {
                alpha = 255;
            }

            return [r, g, b, alpha];
        }
    },

    ui: {
        GetValue(uiItem) {
            return UI.GetString.apply(this, uiItem);
        },

        GetChecked(uiCheckbox) {
            return UI.GetString.apply(this, uiCheckbox) == "true";
        }
    },

    featureManager: {
        featureList: [],

        createEmptyCallback() {
            return {
                callback: function() {}
            }
        },

        createTimedCallback(realCallback, interval) {
            return {
                lastExecution: 0,
                interval: interval,

                callback: function() {
                    var currTime =  Globals.Realtime();
                    var timeSinceLastExecution = currTime - this.lastExecution;
                    
                    if(timeSinceLastExecution > interval) {
                        this.lastExecution = currTime;
                        realCallback();
                    }
                },

                realCallback: realCallback
            };
        },

        createFeature(name) {
            var feature = {
                name: name,

                /* ui elements initialization */

                createUiElements: function() {},

                /* callbacks */

                onCreateMove: this.createEmptyCallback(),
                onDraw: this.createEmptyCallback(),
                onFSN: this.createEmptyCallback()
            };

            this.featureList.push(feature);
            return feature;
        }
    },

    entryPoint() {
        this.printLogo();
        this.createUI();
        this.registerCallbacks();
    },

    isInGame() {
        return World.GetServerString().length > 0;
    },

    printLogo() {
        var wtfIsThatBro = [
            "\n",
            "   __ __         __       _ ____        _      __    \n",
            "  / // /__ ___  / /____ _(_) __/_______(_)__  / /____\n",
            " / _  / -_) _ \\/ __/ _ `/ /\\ \\/ __/ __/ / _ \\/ __(_-<\n",
            "/_//_/\\__/_//_/\\__/\\_,_/_/___/\\__/_/ /_/ .__/\\__/___/\n",
            "                                      /_/            \n",
            "\n"];
        
        var color = this.colorHelper.getColor(255, 0, 0);

        for(var i = 0; i < wtfIsThatBro.length; i++) {
            Cheat.PrintColor(color, wtfIsThatBro[i]);
        }

        Cheat.PrintColor(this.colorHelper.getColor(56, 242, 245), "Thank you for using my script <3\n\n");

        if(this.isInGame()) {
            Cheat.PrintChat(" \x02[bloodsync] \x0CThank you for using my script <3");
        }
    },

    createUI() {
        UI.AddLabel("====== bloodsync ======");
        UI.AddLabel("Need anything? hvhforgame#3204");
        UI.AddSliderFloat("", 0, 0);

        this.featureManager.featureList.forEach(function(feature) {
            UI.AddLabel(feature.name);
            feature.createUiElements();
            UI.AddSliderFloat("", 0, 0);
        });

        UI.AddSliderFloat("", 0, 0);
        UI.AddLabel("======================");
    },

    registerCallbacks() {
        Cheat.RegisterCallback("CreateMove", "onCreateMove");
        Cheat.RegisterCallback("Draw", "onDraw");
        Cheat.RegisterCallback("FrameStageNotify", "onFSN");
    },

    onCreateMove() {
        this.featureManager.featureList.forEach(function(e) {
            e.onCreateMove.callback();
        });
    },

    onDraw() {
        this.featureManager.featureList.forEach(function(e) {
            e.onDraw.callback();
        });
    },

    onFSN() {
        this.featureManager.featureList.forEach(function(e) {
            e.onFSN.callback();
        });
    }
}

/* callback workaround, onetap can't find functions inside of the object and can't receive it by pass-by-reference */

function onCreateMove() {
    hentaiScripts.onCreateMove();
}

function onDraw() {
    hentaiScripts.onDraw();
}

function onFSN() {
    hentaiScripts.onFSN();
}

/* Features! */

var featureManager = hentaiScripts.featureManager;
var ui = hentaiScripts.ui;

// Custom clantag feature

(function() {
    var clantagFeature = featureManager.createFeature("Custom clantags");

    var wasEnabled;
    var ccCheckbox, ccTextBox, ccDropdown;

    var textModificators = {
        "CAPS toggle": {
            capsFlag: false,
            processText: function(text) {
                this.capsFlag = !this.capsFlag;
                
                if(this.capsFlag) {
                    // we need to add first space because CSGO wont change clantag (probably check if prev. is equals, ignoring case)
                    text = " " + text.toUpperCase();
                }

                return text;
            }
        },
        "Random numbers": {
            processText: function(text) {
                return Math.floor(Math.random() * 100000000000).toString(); // pseudorandom smh
            }
        },
        "911": {
            animation: [
                "____█_█",
                "✈___█_█",
                "_✈__█_█",
                "__✈_█_█",
                "___✈█_█",
                "_____☠_█",
                "____☠✈█",
                "____☠_☠"
            ],
            lastIndex: 0,
            processText: function(text) {
                this.lastIndex++;

                if(this.lastIndex > this.animation.length - 1) {
                    this.lastIndex = 0;
                }

                return this.animation[this.lastIndex];
            }
        },
        "Typewriter": {
            lastLength: 0,
            cursorBlink: false,
            processText: function(text) {
                this.lastLength++;

                if(this.lastLength > text.length) {
                    this.lastLength = 0;
                }

                var typedText = text.substr(0, this.lastLength);

                this.cursorBlink = !this.cursorBlink;

                if(this.cursorBlink) {
                    typedText += "|";
                }

                var processed = "[" + typedText + "]";
                return processed;
            }
        },
        "Prefix: warning": {
            processText: function(text) { return "⚠ " + text; }
        },
        "Prefix: lightning": {
            processText: function(text) { return "⚡ " + text; }
        },
        "Prefix: check": {
            processText: function(text) { return "✓ " + text; }
        },
        "Prefix: star": {
            processText: function(text) { return "★ " + text; }
        },
        "Prefix: skull": {
            processText: function(text) { return "☠ " + text; }
        },
        "Static: Onetap username": {
            processText: function(text) { return Cheat.GetUsername(); }
        },
        "Skull blink": {
            blink: false,
            processText: function(text) {
                this.blink = !this.blink;

                if(this.blink) {
                    text = "☠".repeat(text.length);
                }

                return text;
            }
        },
        "Hide name (break)": {
            processText: function(text) {
                return "\t\x0d";
            }
        },
        "Hide name (overflow)": {
            processText: function(text) {
                return "\t".repeat(15);
            }
        },
        "Hide name (newline)": {
            processText: function(text) {
                return "\n".repeat(15);
            }
        },
        "Custom name": {
            processText: function(text) {
                return text + "\n\n";
            }
        },
        "Random clantag": {
            // https://stackoverflow.com/a/1497512; too lazy to make my own
            generateRandomText: function() {
                var length = 15,
                    charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
                    retVal = "";
                for (var i = 0, n = charset.length; i < length; ++i) {
                    retVal += charset.charAt(Math.floor(Math.random() * n));
                }
                return retVal;
            },
            processText: function(text) {
                return this.generateRandomText();
            }
        },
        "Random name": {
            // TODO: remove repeating code?
            generateRandomText: function() {
                var length = 13,
                    charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
                    retVal = "";
                for (var i = 0, n = charset.length; i < length; ++i) {
                    retVal += charset.charAt(Math.floor(Math.random() * n));
                }
                return retVal;
            },
            processText: function(text) {
                return this.generateRandomText() + "\n\n";
            }
        },
        "Teammate namesteal": {
            lastIndex: 0,
            processText: function(text) {
                var localplayer = Entity.GetLocalPlayer();
                var players = Entity.GetTeammates();

                if(this.lastIndex > players.length - 1) {
                    this.lastIndex = 0;
                }

                var entId = players[this.lastIndex];

                if(entId == localplayer) {
                    this.lastIndex++;
                    entId = players[this.lastIndex];
                }

                var name = Entity.GetName(entId);
                var isBot = Entity.IsBot(entId);

                if(isBot) {
                    name = "BOT " + name;
                }

                this.lastIndex++;

                return name + "\n\n";
            }
        },
        "Enemy namesteal": {
            lastIndex: 0,
            processText: function(text) {
                var players = Entity.GetEnemies();

                if(this.lastIndex > players.length - 1) {
                    this.lastIndex = 0;
                }

                var entId = players[this.lastIndex];
                var name = Entity.GetName(entId);
                var isBot = Entity.IsBot(entId);

                if(isBot) {
                    name = "BOT " + name;
                }

                this.lastIndex++;

                return name + "\n\n";
            }
        }
    };

    clantagFeature.createUiElements = function() {
        ccCheckbox = UI.AddCheckbox("Enable custom clantag");
        ccTextBox = UI.AddTextbox("Custom clantag text");

        var textModificatorTypes = Object.getOwnPropertyNames(textModificators);

        ccDropdown = UI.AddDropdown("Custom clantag animation type", textModificatorTypes);
    };

    function clantagFeatureFrameStageNotify() {
        var customClantagEnabled = ui.GetChecked(ccCheckbox);

        if(!customClantagEnabled) {
            if(wasEnabled) {
                wasEnabled = false;
                Local.SetClanTag("");
            }

            return;
        }

        wasEnabled = true;

        var customText = ui.GetValue(ccTextBox);
        var textModificator = ui.GetValue(ccDropdown);

        var newText = textModificators[textModificator].processText(customText);

        Local.SetClanTag(newText);
    }

    clantagFeature.onDraw = featureManager.createTimedCallback(clantagFeatureFrameStageNotify, 0.5);
})();

// End of custom clantag feature

// Player revealer feature

(function() {
    var playerRevealer = featureManager.createFeature("Player revealer");

    var prCheckbox, prRevealFriendly, prRevealEnemy, prRevealSelf, prTeamChatOnly;
    var lastPlayerIndex = 0;

    playerRevealer.createUiElements = function() {
        prCheckbox = UI.AddCheckbox("Enable player revealer");

        prRevealFriendly = UI.AddCheckbox("Reveal friendly players");
        prRevealEnemy = UI.AddCheckbox("Reveal enemy players");
        prRevealSelf = UI.AddCheckbox("Reveal self");

        prTeamChatOnly = UI.AddCheckbox("Team chat only");
    };

    function clantagFeatureCreateMove() {
        var playerRevealerEnabled = ui.GetChecked(prCheckbox);

        if(!playerRevealerEnabled) {
            return;
        }

        var revealEnemies = ui.GetChecked(prRevealEnemy);
        var revealFriendly = ui.GetChecked(prRevealFriendly);
        var revealSelf = ui.GetChecked(prRevealSelf);

        if(!revealEnemies && !revealFriendly) {
            return;
        }

        var players;

        if(revealEnemies && revealFriendly) {
            players = Entity.GetPlayers();
        } else {
            players = revealFriendly ?
                            Entity.GetTeammates() :
                            Entity.GetEnemies();
        }

        if(!revealSelf) {
            var localplayer = Entity.GetLocalPlayer();
            var selfIndex = players.indexOf(localplayer);

            if (selfIndex != -1) {
                players.splice(selfIndex, 1);
            }
        }

        if(lastPlayerIndex > players.length - 1) {
            lastPlayerIndex = 0;
        }

        var player = players[lastPlayerIndex];

        while(!Entity.IsAlive(player)) {
            lastPlayerIndex++;

            if(lastPlayerIndex > players.length - 1) {
                return;
            }

            player = players[lastPlayerIndex];
        }

        lastPlayerIndex++;

        var name = Entity.GetName(player);
        var loc = Entity.GetProp(player, "CBasePlayer", "m_szLastPlaceName");
        var hp = Entity.GetProp(player, "CBasePlayer", "m_iHealth");

        var teamChatOnly = ui.GetChecked(prTeamChatOnly);
        var command = !teamChatOnly ? "say" : "say_team";

        Cheat.ExecuteCommand(command + " Player " + name + " is at " + loc + " with " + hp + "hp");
    }

    playerRevealer.onDraw = featureManager.createTimedCallback(clantagFeatureCreateMove, 1);
})();

// End of player revealer feature

hentaiScripts.entryPoint();
/**
 *
 * Title: Velocity indicator
 * Author: leed
 * Credits: ed for getVelocity function
 *
*/

var SCREEN_SIZE = Global.GetScreenSize()
var x = SCREEN_SIZE[0]
var y = SCREEN_SIZE[1]
var button = "[LEED] Show velocity"
var slider = "Height"

function getVelocity(index)
{
    players = Entity.GetPlayers();
    for (i=0; i < players.length; i++);
    {
        var velocity = Entity.GetProp( index, "CBasePlayer", "m_vecVelocity[0]" );
        var speed = Math.sqrt( velocity[0] * velocity[0] + velocity[1] * velocity[1] );
    }
    
    return speed;
}

function onGround(index)
{
    players = Entity.GetPlayers();
    for (i=0; i < players.length; i++);
    {
        var onground = Entity.GetProp( index, "CBasePlayer", "m_hGroundEntity" );
    }
    
    return onground;
}

function drawVelocity()
{
    if (UI.GetValue(button)) {
        var sint = UI.GetValue(slider);
        var lp = Entity.GetLocalPlayer();
        var velocity = Math.round(getVelocity(lp)).toString();
        var isonground = onGround(lp).toString();

        //Walk velocity
        if (!Global.IsKeyPressed(0x20)) {
            Render.String(x / 2 + 2, y / 2 + sint + 2, 0, velocity, [0, 0, 0, 255], 4)
            Render.String(x / 2, y / 2 + sint, 0, velocity, [108, 195, 18, 255], 4)
        }
        else {
            Render.String(x / 2 + 2, y / 2 + sint + 2, 0, "0", [0, 0, 0, 255], 4)
            Render.String(x / 2, y / 2 + sint, 0, "0", [108, 195, 18, 255], 4)
        }
        //in-air velocity
        if (Global.IsKeyPressed(0x20)) {
            Render.String(x / 2 + 2, y / 2 + sint + 2 - 30, 0, velocity, [0, 0, 0, 255], 4)
            Render.String(x / 2, y / 2 + sint - 30, 0, velocity, [245, 185, 66, 255], 4)
        }
        else {
            Render.String(x / 2 + 2, y / 2 + sint + 2 - 30, 0, "0", [0, 0, 0, 255], 4)
            Render.String(x / 2, y / 2 + sint - 30, 0, "0", [245, 185, 66, 255], 4)
        }
    }
}

UI.AddLabel("--------------------------------------");
UI.AddCheckbox(button);
UI.AddSliderInt(slider, 0, 1000)
UI.AddLabel("--------------------------------------");
Global.RegisterCallback("Draw", "drawVelocity");
var trails = [];

function rgb(speed) {
    var timer = Global.Tickcount();
    var result = [0, 0, 0, 255];

    result[0] = Math.floor(Math.sin(timer * speed + 0) * 127 + 128);
    result[1] = Math.floor(Math.sin(timer * speed + 2) * 127 + 128);
    result[2] = Math.floor(Math.sin(timer * speed + 4) * 127 + 128);
    return result;
}

function trail() {
    var localPlayer = Entity.GetLocalPlayer();
    if (Entity.IsValid(localPlayer)){
        var position = Entity.GetHitboxPosition(localPlayer, 6);
        if(Array.isArray(position)){
            trails.push({remove:Global.Tickcount() + UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Trail timer"), location:position});

            trails.forEach(function(x, y){
                var location = trails[y]["location"];
                var rainbow = rgb(UI.GetValue("Misc", "JAVASCRIPT", "Script items", "RGB Speed")/500);
                rainbow[3] = 50;
                if (!UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Trail RGB")) {
                    var color = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Trail color");
                    rainbow = color;
                }
                var position = Render.WorldToScreen([location[0], location[1], location[2]-50.0]);
                Render.FilledRect(position[0], position[1], 15, 15, rainbow);

                var time = Global.Tickcount();
                if (trails[y]["remove"] <= time){
                    trails.splice(y, 1);
                }
            })
        }
    }
}

function init(){
    Global.RegisterCallback("Draw", "trail");
    UI.AddCheckbox('Trail RGB');
    UI.AddSliderInt("RGB Speed", 1, 100);
    UI.AddColorPicker("Trail color");
    UI.AddSliderInt("Trail timer", 1, 500);

}

init();
var grenades = [];

UI.AddSliderInt("Trail Length", 16, 512);
UI.AddSliderFloat("Position Refresh Rate", 0, 1);
UI.AddCheckbox("Nade Circle");
UI.AddColorPicker("Trail Color");
UI.AddColorPicker("Circle Color");

function importGrenades() {
    base_nades = Entity.GetEntitiesByClassID(9).concat(Entity.GetEntitiesByClassID(156)).concat(Entity.GetEntitiesByClassID(48));
    for (e in base_nades) {
        pass = false;
        for (g in grenades) {
            if (grenades[g][0] == base_nades[e]) {
                pass = true;
                continue;
            }
        }
        if (pass)
            continue;

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

function renderTrails() {
    length = UI.GetValue("Script items", "Trail Length");
    rate = UI.GetValue("Script items", "Position Refresh Rate");
    t_color = UI.GetColor("Script items", "Trail Color");
    c_color = UI.GetColor("Script items", "Circle Color");

    for (g in grenades) {
        if (Globals.Curtime() - grenades[g][3] > 3 || !Entity.IsValid(grenades[g][0])) {
            grenades.shift();
            continue;
        }

        if (Globals.Curtime() - grenades[g][1] > rate) {
            if (grenades[g][2].length > length) {
                grenades[g][2].shift();
                grenades[g][1] = Globals.Curtime();
            }

            grenades[g][2].push(Entity.GetRenderOrigin(grenades[g][0]));
        }

        for (l in grenades[g][2]) {
            world = Render.WorldToScreen(grenades[g][2][l]);
            if (l > 0) {
                world_last = Render.WorldToScreen(grenades[g][2][l - 1]);
                Render.Line(world[0], world[1], world_last[0], world_last[1], t_color);
            }

            world_last = Render.WorldToScreen(grenades[g][2][grenades[g][2].length - 1]);

            if (UI.GetValue("Script items", "Nade Circle"))
                Render.FilledCircle(world_last[0], world_last[1], 5, c_color);

        }
    }
}

Cheat.RegisterCallback("Draw", "renderTrails");
Cheat.RegisterCallback("Draw", "importGrenades");
UI.AddCheckbox( "Wait for on shot" );
UI.AddCheckbox( "Wait for on shot indicator" );
UI.AddHotkey( "Wait for on shot key" );
var last_shot_time = []
function on_draw()
{
  if(!UI.GetValue("Misc", "Wait for on shot") || !UI.IsHotkeyActive("Misc","Wait for on shot key") || !UI.GetValue("Misc","Wait for on shot indicator" )) return;

  var font = Render.AddFont("Verdana Bold",18,800);
  Render.StringCustom(55,600,1,"ONSHOT",[0,255,0,255],font);
}
function on_create_move()
{
  if(!UI.GetValue("Misc", "Wait for on shot") || !UI.IsHotkeyActive("Misc","Wait for on shot key")) return;

  var local = Entity.GetLocalPlayer( );
  if(!Entity.IsAlive(local)) return;
  var enemies = Entity.GetEnemies();

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

}
function on_weapon_fire()
{
  var shooter = Entity.GetEntityFromUserID(Event.GetInt("userid"));
  last_shot_time[shooter] = Globals.Tickcount();
}

function on_player_connect()
{
  var entity = Entity.GetEntityFromUserID(Event.GetInt("userid"));
  if(entity == Entity.GetLocalPlayer())
    last_shot_time = []
}


Cheat.RegisterCallback("weapon_fire", "on_weapon_fire")
Cheat.RegisterCallback("player_connect_full", "on_player_connect")
Cheat.RegisterCallback("CreateMove","on_create_move")
Cheat.RegisterCallback("Draw","on_draw")
UI.AddLabel("|--------------------------------------------|")
UI.AddLabel("This script gains the enemy's HP and,")
UI.AddLabel("following the received value,")
UI.AddLabel("set him at MinDMG for a Ragebot")
UI.AddLabel('target')
UI.AddLabel("|--------------------------------------------|")
UI.AddLabel("ATTENTION!")
UI.AddLabel("Works only with Autosniper!")
UI.AddLabel("Best used with DT")
UI.AddLabel("|--------------------------------------------|")

UI.AddCheckbox("Enable Two-Shot")



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



function main()
{
    var enemy = Ragebot.GetTarget();
    health = getPlayerHealth(enemy);

        if (!UI.GetValue("Script items", "Enable Two-Shot") == 1)
            return;

        if (!Entity.IsAlive(enemy))
            return;

        switch (health)
        {
            case health >= 80: Ragebot.ForceTargetMinimumDamage(enemy, 51); break;
            case health <= 79: Ragebot.ForceTargetMinimumDamage(enemy, 41); break;
            case health >= 40 && health <= 59: Ragebot.ForceTargetMinimumDamage(enemy, 31); break;
            case health >= 20 && health <= 39: Ragebot.ForceTargetMinimumDamage(enemy, 21); break;
        }
}


Cheat.RegisterCallback("CreateMove", "main")
UI.AddHotkey("Toggle better MinDamage");
UI.AddCheckbox("Always better MinDamage");
UI.AddSliderInt("Damage: Enemy HP > 80",0,130);
UI.AddSliderInt("Damage: Enemy HP > 60 & < 80",0,130);
UI.AddSliderInt("Damage: Enemy HP > 40 & < 60",0,130);
UI.AddSliderInt("Damage: Enemy HP > 20 & < 40",0,130);
var dehp80 = UI.GetValue("Script items", "Damage: Enemy HP > 80");
var dehp60 = UI.GetValue("Script items", "Damage: Enemy HP > 60 & < 80");
var dehp40 = UI.GetValue("Script items", "Damage: Enemy HP > 40 & < 60");
var dehp20 = UI.GetValue("Script items", "Damage: Enemy HP > 40 & < 60");



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



function main()
{
    localplayer_index = Entity.GetLocalPlayer();
    localplayer_weapon = Entity.GetWeapon(localplayer_index);
    weapon_name = Entity.GetName(localplayer_weapon);
    g_Local_classname = Entity.GetClassName(localplayer_weapon);
    
    if (UI.GetValue("Script items", "Always better MinDamage") == 1 || UI.isHotkeyActive("Script items", "Toggle better MinDamage") && (weapon_name == "desert eagle" || weapon_name == "g3sg1" || weapon_name == "scar 20"))

    { var enemy = Ragebot.GetTarget();

        if (UI.GetValue("Script items", "Always better MinDamage") != 1 || !UI.isHotkeyActive("Script items", "Toggle better MinDamage"))
            return;
        
        if (!Entity.IsAlive(enemy))
            return;
        
        switch (health)
        {
            case health >= 80: Ragebot.ForceTargetMinimumDamage(enemy, dehp80); break;
            case health >= 60 && health <= 79: Ragebot.ForceTargetMinimumDamage(enemy, dehp60); break;
            case health >= 40 && health <= 59: Ragebot.ForceTargetMinimumDamage(enemy, dehp40); break;
            case health >= 20 && health <= 39: Ragebot.ForceTargetMinimumDamage(enemy, dehp20); break;
        }
    }
}


Cheat.RegisterCallback("CreateMove", "main");
 
Сверху Снизу