Moomoo.io - 1.8.0 AutoScroll

Key-triggered autoscroll. I've removed the ping function with the 'R' key to keep the bull helmet scroll anonymous. You can also ping by clicking the minimap.

  1. // ==UserScript==
  2. // @name Moomoo.io - 1.8.0 AutoScroll
  3. // @author Seryo
  4. // @description Key-triggered autoscroll. I've removed the ping function with the 'R' key to keep the bull helmet scroll anonymous. You can also ping by clicking the minimap.
  5.  
  6. // @ - Bull Hat (Key: "R")
  7. // @ - Soldier Helmet (Key: "G")
  8. // @ - Tank Gear (Key: "Z")
  9. // @ - Bearbarian Armor (Key: "M")
  10. // @ - Booster Hat (Key: "B")
  11. // @ - Flipper Hat (Key: "Y")
  12. // @ - EMP Helmet (Key: "J")
  13. // @ - Samurai Armor (Key: "U")
  14. // @ - Turret Hat (Key: "T")
  15. // @ - Fluff Head (Key: "I")
  16. // @ - Spike Gear (Key: "H")
  17. // @ - Monkey Tail (Key: "O")
  18.  
  19. // @version 0.1
  20. // @match *://*.moomoo.io/*
  21. // @namespace https://gf.qytechs.cn/users/1190411
  22. // @icon https://cdn.glitch.com/82ae8945-dcc6-4276-98a9-665381b4cd2b/cursor12.png
  23. // @license MIT
  24. // @grant none
  25. // @require https://gf.qytechs.cn/scripts/440839-moomoo-items/code/MooMoo%20Items.js?version=1023778
  26. // @require https://gf.qytechs.cn/scripts/423602-msgpack/code/msgpack.js?version=1005014
  27. // ==/UserScript==
  28.  
  29. class MooMoo {
  30. static get hotkeys() {
  31. return {
  32. hat_hotkeys: {
  33. bull_hat: { id: 7, key: "r", scroll: { toggle: true, time: 0, top: 1450 } },
  34. soldier_helmet: { id: 6, key: "g", scroll: { toggle: true, time: 0, top: 1200 } },
  35. tank_gear: { id: 40, key: "z", scroll: { toggle: true, time: 0, top: 2050 } },
  36. bearbarian_armor: { id: 26, key: "m", scroll: { toggle: true, time: 0, top: 1600 } },
  37. booster_hat: { id: 12, key: "b", scroll: { toggle: true, time: 0, top: 1550 } },
  38. flipper_hat: { id: 31, key: "y", scroll: { toggle: true, time: 0, top: 1000 } },
  39. emp_helmet: { id: 22, key: "j", scroll: { toggle: true, time: 0, top: 1500 } },
  40. samurai_armor: { id: 20, key: "u", scroll: { toggle: true, time: 0, top: 1900 } },
  41. turret_hat: { id: 53, key: "t", scroll: { toggle: true, time: 0, top: 1850 } },
  42. fluff_head: { id: 30, key: "i", scroll: { toggle: true, time: 0, top: 200 } },
  43. spike_gear: { id: 11, key: "h", scroll: { toggle: true, time: 0, top: 1800 } },
  44. monkey_tail: { id: 11, key: "o", scroll: { toggle: true, time: 0, top: 250 } }
  45. }
  46. };
  47. }
  48.  
  49. static init(arg) {
  50. this.hathotkeys();
  51. this.canvas = document.getElementById("gameCanvas");
  52. this.result = "";
  53. this.initcps();
  54. this.doc = document;
  55. this.initlisteners();
  56. this.id = `#${arg.match(/d="?g(.*)?I/g)[0].match(/(?=g).*(?=)/)[0]}`;
  57. window.addEventListener("load", (event) => {
  58. MooMoo.initHTML();
  59. });
  60. }
  61.  
  62. static get() {
  63. return new Promise((resolve) => {
  64. fetch(arguments[0])
  65. .then((res) => res.text())
  66. .then((res) => {
  67. return resolve(res);
  68. });
  69. });
  70. }
  71.  
  72. static smoothscroll(scrolltop, time) {
  73. $('#storeHolder').animate({
  74. scrollTop: scrolltop
  75. }, time);
  76. }
  77.  
  78. static hathotkeys() {
  79. let hotkeys = this.hotkeys.hat_hotkeys;
  80. let locale = this;
  81. for (let i in this.hotkeys.hat_hotkeys) {
  82. document.addEventListener('keydown', (e) => {
  83. if (document.activeElement.type == "text") return;
  84. if (e.key.toLowerCase() == hotkeys[i].key) {
  85. if (!hotkeys[i].scroll.toggle) return;
  86.  
  87. if (document.getElementById("storeMenu").style.display === "block") {
  88. locale.smoothscroll(hotkeys[i].scroll.top, hotkeys[i].scroll.time);
  89. }
  90.  
  91. e.preventDefault();
  92. e.stopPropagation();
  93. }
  94. });
  95. }
  96. }
  97. }
  98.  
  99. (async () => {
  100. const game = await MooMoo.get(document.location.href);
  101. MooMoo.init(game);
  102. var ws;
  103. WebSocket.prototype._send = WebSocket.prototype.send;
  104. WebSocket.prototype.send = function (m) {
  105. if (MooMoo.decode(m)[0] == "c") {
  106. MooMoo.handleHit(m);
  107. }
  108. if (!ws) {
  109. document.ws = this;
  110. ws = this;
  111. this.addEventListener('message', function (message) {
  112. MooMoo.setws(this);
  113. MooMoo.getwsmessage(message);
  114. });
  115. }
  116. this._send(m);
  117. };
  118. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址