Eval Packet Overrider

Overrides eval packet to disable debugger and increase game's speed

  1. // ==UserScript==
  2. // @name Eval Packet Overrider
  3. // @version 1.7
  4. // @description Overrides eval packet to disable debugger and increase game's speed
  5. // @author don_shädaman
  6. // @match https://diep.io
  7. // @match https://florr.io
  8. // @grant none
  9. // @namespace https://greasyfork.org/users/422425
  10. // ==/UserScript==
  11. window.Function = new Proxy(window.Function, {
  12. construct: function(to, args) {
  13. let a = args[0].match(/(\w+)=function\(\)/)[1];
  14. let b = args[0].match(/function\(\w+,(\w+)\){var (\w+)/);
  15. return new to(args[0]
  16. .replace(/if\(!window\).*(\w{1,2}\[\w{1,2}\(-?'.{1,5}','.{1,5}'\)(?:\+'.{1,3}')?\])\((\w{1,2}),(\w{1,2}\[\w{1,2}\(-?'.{1,5}','.{1,5}'\)(?:\+'.{1,3}')?\])\);};.*/,`$1($2,$3);};`)
  17. .replace(/function \w+\(\w+\){.*?}(?=\w)(?!else)(?!continue)(?!break)/,"")
  18. .replace(/,window.*?\(\)(?=;)/,"")
  19. .replace(new RegExp(`,${a}=function.*?${a}\\(\\)`),`;${b[2]}(${b[1]}+1)`)
  20. );
  21. }
  22. });