Greasy Fork is available in English.

florr mob count script

shows all mob count

  1. // ==UserScript==
  2. // @name florr mob count script
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description shows all mob count
  6. // @author bismuth
  7. // @match https://florr.io/
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=florr.io
  9. // @grant none
  10. // @license none
  11. // ==/UserScript==
  12. WebAssembly.instantiateStreaming = (r, i) => (r.arrayBuffer().then(b => WebAssembly.instantiate(b, i)));
  13. const _instantiate = WebAssembly.instantiate;
  14. WebAssembly.instantiate = (bin,imports) => {
  15. const buf = new Uint8Array(bin);
  16. const length = buf.length-10;
  17. for (let n = 0; n < length; n++) {
  18. if (buf[n] === 67 &&
  19. buf[n+1] === 0 &&
  20. buf[n+2] === 0 &&
  21. buf[n+3] === 32 &&
  22. buf[n+4] === 65 &&
  23. buf[n+5] === 146 &&
  24. buf[n+6] === 33 &&
  25. buf[n+7] === 7 &&
  26. buf[n+8] === 11) {
  27. buf.set([0x41,0,0x2a,0,0],n);
  28. break;
  29. }
  30. }
  31. return _instantiate(bin, imports).then(wasm => {
  32. for (const exp of Object.values(wasm.instance.exports)) {
  33. if (exp.buffer) {
  34. const buffer = exp.buffer;
  35. const F32 = new Float32Array(buffer);
  36. F32[0] = 10;
  37. document.addEventListener('keydown', ({code}) => { if (code === 'KeyE') F32[0] = 80 - F32[0]; });
  38. break;
  39. }
  40. }
  41. return wasm;
  42. });
  43. }