Arras.io Aimlock

use aimbot by just 2 clicks! press P for Aimlock in the press of a button. [UPDATED] may not work

  1. // ==UserScript==
  2. // @name Arras.io Aimlock
  3. // @author Hilton james
  4. // @description use aimbot by just 2 clicks! press P for Aimlock in the press of a button. [UPDATED] may not work
  5. // @version 2
  6. // @match *://arras.io/*
  7. // @run-at document-start
  8. // @require https://greasyfork.org/scripts/434599-apm/code/APM.js?version=983214
  9. // @grant none
  10. // @license Hilton james
  11.  
  12. // @namespace https://tampermonkey.net
  13. // ==/UserScript==
  14.  
  15.  
  16.  
  17. arras.hijack().then((socket) => {
  18. Object.defineProperty(String.prototype, 'hashCode', {
  19. value: function() {
  20. let ans = 0, i, chr;
  21. for (i = 0; i < this.length; i++) {
  22. chr = this.charCodeAt(i);
  23. ans = ((ans << 10) - ans) + chr;
  24. ans |= 0;
  25. }
  26. return ans;
  27. }
  28. });
  29.  
  30.  
  31. const world = new arras.UpdateParser(true);
  32. let aim = false;
  33. let targetX = 0;
  34. let targetY = 0;
  35. let altAim = 1;
  36.  
  37. const getDist = function(x1, y1, x2, y2) {
  38. let X = x2 - x1;
  39. let Y = y2 - y1;
  40. return Math.sqrt(X*X+Y*Y);
  41. }
  42.  
  43. socket.hookMsg((data) => {
  44. if (data[0] === 'u') {
  45. world.parse(data);
  46.  
  47. let distance = 999999999;
  48. let index = -1;
  49.  
  50. world.entities.forEach((cur, ind, arr) => {
  51. altAim = cur.name.hashCode() ^ 214657361;
  52. console.log(cur.name.hashCode());
  53. let ent = cur;
  54. if (ent.color != world.player.body.color && (ent.color === 10 || ent.color === 11 || ent.color === 12 || ent.color === 15) && (ent.guns.length !== 0 || ent.turrets.length !== 0) && ent.size >= 20) {
  55. let dist = getDist(world.camera.x, world.camera.y, ent.x, ent.y);
  56. if (dist < distance) {
  57. distance = dist;
  58. index = ind;
  59. targetX = (ent.x + ent.size / 3) + ent.vx * 0.04 * distance;10
  60. targetY = (ent.y + ent.size / 3) + ent.vy * 0.04 * distance;10
  61. }
  62. }
  63. });
  64. }
  65. });
  66. socket.hookSend((data) => {
  67. let altMx = targetX - world.camera.x;
  68. let altMy = targetY - world.camera.y;
  69.  
  70. if (!altAim) return ['C', altMx, altMy, (altMx + altMy) / (-altMx - altMy)];
  71. if (data[0] === 'C' && aim) {
  72. let flags = data[3];
  73. let mx = targetX - world.camera.x;
  74. let my = targetY - world.camera.y;
  75. return ['C', mx, my, flags];
  76.  
  77. }
  78. return false;
  79. });
  80. window.addEventListener('keydown', (key) => {
  81. if (key.code === 'Keyp' && socket.readyState === 1) {
  82. aim = !aim;
  83. socket.receive('p', 'Aimlock ' + ((aim) ? 'ON' : 'OFF'));
  84. }
  85. });
  86. });