1v1.LOL Aimbot, ESP & Wireframe View Ads Removed By Germanized

Let's you see players behind walls. Comes with a wireframe view mode and an aimbot too. Press M, N and T to toggle them.

  1. // ==UserScript==
  2. // @name 1v1.LOL Aimbot, ESP & Wireframe View Ads Removed By Germanized
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.2
  5. // @description Let's you see players behind walls. Comes with a wireframe view mode and an aimbot too. Press M, N and T to toggle them.
  6. // @author Germanized
  7. // @match *://1v1.lol/*
  8. // @match *://1v1.school/*
  9. // @icon https://www.google.com/s2/favicons?domain=1v1.lol
  10. // @grant none
  11. // @run-at document-start
  12. // @require https://cdn.jsdelivr.net/npm/lil-gui@0.19
  13. // @license MIT
  14. // ==/UserScript==
  15.  
  16. const isSchoolLink = window.location.hostname.indexOf( '1v1.school' ) > - 1;
  17.  
  18. const searchSize = 300;
  19. const threshold = 4.5;
  20.  
  21. const settings = {
  22. aimbot: false,
  23. aimbotSpeed: 0.15,
  24. esp: true,
  25. wireframe: true,
  26. createdBy: 'Germanized',
  27. IfStuckOn17Percent: 'refresh the page',
  28. showHelp() {
  29.  
  30. dialogEl.style.display = dialogEl.style.display === '' ? 'none' : '';
  31.  
  32. }
  33. };
  34.  
  35. let gui;
  36.  
  37. function initGui() {
  38.  
  39. gui = new lil.GUI();
  40.  
  41. const controllers = {};
  42. for ( const key in settings ) {
  43.  
  44. controllers[ key ] = gui.add( settings, key ).name( fromCamel( key ) ).listen();
  45.  
  46. }
  47. controllers.aimbotSpeed.min( 0.05 ).max( 0.5 ).step( 0.01 );
  48. controllers.createdBy.disable();
  49.  
  50. }
  51.  
  52. function fromCamel( text ) {
  53.  
  54. const result = text.replace( /([A-Z])/g, ' $1' );
  55. return result.charAt( 0 ).toUpperCase() + result.slice( 1 );
  56.  
  57. }
  58.  
  59. const WebGL = WebGL2RenderingContext.prototype;
  60.  
  61. HTMLCanvasElement.prototype.getContext = new Proxy( HTMLCanvasElement.prototype.getContext, {
  62. apply( target, thisArgs, args ) {
  63.  
  64. if ( args[ 1 ] ) {
  65.  
  66. args[ 1 ].preserveDrawingBuffer = true;
  67.  
  68. }
  69.  
  70. return Reflect.apply( ...arguments );
  71.  
  72. }
  73. } );
  74.  
  75. WebGL.shaderSource = new Proxy( WebGL.shaderSource, {
  76. apply( target, thisArgs, args ) {
  77.  
  78. let [ shader, src ] = args;
  79.  
  80. if ( src.indexOf( 'gl_Position' ) > - 1 ) {
  81.  
  82. if ( src.indexOf( 'OutlineEnabled' ) > - 1 ) {
  83.  
  84. shader.isPlayerShader = true;
  85.  
  86. }
  87.  
  88. src = src.replace( 'void main', `
  89.  
  90. out float vDepth;
  91. uniform bool enabled;
  92. uniform float threshold;
  93.  
  94. void main
  95.  
  96. ` ).replace( /return;/, `
  97.  
  98. vDepth = gl_Position.z;
  99.  
  100. if ( enabled && vDepth > threshold ) {
  101.  
  102. gl_Position.z = 1.0;
  103.  
  104. }
  105.  
  106. ` );
  107.  
  108. } else if ( src.indexOf( 'SV_Target0' ) > - 1 ) {
  109.  
  110. src = src.replace( 'void main', `
  111.  
  112. in float vDepth;
  113. uniform bool enabled;
  114. uniform float threshold;
  115.  
  116. void main
  117.  
  118. ` ).replace( /return;/, `
  119.  
  120. if ( enabled && vDepth > threshold ) {
  121.  
  122. SV_Target0 = vec4( 1.0, 0.0, 0.0, 1.0 );
  123.  
  124. }
  125.  
  126. ` );
  127.  
  128. }
  129.  
  130. args[ 1 ] = src;
  131.  
  132. return Reflect.apply( ...arguments );
  133.  
  134. }
  135. } );
  136.  
  137. WebGL.attachShader = new Proxy( WebGL.attachShader, {
  138. apply( target, thisArgs, [ program, shader ] ) {
  139.  
  140. if ( shader.isPlayerShader ) program.isPlayerProgram = true;
  141.  
  142. return Reflect.apply( ...arguments );
  143.  
  144. }
  145. } );
  146.  
  147. WebGL.getUniformLocation = new Proxy( WebGL.getUniformLocation, {
  148. apply( target, thisArgs, [ program, name ] ) {
  149.  
  150. const result = Reflect.apply( ...arguments );
  151.  
  152. if ( result ) {
  153.  
  154. result.name = name;
  155. result.program = program;
  156.  
  157. }
  158.  
  159. return result;
  160.  
  161. }
  162. } );
  163.  
  164. WebGL.uniform4fv = new Proxy( WebGL.uniform4fv, {
  165. apply( target, thisArgs, [ uniform ] ) {
  166.  
  167. const name = uniform && uniform.name;
  168.  
  169. if ( name === 'hlslcc_mtx4x4unity_ObjectToWorld' ||
  170. name === 'hlslcc_mtx4x4unity_ObjectToWorld[0]' ) {
  171.  
  172. uniform.program.isUIProgram = true;
  173.  
  174. }
  175.  
  176. return Reflect.apply( ...arguments );
  177.  
  178. }
  179. } );
  180.  
  181. let movementX = 0, movementY = 0;
  182. let count = 0;
  183.  
  184. let gl;
  185.  
  186. const handler = {
  187. apply( target, thisArgs, args ) {
  188.  
  189. const program = thisArgs.getParameter( thisArgs.CURRENT_PROGRAM );
  190.  
  191. if ( ! program.uniforms ) {
  192.  
  193. program.uniforms = {
  194. enabled: thisArgs.getUniformLocation( program, 'enabled' ),
  195. threshold: thisArgs.getUniformLocation( program, 'threshold' )
  196. };
  197.  
  198. }
  199.  
  200. const couldBePlayer = ( isSchoolLink || program.isPlayerProgram ) && args[ 1 ] > 3000;
  201.  
  202. program.uniforms.enabled && thisArgs.uniform1i( program.uniforms.enabled, ( settings.esp || settings.aimbot ) && couldBePlayer );
  203. program.uniforms.threshold && thisArgs.uniform1f( program.uniforms.threshold, threshold );
  204.  
  205. args[ 0 ] = settings.wireframe && ! program.isUIProgram && args[ 1 ] > 6 ? thisArgs.LINES : args[ 0 ];
  206.  
  207. if ( couldBePlayer ) {
  208.  
  209. gl = thisArgs;
  210.  
  211. }
  212.  
  213. Reflect.apply( ...arguments );
  214.  
  215. }
  216. };
  217.  
  218. WebGL.drawElements = new Proxy( WebGL.drawElements, handler );
  219. WebGL.drawElementsInstanced = new Proxy( WebGL.drawElementsInstanced, handler );
  220.  
  221. window.requestAnimationFrame = new Proxy( window.requestAnimationFrame, {
  222. apply( target, thisArgs, args ) {
  223.  
  224. args[ 0 ] = new Proxy( args[ 0 ], {
  225. apply() {
  226.  
  227. update();
  228.  
  229. return Reflect.apply( ...arguments );
  230.  
  231. }
  232. } );
  233.  
  234. return Reflect.apply( ...arguments );
  235.  
  236. }
  237. } );
  238.  
  239. function update() {
  240.  
  241. const isPlaying = document.querySelector( 'canvas' ).style.cursor === 'none';
  242. rangeEl.style.display = isPlaying && settings.aimbot ? '' : 'none';
  243.  
  244. if ( settings.aimbot && gl ) {
  245.  
  246. const width = Math.min( searchSize, gl.canvas.width );
  247. const height = Math.min( searchSize, gl.canvas.height );
  248.  
  249. const pixels = new Uint8Array( width * height * 4 );
  250.  
  251. const centerX = gl.canvas.width / 2;
  252. const centerY = gl.canvas.height / 2;
  253.  
  254. const x = Math.floor( centerX - width / 2 );
  255. const y = Math.floor( centerY - height / 2 );
  256.  
  257. gl.readPixels( x, y, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels );
  258.  
  259. for ( let i = 0; i < pixels.length; i += 4 ) {
  260.  
  261. if ( pixels[ i ] === 255 && pixels[ i + 1 ] === 0 && pixels[ i + 2 ] === 0 && pixels[ i + 3 ] === 255 ) {
  262.  
  263. const idx = i / 4;
  264.  
  265. const dx = idx % width;
  266. const dy = ( idx - dx ) / width;
  267.  
  268. movementX += ( x + dx - centerX );
  269. movementY += - ( y + dy - centerY );
  270.  
  271. count ++;
  272.  
  273. }
  274.  
  275. }
  276.  
  277. }
  278.  
  279. if ( count > 0 && isPlaying ) {
  280.  
  281. const f = settings.aimbotSpeed / count;
  282.  
  283. movementX *= f;
  284. movementY *= f;
  285.  
  286. window.dispatchEvent( new MouseEvent( 'mousemove', { movementX, movementY } ) );
  287.  
  288. rangeEl.classList.add( 'range-active' );
  289.  
  290. } else {
  291.  
  292. rangeEl.classList.remove( 'range-active' );
  293.  
  294. }
  295.  
  296. movementX = 0;
  297. movementY = 0;
  298. count = 0;
  299.  
  300. gl = null;
  301.  
  302. }
  303.  
  304. const el = document.createElement( 'div' );
  305.  
  306. el.innerHTML = `<style>
  307.  
  308. .dialog {
  309. position: absolute;
  310. left: 50%;
  311. top: 50%;
  312. padding: 20px;
  313. background: #1e294a;
  314. color: #fff;
  315. transform: translate(-50%, -50%);
  316. text-align: center;
  317. z-index: 999999;
  318. font-family: cursive;
  319. }
  320.  
  321. .dialog * {
  322. color: #fff;
  323. }
  324.  
  325. .close {
  326. position: absolute;
  327. right: 5px;
  328. top: 5px;
  329. width: 20px;
  330. height: 20px;
  331. opacity: 0.5;
  332. cursor: pointer;
  333. }
  334.  
  335. .close:hover {
  336. opacity: 1;
  337. }
  338.  
  339. .range {
  340. position: absolute;
  341. left: 50%;
  342. bottom: 50px;
  343. width: 120px;
  344. height: 6px;
  345. background: #000;
  346. border: 2px solid #fff;
  347. transform: translateX( -50% );
  348. z-index: 99999;
  349. opacity: 0.5;
  350. }
  351.  
  352. .range-active {
  353. opacity: 1 !important;
  354. }
  355.  
  356. .range span {
  357. position: absolute;
  358. left: 50%;
  359. top: -8px;
  360. font-size: 14px;
  361. transform: translateX( -50% );
  362. }
  363.  
  364. </style>
  365. <div class="range" style="display: none;"><span>Aimbot</span></div>
  366. <div class="dialog" id="esp-dialog" style="display: none;">
  367.  
  368. <h2>1v1.LOL Aimbot & ESP</h2>
  369. <p>Press M, N and T to toggle them</p>
  370.  
  371. <div class="close" onclick="this.parentElement.style.display = 'none';">x</div>
  372. </div>`;
  373.  
  374. document.body.appendChild( el );
  375.  
  376. const dialogEl = document.getElementById( 'esp-dialog' );
  377. const rangeEl = document.querySelector( '.range' );
  378.  
  379. window.addEventListener( 'keydown', ( { keyCode } ) => {
  380.  
  381. switch ( keyCode ) {
  382.  
  383. case 77: return settings.aimbot = ! settings.aimbot; // M
  384. case 78: return settings.esp = ! settings.esp; // N
  385. case 84: return settings.wireframe = ! settings.wireframe; // T
  386.  
  387. }
  388.  
  389. } );
  390.  
  391. initGui();