Advertisement
FlyFar

Surviv.IO Aimbot

Jul 27th, 2023
1,164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 2.91 KB | Cybersecurity | 0 0
  1. // ==UserScript==
  2. // @name         Surviv Aimbot
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  Aimhacks for Surviv.IO
  6. // @author       BlueFireStudios
  7. // @match        http://surviv.io/*
  8. // @grant        none
  9. // @require http://code.jquery.com/jquery-1.7.1.min.js
  10. // @run-at document-start
  11. //
  12. // Make sure you have the correct Tampermonkey or any script holder to use this hack!
  13. // ==/UserScript==
  14. var nameToAdd = 'https://cdn.rawgit.com/BlueFire9020/SurvivAimbot/master/1.3.5.js';
  15. window.onload = function() {
  16.     $("#ui-top-right").append ( `
  17.     <div id="zoom">
  18.         <div id="currentZoom">zoom = 10</div>
  19.     </div>
  20. ` );
  21.     var d = document;   // shorthand
  22.     var scripts = d.getElementsByTagName('script');
  23.     for(var i = 0; i < scripts.count; i++) {
  24.         if(scripts[i].src.contains('js/app.')) {
  25.         scripts[i].src = nameToAdd;
  26.         }
  27.     }
  28.     $("body").append ( `
  29.     <script type="text/javascript" src="` + nameToAdd + `"></script>
  30. ` );
  31. };
  32. var changed = 0; // script need to be edited with
  33.  
  34. window.addEventListener('beforescriptexecute', function(e) {
  35.  
  36.     ///for external script:
  37.     src = e.target.src;
  38.     if (src.search('js/app') != -1) {
  39.                 changed++;
  40.         e.preventDefault();
  41.         e.stopPropagation();
  42.         addJS_Node (null, nameToAdd);
  43.     }
  44. });
  45.  
  46. function addJS_Node (text, s_URL, funcToRun) {
  47.     var D                                   = document;
  48.     var scriptNode                          = D.createElement ('script');
  49.     scriptNode.type                         = "text/javascript";
  50.     if (text)       scriptNode.textContent  = text;
  51.     if (s_URL)      scriptNode.src          = s_URL;
  52.     if (funcToRun)  scriptNode.textContent  = '(' + funcToRun.toString() +
  53.     ')()';
  54.  
  55.     var targ    = D.getElementsByTagName('body')[0] || D.body || D.documentElement;
  56.     targ.appendChild (scriptNode);
  57. }
  58. addJS_Node (null, nameToAdd);
  59. window.addEventListener('beforescriptexecute',
  60.   function(event)
  61.   {
  62.     var originalScript = event.target;
  63.  
  64.     // debug output of full qualified script url
  65.     console.log('script detected:', originalScript.src);
  66.  
  67.     // script ends with 'originalscript.js' ?
  68.     // you can test as well: '<full qualified url>' === originalScript.src
  69.     if('js/app'.test(originalScript.src))
  70.     {
  71.       var replacementScript = document.createElement('script');
  72.       replacementScript.src = nameToAdd;
  73.  
  74.       originalScript.parentNode.replaceChild(replacementScript, originalScript);
  75.  
  76.       // prevent execution of the original script
  77.       event.preventDefault();
  78.     }
  79.   }
  80. );
  81. /*window.onkeyup = function(e) {
  82.     var key = e.keyCode ? e.keyCode : e.which;
  83.  
  84.     if (key == 190 && zoom != 200) {
  85.         zoom += 10;
  86.         localZoom = zoom;
  87.     }else if (key == 188 && zoom != 0) {
  88.         zoom -= 10;
  89.         localZoom = zoom;
  90.     }
  91.  
  92.     document.getElementById('currentZoom').innerHTML = 'Zoom = '+zoom;
  93. };*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement