Arras.io - No Push

Latest version of No Push. KeyBind is customizable, but defaults to N

// ==UserScript==
// @name         Arras.io - No Push
// @author       ABC / Salt
// @namespace    a script that keeps you still
// @description  Latest version of No Push. KeyBind is customizable, but defaults to N
// @version      3.0.0
// @match        *://arras.io/*
// @match        *://arras.netlify.app/*
// @run-at       document-start
// @grant        unsafeWindow
// ==/UserScript==  

// Go to bottom of the script to see how to customize keybind.
// 
// Webpack Compiled Code
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var s=e[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(r,s,function(e){return t[e]}.bind(null,s));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e){let n=new Uint32Array(1),r=new Uint16Array(1),s=new Uint8Array(r.buffer),o=new Uint8Array(n.buffer),i=new Float32Array(n.buffer);t.exports={encode:function(t){let e=[],l=[],a=0,c=15,h=0;for(let n of t){let t=0;if(0===n||!1===n)t=0;else if(1===n||!0===n)t=1;else if("number"==typeof n)!Number.isInteger(n)||n<-4294967296||n>=4294967296?(t=8,a+=4):n>=0?n<256?(t=2,a++):n<65536?(t=4,a+=2):n<4294967296&&(t=6,a+=4):n>=-256?(t=3,a++):n>=-65536?(t=5,a+=2):n>=-4294967296&&(t=7,a+=4);else{if("string"!=typeof n)throw console.error("Unencodable data type",n),new Error("Unencodable data type");{let e=!1;for(let t=0;t<n.length;t++)if(n.charAt(t)>"ÿ")e=!0;else if("\0"===n.charAt(t))throw console.error("Null containing string",n),new Error("Null containing string");!e&&n.length<=1?(t=9,a++):e?(t=11,a+=2*n.length+2):(t=10,a+=n.length+1)}}if(e.push(t),t===c)h++;else{if(l.push(c),h>=1){for(;h>19;)l.push(14),l.push(15),h-=19;1===h?l.push(c):2===h?l.push(12):3===h?l.push(13):h<20&&(l.push(14),l.push(h-4))}h=0,c=t}}if(l.push(c),h>=1){for(;h>19;)l.push(14),l.push(15),h-=19;1===h?l.push(c):2===h?l.push(12):3===h?l.push(13):h<20&&(l.push(14),l.push(h-4))}l.push(15),l.length%2==1&&l.push(15);let u=new Uint8Array((l.length>>1)+a);for(let t=0;t<l.length;t+=2){let e=l[t],n=l[t+1];u[t>>1]=e<<4|n}let p=l.length>>1;for(let l=0;l<e.length;l++){let a=t[l];switch(e[l]){case 0:case 1:break;case 2:case 3:u[p++]=a;break;case 4:case 5:r[0]=a,u.set(s,p),p+=2;break;case 6:case 7:n[0]=a,u.set(o,p),p+=4;break;case 8:i[0]=a,u.set(o,p),p+=4;break;case 9:{let t=0===a.length?0:a.charCodeAt(0);u[p++]=t}break;case 10:for(let t=0;t<a.length;t++)u[p++]=a.charCodeAt(t);u[p++]=0;break;case 11:for(let t=0;t<a.length;t++){let e=a.charCodeAt(t);u[p++]=255&e,u[p++]=e>>8}u[p++]=0,u[p++]=0}}return u},decode:function(t){let e=new Uint8Array(t);if(e[0]>>4!=15)return null;let l=[],a=15,c=0,h=!0;for(;;){if(c>=e.length)return null;let t=e[c];if(h?(t&=15,c++):t>>=4,h=!h,12==(12&t)){if(15===t){h&&c++;break}let n=t-10;if(14===t){if(c>=e.length)return null;let t=e[c];h?(t&=15,c++):t>>=4,h=!h,n+=t}for(let t=0;t<n;t++)l.push(a)}else l.push(t),a=t}let u=[];for(let t of l)switch(t){case 0:u.push(0);break;case 1:u.push(1);break;case 2:u.push(e[c++]);break;case 3:u.push(e[c++]-256);break;case 4:s[0]=e[c++],s[1]=e[c++],u.push(r[0]);break;case 5:s[0]=e[c++],s[1]=e[c++],u.push(r[0]-65536);break;case 6:o[0]=e[c++],o[1]=e[c++],o[2]=e[c++],o[3]=e[c++],u.push(n[0]);break;case 7:o[0]=e[c++],o[1]=e[c++],o[2]=e[c++],o[3]=e[c++],u.push(n[0]-4294967296);break;case 8:o[0]=e[c++],o[1]=e[c++],o[2]=e[c++],o[3]=e[c++],u.push(i[0]);break;case 9:{let t=e[c++];u.push(0===t?"":String.fromCharCode(t))}break;case 10:{let t="",n=0;for(;n=e[c++];)t+=String.fromCharCode(n);u.push(t)}break;case 11:{let t="",n=0;for(;n=e[c++]|e[c++]<<8;)t+=String.fromCharCode(n);u.push(t)}}return u}}},function(t,e,n){const r=n(2),s=n(0),{UpdateParser:o}=n(3);unsafeWindow.AFKScript=class{constructor({keyBind:t,accuracy:e=40}){this.world=new o(!0),this.flag=0,this.socket={},this.mouse={x:0,y:0},this.afkSpot={x:0,y:0},this.active=!1,this.options={keyBind:t,accuracy:e},this._hook(),this._listen()}_hook(){let t=this;r((function(e){return t.socket!==this&&(t.socket=this),"u"===e[0]&&t.world.parseDecodedPacket(e),!1}),t=>{if("C"===t[0]){if(this.active)return this.react();this.mouse={x:t[1],y:t[2]},this.flag=112&t[3]}return!1})}_listen(){unsafeWindow.addEventListener("keyup",t=>{1===this.socket.readyState&&this.world&&this.world.camera&&null!==this.world.camera.x&&t.code==this.options.keyBind&&(this.afkSpot={x:this.world.camera.x,y:this.world.camera.y},this.active?this.active=!!clearInterval(this.active):this.active=setInterval(()=>{this.socket.send(s.encode(["C",0,0,0]))},20),this.notify(this.active?"Anti Push Activated":"Anti Push Deactivated"))})}notify(t="Don't check isTrusted lol"){1===this.socket.readyState&&this.socket.dispatchEvent(new MessageEvent("message",{data:s.encode(["m",t])}))}react(){if(!this.active||!this.world.camera||null===this.world.camera.x)return-1;const t=this.options.accuracy;let e=this.world.camera.x,n=this.world.camera.y,{mouse:r,flag:s}=this,o=e-this.afkSpot.x,i=n-this.afkSpot.y;return s|=i/t>1?1:i/t<-1?2:0,s|=o/t>1?4:o/t<-1?8:0,["C",r.x,r.y,s]}}},function(t,e,n){const r=n(0);t.exports=function(t,e){let n=null;unsafeWindow.WebSocket.prototype.send=new Proxy(unsafeWindow.WebSocket.prototype.send,{apply(s,o,[i]){o!==n&&(n=o,o.addEventListener("message",({data:e})=>t.call(o,r.decode(new Uint8Array(e)))));const l=e.call(o,r.decode(i));if(-1!==l)return l?s.call(o,r.encode(l)):s.call(o,i)},get(t,e){const n=t[e];return"function"==typeof n&&(n=n.bind(t)),n},set:(t,e,n)=>("function"==typeof n&&(n=n.bind(t)),t[e]=n)})}},function(t,e){t.exports={UpdateParser:class{constructor(t=!1){this.entitiesDisabled=t,this.rightNow=Date.now(),this.camera={x:null,y:null,setFov:null,vx:null,vy:null},this.player={fps:1,body:{label:0,color:0,id:0},score:0,points:0,upgrades:[],statsdata:[],skills:0,accel:0,top:0,party:0},this.entities=[]}parseDecodedPacket(t){let e=t;if("R"==e[0])return void(this.roomStart=e[4]);if("u"!=e[0])throw new TypeError("Invalid packet header; expected packet 'u'");e=e.filter((t,e)=>e),this.control=function(t){let e=0;return{get:e=>t[e],set:(e,n)=>t[e]=n,next(){let n=t[e];return e++,n}}}(e),this.rightNow=this.control.next(),this.camera={x:this.control.next(),y:this.control.next(),setFov:this.control.next(),vx:this.control.next(),vy:this.control.next()};let n=this.control.next();if(1&n&&(this.player.fps=this.control.next()),2&n&&(this.player.body={type:this.control.next(),color:this.control.next(),id:this.control.next()}),4&n&&(this.player.score=this.control.next()),8&n&&(this.player.points=this.control.next()),16&n){let t=this.control.next();this.player.upgrades=[];for(let e=0;e<t;e++)this.player.upgrades.push(this.control.next())}if(32&n){this.player.statsdata=[];for(let t=0;t<30;t++)this.player.statsdata.push(this.control.next())}64&n&&(this.player.skills=this.control.next()),128&n&&(this.player.accel=this.control.next()),256&n&&(this.player.topSpeed=this.control.next()),512&n&&(this.player.partyId=this.control.next());let r=this.control.next(),s=[];if(this.entitiesInView=r,this.entitiesDisabled)return t;for(let t=0;t<r;t++){let t=this.extractEntity();this.entities.map(t=>t.id).indexOf(t.id)>=0&&(t.new=null),this.entities.map(t=>t.id).indexOf(t.id)<0&&(t.new=!0),s.push(t)}return this.entities=s,this}extractEntity(){let t={};if(t.type=this.control.next(),1&t.type)t.facing=this.control.next(),t.layer=this.control.next();else{t.id=this.control.next(),t.index=this.control.next(),t.x=this.control.next(),t.y=this.control.next(),t.vx=this.control.next(),t.vy=this.control.next(),t.size=this.control.next(),t.facing=this.control.next(),t.vfacing=this.control.next(),t.twiggle=this.control.next(),t.layer=this.control.next(),t.color=this.control.next(),t.health=this.control.next()/255;let e=this.control.next();t.shield=e<0?NaN:e/255,t.alpha=this.control.next()/255,4&t.type&&(t.name=this.control.next(),t.score=this.control.next())}let e=this.control.next(),n=[];for(let t=0;t<e;t++)n.push({time:this.control.next(),power:this.control.next()});t.guns=n;let r=this.control.next(),s=[];for(let t=0;t<r;t++)s.push(this.extractEntity());return t.turrets=s,t}}}}]);



const AFKModule = new unsafeWindow.AFKScript({
  keyBind: 'KeyN'
  // change keyBind from N to K for ex would be:
  // keyBind: 'KeyK'
})