-
Notifications
You must be signed in to change notification settings - Fork 2
/
hack.min.js
1 lines (1 loc) · 7.48 KB
/
hack.min.js
1
function cripple_window(t){if(!t)return;let e=new Map(Object.entries({functions_to_hide:new WeakMap,strings_to_hide:[],hidden_globals:[],init:!1}));var n,o,a;t.top["ttap#4547"]?e=t.top["ttap#4547"]:(n=t.top,o="ttap#4547",a=e,e.get("hidden_globals").push(o),Object.defineProperty(n,o,{enumberable:!1,configurable:!1,writable:!0,value:a}));const w=t.Function.prototype.toString;let i=new Proxy(w,{apply:function(t,n,o){try{var a=Function.prototype.apply.apply(t,[n,o])}catch(t){throw t.stack=t.stack.replace(/\n.*Object\.apply \(<.*/,""),t}let w=e.get("functions_to_hide").get(n);if(w)return Function.prototype.apply.apply(t,[w,o]);for(var i=0;i<e.get("strings_to_hide").length;i++)a=a.replace(e.get("strings_to_hide")[i].from,e.get("strings_to_hide")[i].to);return a}});t.Function.prototype.toString=i;let l=function(t,n){e.get("functions_to_hide").set(n,t)};const r=t.Object.getOwnPropertyDescriptors;let c=new Proxy(r,{apply:function(t,n,o){try{var a=Function.prototype.apply.apply(t,[n,o])}catch(t){throw t.stack=t.stack.replace(/\n.*Object\.apply \(<.*/,""),t}for(var w=0;w<e.get("hidden_globals").length;w++)delete a[e.get("hidden_globals")[w]];return a}});t.Object.getOwnPropertyDescriptors=c;let s=function(){};const p=t.CanvasRenderingContext2D.prototype.clearRect;let h=new Proxy(p,{apply:function(t,e,n){try{var o=Function.prototype.apply.apply(t,[e,n])}catch(t){throw t.stack=t.stack.replace(/\n.*Object\.apply \(<.*/,""),t}return s(e),o}});t.CanvasRenderingContext2D.prototype.clearRect=h;const u=t.open;let y=new Proxy(u,{apply:function(t,e,n){try{Function.prototype.apply.apply(t,[e,n])}catch(t){throw t.stack=t.stack.replace(/\n.*Object\.apply \(<.*/,""),t}return null}});t.open=y,e.get("hrt")||e.set("hrt",function(t,n,o,a,w){let i=o.controls;i.scrollDelta&&(i.skipScroll=i.scrollToSwap,i.scrollToSwap||i.fakeKey(2e4,1)),i.scrollDelta=0,i.wSwap=0;const l=2*Math.PI;let r=function(e){return!t.team||e.team!=t.team},c=function(t){return(t%l+l)%l},p=function(t,e,n,o,a,w){let i=t-o,l=e-a,r=n-w;return Math.sqrt(i*i+l*l+r*r)},h=function(t,e,n){let o=c((a=i.object.position.z,w=i.object.position.x,r=n,s=t,Math.atan2(w-s,a-r)));var a,w,r,s;let h=function(t,e,n,o,a,w){let i=Math.abs(e-a),l=p(t,e,n,o,a,w);return Math.asin(i/l)*(e>a?-1:1)}(i.object.position.x,i.object.position.y,i.object.position.z,t,e,n),u=c(i.object.rotation.y),y=i[pchObjc].rotation.x,f=Math.min(Math.abs(o-u),Math.abs(o-u-l),Math.abs(o-u+l)),g=h-y;return Math.hypot(f,g)},u=function(t){return h(t.x3,t.y3+11-1.5-3*t.crouchVal,t.z3)},y=function(e){let n=function(e){return p(e.x3,e.y3,e.z3,t.x,t.y,t.z)}(e);return t.weapon.range>=n&&("Shotgun"!=t.weapon.name||n<70)&&("Akimbo Uzi"!=t.weapon.name||n<100)},f=null,g=1/0,m=o.players.list;for(var b=0;t.active&&b<m.length;b++){let e=m[b];if(e[isYou]||!e.active||!e[objInstances]||!r(e))continue;if(e.x3=e.x,e.y3=e.y,e.z3=e.z,!y(e)||(d=e,null!=o[canSee](t,d.x3,d.y3-3*d.crouchVal,d.z3)))continue;let n=u(e);n<g&&(g=n,f=e)}var d;let x=i.object.rotation.y,v=i[pchObjc].rotation.x;n[3]=+(v%l).toFixed(3),n[2]=+(x%l).toFixed(3),i.keys[i.reloadKey]=1*!(void 0===t.ammos[t.weaponIndex]||0!=t.ammos[t.weaponIndex]),n[7]=1*(i.keys[i.jumpKey]&&!t.didJump),e.get("init")||(e.set("init",!0),s=function(t){let e=arguments.callee.caller.caller.arguments[0],n=arguments.callee.caller.caller.arguments[2],a=t.canvas.width/e,w=t.canvas.height/e,i=n.camera.getWorldPosition();for(var l=0;l<o.players.list.length;l++){o.players.list[l];let e=m[l];if(e[isYou]||!e.active||!e[objInstances]||!r(e))continue;let u=1/0,y=-1/0,f=1/0,g=-1/0,b=!1;for(var c=-1;!b&&c<2;c+=2)for(var s=-1;!b&&s<2;s+=2)for(var h=0;!b&&h<2;h++){let t=e[objInstances].position.clone();if(t.x+=c*((5.2-.1)/2),t.z+=s*((5.2-.1)/2),t.y+=h*(11-3*e.crouchVal),!n.frustum.containsPoint(t)){b=!0;break}t.project(n.camera),u=Math.min(u,t.x),y=Math.max(y,t.x),f=Math.min(f,t.y),g=Math.max(g,t.y)}if(b)continue;u=(u+1)/2,f=(f+1)/2,y=(y+1)/2,g=(g+1)/2,t.save();const d=t.strokeStyle,x=t.lineWidth,v=t.font,j=t.fillStyle;t.lineWidth=5,t.strokeStyle="rgba(255,50,50,1)";let k=Math.max(.3,1-p(i.x,i.y,i.z,e.x,e.y,e.z)/600);t.scale(k,k);let _=a/k,S=w/k;t.beginPath(),f=S*(1-f),g=S*(1-g),u*=_,y*=_,t.moveTo(u,f),t.lineTo(u,g),t.lineTo(y,g),t.lineTo(y,f),t.lineTo(u,f),t.stroke(),t.fillStyle="rgba(255,50,50,1)";let M=g-f;t.fillRect(u-7,f,-10,M),t.fillStyle="#00FFFF",t.fillRect(u-7,f,-10,M*(e.health/e.maxHealth)),t.font="60px Sans-serif",t.fillStyle="white",t.strokeStyle="black",t.lineWidth=1;let F=y+7,T=g;if(t.fillText(e.name,F,T),t.strokeText(e.name,F,T),t.font="30px Sans-serif",T+=35,t.fillText(e.weapon.name,F,T),t.strokeText(e.weapon.name,F,T),T+=35,t.fillText(e.health+" HP",F,T),t.strokeText(e.health+" HP",F,T),t.strokeStyle=d,t.lineWidth=x,t.font=v,t.fillStyle=j,t.restore(),e.legMeshes[0]){let t=e.legMeshes[0].material;t.alphaTest=1,t.depthTest=!1,t.fog=!1,t.emissive.g=1,t.wireframe=!0}}})});const f={apply:function(n,o,a){try{var w=Function.prototype.apply.apply(n,[o,a])}catch(t){throw t.stack=t.stack.replace(/\n.*Object\.apply \(<.*/,""),t}if(2==a.length&&a[1].length>parseInt("1337 ttap#4547")){let s=a[1];const p=s.match(/\w+\['exports'\]=(0[xX][0-9a-fA-F]+);/)[1];"0x17e87"!==p&&(t[atob("ZG9jdW1lbnQ=")][atob("d3JpdGU=")](atob("VmVyc2lvbiBtaXNzbWF0Y2gg")+p),t[atob("bG9jYXRpb24=")][atob("aHJlZg==")]=atob("aHR0cHM6Ly9naXRodWIuY29tL2hydC93aGVlbGNoYWly")),window.canSee=s.match(/,this\['(\w+)'\]=function\(\w+,\w+,\w+,\w+,\w+\){if\(!\w+\)return!\w+;/)[1],window.pchObjc=s.match(/\(\w+,\w+,\w+\),this\['(\w+)'\]=new \w+\['\w+'\]\(\)/)[1],window.objInstances=s.match(/\[\w+\]\['\w+'\]=!\w+,this\['\w+'\]\[\w+\]\['\w+'\]&&\(this\['\w+'\]\[\w+\]\['(\w+)'\]\['\w+'\]=!\w+/)[1],window.isYou=s.match(/,this\['\w+'\]=!\w+,this\['\w+'\]=!\w+,this\['(\w+)'\]=\w+,this\['\w+'\]\['length'\]=\w+,this\[/)[1],window.recoilAnimY=s.match(/\w*1,this\['\w+'\]=\w*0,this\['\w+'\]=\w*0,this\['\w+'\]=\w*1,this\['\w+'\]=\w*1,this\['\w+'\]=\w*0,this\['\w+'\]=\w*0,this\['(\w+)'\]=\w*0,this\['\w+'\]=\w*0,this\['\w+'\]=\w*0,this\['\w+'\]=\w*0,/)[1],window.mouseDownL=s.match(/this\['\w+'\]=function\(\){this\['(\w+)'\]=\w*0,this\['(\w+)'\]=\w*0,this\['\w+'\]={}/)[1],window.mouseDownR=s.match(/this\['\w+'\]=function\(\){this\['(\w+)'\]=\w*0,this\['(\w+)'\]=\w*0,this\['\w+'\]={}/)[2];const h=s.match(/\(\w+,\w*1\)\),\w+\['\w+'\]=\w*0,\w+\['\w+'\]=\w*0,!(\w+)\['\w+'\]&&\w+\['\w+'\]\['push'\]\((\w+)\),(\w+)\['\w+'\]/)[2],u=s.match(/\(\w+,\w*1\)\),\w+\['\w+'\]=\w*0,\w+\['\w+'\]=\w*0,!(\w+)\['\w+'\]&&\w+\['\w+'\]\['push'\]\((\w+)\),(\w+)\['\w+'\]/)[1],y=s.match(/\w+\['\w+'\]\),\w+\['\w+'\]\(\w+\['\w+'\],\w+\['\w+'\]\+\w+\['\w+'\]\*(\w+)/)[1],f=s.match(/\(\w+,\w*1\)\),\w+\['\w+'\]=\w*0,\w+\['\w+'\]=\w*0,!(\w+)\['\w+'\]&&\w+\['\w+'\]\['push'\]\((\w+)\),(\w+)\['\w+'\]/)[3],g=s.match(/\\x20\-50\%\)\\x20rotate\('\+\((\w+)\['\w+'\]\(\w+\[\w+\]\['\w+'\]/)[1],m=s.match(/(\w+\['\w+'\]&&\(\w+\['\w+'\]=\w+\['\w+'\],!\w+\['\w+'\]&&\w+\['\w+'\]\(\w+,\w*1\)\),\w+\['\w+'\]=\w*0,\w+\['\w+'\]=\w*0),!\w+\['\w+'\]&&\w+\['\w+'\]\['push'\]\(\w+\),\w+\['\w+'\]\(\w+,\w+,!\w*1,\w+\['\w+'\]\)/)[1];let b="top['ttap#4547'].get('hrt')("+[f,h,u,y,g].toString()+")";if(b.length+4>m.length)throw"WHEELCHAIR: target function too small "+[b.length,m.length];let d=m.match(/\s/g);for(var i=0;i<d&&d.length;i++)b+=d[i];for(b+=" ";b.length<m.length-2;)b+=" ";b+=" ",s=s.replace(m,b),r=m,c=b,e.get("strings_to_hide").push({from:new RegExp(c.replace(/([\[|\]|\(|\)|\*|\\|\.|\+])/g,"\\$1"),"g"),to:r});const x=a[1];a[1]=s;let v=Function.prototype.apply.apply(n,[o,a]);return a[1]=x,l(w,v),v}var r,c;return w}},g=t.Function;let m=new Proxy(g,f);t.Function=m,l(u,y),l(p,h),l(r,c),l(w,i),l(g,m)}cripple_window(window.parent);