Advertisement
the3picCucumber

Vertix.io Mod

Aug 31st, 2017
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Vertix Mods; Aimbot, Switch Shooting, Zoom, Enemy Radar (Progress)
  3. // @namespace    http://vertix.io/
  4. // @version      2.1
  5. // @description  Mods for Vertix.io, press [ to start aimbot and ] to stop it. Right click to super shot. Use the scroll bar to zoom in and out. Enemy radar is red dots on map (In Progress).
  6. // @author       SnowLord7
  7. // @match        http://vertix.io/
  8. // @supportURL   http://iomods.weebly.com/
  9. // @downloadURL  http://iomods.weebly.com/vertixio-aimbot.html
  10. // @icon         http://i.imgur.com/HtuQwpq.png
  11. // ==/UserScript==
  12. window.alert('SnowLords Super Mod has Been Correctly Installed!');
  13.  
  14. //Aimbot
  15.  
  16. var active = false;
  17. var interval = void 0;
  18.  
  19. function activate(event) {
  20.     event.preventDefault();
  21.     if (event.keyCode === 219 && !active) {
  22.                 window.alert('Aimbot Actibated, Press Enter to Quickly Close This.');
  23.         c.removeEventListener("mousemove", gameInput, false);
  24.         active = true;
  25.         interval = setInterval(aimClosestPlayer, 10);
  26.     }
  27. }
  28.  
  29. function deactivate(event) {
  30.     event.preventDefault();
  31.     if (event.keyCode === 221) {
  32.         active = false;
  33.         window.alert('Aimbot Deactivated, Press Enter to Quickly Close This.');
  34.         clearInterval(interval);
  35.         c.addEventListener("mousemove", gameInput, false);
  36.     }
  37. }
  38.  
  39.  
  40. c.addEventListener("keydown", activate, false);
  41. c.addEventListener("keyup", deactivate, false);
  42.  
  43. function getOtherPlayers(gameObjects, myTeam) {
  44.     return gameObjects.filter(function (o) {
  45.         return o.type === 'player' && o.dead === false && o.name !== player.name && o.team !== myTeam;
  46.     });
  47. }
  48.  
  49. function getMyPlayer(gameObjects) {
  50.     return gameObjects.filter(function (o) {
  51.         return o.name === player.name;
  52.     })[0];
  53. }
  54.  
  55. function distance(x1, y1, x2, y2) {
  56.     return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
  57. }
  58.  
  59. function getClosestPlayer(gameObjects) {
  60.     var myTeam = getMyPlayer(gameObjects).team;
  61.     var otherPlayers = getOtherPlayers(gameObjects, myTeam);
  62.     var closestDistance = Infinity;
  63.     var closestPlayer = void 0;
  64.     otherPlayers.forEach(function (p) {
  65.         var d = distance(player.x, player.y, p.x, p.y);
  66.         if (d < closestDistance) {
  67.             closestPlayer = p;
  68.             closestDistance = d;
  69.         }
  70.     });
  71.     return closestPlayer;
  72. }
  73.  
  74. function getAngle(x1, y1, x2, y2) {
  75.     return Math.atan2(y1 - y2, x1 - x2);
  76. }
  77.  
  78. function setTarget(angle, distance) {
  79.     target.f = angle;
  80.     target.d = distance;
  81. }
  82.  
  83. function aimClosestPlayer() {
  84.     var closestPlayer = getClosestPlayer(gameObjects);
  85.     if (!closestPlayer) {
  86.         return;
  87.     }
  88.     var angle = getAngle(player.x, player.y, closestPlayer.x, closestPlayer.y);
  89.     var distance = 100;
  90.     setTarget(angle, distance);
  91.     targetChanged = true;
  92. }
  93.  
  94. //Right Click to Double Shoot
  95.  
  96. $("#cvs").mousedown(function(ev){
  97.     if(ev.which == 3)
  98.     {
  99.  
  100.         playerSwapWeapon(player, 1);
  101.         setTimeout(shootBullet(player), 10);
  102.         playerSwapWeapon(player, 1);
  103.  
  104.     }
  105. });
  106.  
  107. //Zoom Mod
  108.  
  109. var scrollDelta = 0,
  110.     cvs = document.getElementById('cvs');
  111. cvs.addEventListener('mousewheel', zoom, false);
  112. cvs.addEventListener('DOMMouseScroll', zoom, false);
  113.  
  114.  
  115. function zoom(a) {
  116.     userScroll = overlayFadeUp = overlayFadeDown = overlayMaxAlpha = 0;
  117.     animateOverlay = false;
  118.     a = window.event || a;
  119.     a.preventDefault();
  120.     a.stopPropagation();
  121.     scrollDelta = Math.max(-1, Math.min(1, a.wheelDelta || -a.detail));
  122.     if (socket && scrollDelta == -1 && maxScreenHeight < 4000) {
  123.         (maxScreenHeight = maxScreenWidth += 250);
  124.         resize();
  125.         scrollDelta = 0;
  126.         viewMult = 100;
  127.     }
  128.     if (socket && scrollDelta == 1 && maxScreenHeight > 1000) {
  129.         (maxScreenHeight = maxScreenWidth -= 250);
  130.         resize();
  131.         scrollDelta = 0;
  132.         viewMult = 100;
  133.     }
  134. }
  135.  
  136. //Machine Gun
  137.  
  138. $("#cvs").mousedown(function(ev){
  139.     if(ev.which == 3)
  140.     {
  141.         shootBullet(player);
  142.         shootBullet(player);
  143.         shootBullet(player);
  144.         shootBullet(player);
  145.         shootBullet(player);
  146.         shootBullet(player);
  147.         shootBullet(player);
  148.         shootBullet(player);
  149.         shootBullet(player);
  150.         shootBullet(player);
  151.         shootBullet(player);
  152.         shootBullet(player);
  153.         shootBullet(player);
  154.         shootBullet(player);
  155.         shootBullet(player);
  156.         shootBullet(player);
  157.         shootBullet(player);
  158.         shootBullet(player);
  159.         shootBullet(player);
  160.         shootBullet(player);
  161.     }
  162. });
  163.  
  164.  
  165. //Ememy Radar
  166.  
  167. $(document).ready(function() {
  168.     window.drawMiniMap = function() {
  169.         mapCanvas.width = mapCanvas.width, mapContext.globalAlpha = 1;
  170.         for (var a = 0; a < gameObjects.length; ++a)
  171.             "player" == gameObjects[a].type &&
  172.                 gameObjects[a].onScreen &&
  173.                 (gameObjects[a].index == player.index ||
  174.                  gameObjects[a].team !== player.team ||
  175.                  gameObjects[a].isBoss) &&
  176.                 (mapContext.fillStyle = gameObjects[a].index == player.index ? "#fff" : gameObjects[a].isBoss ? "#db4fcd" : "#d20d12",
  177.                  mapContext.beginPath(),
  178.                  mapContext.arc(gameObjects[a].x / gameWidth * mapScale, gameObjects[a].y / gameHeight * mapScale, pingScale, 0, 2 * mathPI, !0),
  179.                  mapContext.closePath(),
  180.                  mapContext.fill());
  181.         if (null !== gameMap) {
  182.             for (mapContext.globalAlpha = 1, a = 0; a < gameMap.pickups.length; ++a)
  183.                 gameMap.pickups[a].active &&
  184.                     ("lootcrate" == gameMap.pickups[a].type ? mapContext.fillStyle = "#ffd100" : "healthpack" == gameMap.pickups[a].type &&
  185.                      (mapContext.fillStyle = "#5ed951"),
  186.                      mapContext.beginPath(),
  187.                      mapContext.arc(gameMap.pickups[a].x / gameWidth * mapScale, gameMap.pickups[a].y / gameHeight * mapScale, pingScale, 0, 2 * mathPI, !0),
  188.                      mapContext.closePath(),
  189.                      mapContext.fill());
  190.             mapContext.globalAlpha = 1.0,
  191.                 a = getCachedMiniMap(),
  192.                 null !== a &&
  193.                 mapContext.drawImage(a, 0, 0, mapScale, mapScale),
  194.                 delete a;
  195.         }
  196.     };
  197. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement