Advertisement
FlyFar

(Tampermonkey) Surviv.io Aimbot Hack!

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