Karnage NoAim

An aimbot for Varnage.io (Use at your own discretion)

La data de 14-03-2017. Vezi ultima versiune.

Acest script nu ar trebui instalat direct. Aceasta este o bibliotecă pentru alte scripturi care este inclusă prin directiva meta a // @require https://update.sleazyfork.org/scripts/28129/180840/Karnage%20NoAim.js

  1. // ==UserScript==
  2. // @name Karnage NoAim
  3. // @namespace Karnage
  4. // @version 1.0
  5. // @description An aimbot for Varnage.io (Use at your own discretion)
  6. // @author dannytech
  7. // @match http://vertix.io/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. // You are 100% responsible if you get caught using this script, so don't try to go after me.
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // Common variables
  17. var targetId;
  18. var mouse;
  19. var isOn = !window.localStorage.getItem("aimbot");
  20. console.log("NoAim is", isOn ? "on" : "off");
  21.  
  22. // Add our listener
  23. window.addEventListener("mousemove", function(values) {
  24. mouse = {
  25. x: values.clientX,
  26. y: values.clientY
  27. };
  28. // console.log((mouse.x / window.innerWidth) * 2 - 1, (mouse.y / window.innerHeight) * 2 - 1); // 0 is center
  29. });
  30.  
  31. // Patch the listener so nothing else can be added
  32. const addListener = window.addEventListener;
  33. var mouseMove;
  34. window.addEventListener = function(type, listener) {
  35. if(type !== "mousemove") addListener(type, listener);
  36. else mouseMove = listener;
  37. };
  38.  
  39. // Add toggles for features
  40. window.addEventListener("keypress", function(keypress) {
  41. // If the toggle key was pressed
  42. if(keypress.which === 66) { // B
  43. window.localStorage.setItem("aimbot", !window.localStorage.getItem("aimbot"));
  44. if(!window.localStorage.getItem("aimbot")) { // It is now enabled
  45. window.removeEventListener("mousemove", mouseMove);
  46. console.log("NoAim on");
  47. } else { // It is now disabled
  48. addListener("mousemove", mouseMove);
  49. console.log("NoAim off");
  50. }
  51. }
  52. });
  53.  
  54. setInterval(function() {
  55. // Aimbot disabled
  56. if(!isOn) return;
  57.  
  58. // If the game is loaded and the user is in a lobby
  59. if(player && players.length > 0) {
  60. // Find the mouse position in game values
  61. var mousex = ((player.viewDist / window.innerWidth) * mouse.x) + player.x;
  62. var mousez = ((player.viewDist / window.innerHeight) * mouse.y) + player.z;
  63.  
  64. // Find the positions of every other player, and how far away they are
  65. var otherPlayers = [];
  66. players.forEach(function(curPlayer) {
  67. // If the player isn't us, isn't on our team, and is alive, add them
  68. if(curPlayer.sid !== player.sid && curPlayer.alive && (curPlayer.team === null || curPlayer.team != player.team)) {
  69. otherPlayers.push({
  70. // dist: Math.sqrt(Math.pow(Math.abs(mousex - curPlayer.x), 2) + (Math.abs(mousez - curPlayer.z), 2)), // We calculate the distance away they are (the hypotenuse) using the pythagorean theorem
  71. dist: Math.abs(player.x - curPlayer.x) + Math.abs(player.z - curPlayer.z),
  72. x: curPlayer.x,
  73. z: curPlayer.z,
  74. name: curPlayer.name,
  75. sid: curPlayer.sid
  76. });
  77. }
  78. });
  79.  
  80. // Find out which player is closest
  81. otherPlayers.sort(function(player1, player2) {
  82. if(player1.dist < player2.dist) return -1;
  83. else if(player1.dist > player2.dist) return 1;
  84. else if(player1.dist == player2.dist) return 0;
  85. });
  86. var targetPlayer = otherPlayers[0];
  87. if(targetPlayer) {
  88. // Set the current target
  89. if(targetId != targetPlayer.sid) {
  90. console.log("Targeting", targetPlayer.name);
  91. targetId = targetPlayer.sid;
  92. }
  93.  
  94. // Aim
  95. MOUSE_X = (targetPlayer.x - player.x) / player.viewDist;
  96. MOUSE_Y = (targetPlayer.z - player.z) / player.viewDist;
  97. }
  98. }
  99. }, 5);
  100. })();