Rainbow UI 🌈 | Ad Block 🛑 | Better Map 🗺 | Show Ping 🏓 | And More … | MooMoo.IO

Rainbow UI, ad block, better map, always show ping, start with extra resources, and more for moomoo.io.

目前为 2023-01-25 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Rainbow UI 🌈 | Ad Block 🛑 | Better Map 🗺 | Show Ping 🏓 | And More … | MooMoo.IO
  3. // @namespace -
  4. // @version 1.3.1
  5. // @description Rainbow UI, ad block, better map, always show ping, start with extra resources, and more for moomoo.io.
  6. // @author NotYou
  7. // @include *://moomoo.io/*
  8. // @include *://*.moomoo.io/*
  9. // @match https://moomoo.io/*
  10. // @match https://*.moomoo.io/*
  11. // @match http://moomoo.io/*
  12. // @match http://*.moomoo.io/*
  13. // @run-at document-body
  14. // @license GPL-3.0-or-later
  15. // @grant none
  16. // ==/UserScript==
  17.  
  18. // You can change "false" to "true" (without quotes)
  19. let modConfig = {
  20. rainbowObjects: false,
  21. }
  22.  
  23. // Do NOT edit code below
  24.  
  25. let extra = function() {
  26. let getResources = window.follmoo
  27.  
  28. if(getResources) {
  29. getResources()
  30. }
  31. }
  32. let style = document.createElement('style')
  33. style.appendChild(document.createTextNode(`
  34. :root {
  35. --w: rgb(255, 255, 255);
  36. --b: rgb(19, 19, 19);
  37. --f: rgb(9, 9, 9);
  38. --b-t: rgba(0, 0, 0, 0.6);
  39. --f-t: rgba(0, 0, 0, 0.8);
  40. }
  41.  
  42. /* AD BLOCK */
  43.  
  44. #adCard, #menuContainer > :last-child, #promoImgHolder, #pre-content-container, #ot-sdk-btn-floating, #moomooio_728x90_home, #moomooio_300x250_1,
  45.  
  46. /* COOKIE BLOCK */
  47.  
  48. #onetrust-consent-sdk
  49.  
  50. {
  51. display: none !important;
  52. }
  53.  
  54. /* RAINBOW UI */
  55.  
  56. #serverBrowser, #vipServerBrowser, .menuCard, #linksContainer2 {
  57. background-color: var(--b);
  58. }
  59.  
  60. #loadingText, #diedText, #gameName, #partyButton, #youtuberOf, #pingDisplay, #ageText, #linksContainer2, #enterGame span, #nameInput, .material-icons {
  61. color: var(--f);
  62. }
  63.  
  64. #ageBody, #actionBar *, #resDisplay *, #upgradeHolder *, #mapDisplay, #topInfoHolder, #killCounter, .uiElement, #ageBar, #storeHolder, .storeTab, #allianceHolder, #allianceManager *, #chatBox, .notifButton {
  65. background-color: var(--f-t) !important;
  66. }
  67.  
  68. .uiElement.gameButton:hover, #actionBar *:hover, #upgradeHolder *:hover, .storeTab:hover, .notifButton:hover {
  69. background-color: var(--b-t);
  70. }
  71.  
  72. #menuCardHolder[style*="block"] {
  73. display: grid !important;
  74. }
  75.  
  76. #rightCardHolder, #guideCard {
  77. height: 147px;
  78. }
  79.  
  80. .menuCard {
  81. box-shadow: var(--f) 0 7px;
  82. }
  83.  
  84. .menuCard * {
  85. color: var(--w);
  86. }
  87.  
  88. #serverBrowser, #vipServerBrowser {
  89. border: 1px solid var(--f);
  90. }
  91.  
  92. #gameName {
  93. text-shadow: var(--b) 0px 1px 0px, var(--b) 0px 2px 0px, var(--b) 0px 3px 0px, var(--b) 0px 4px 0px, var(--b) 0px 5px 0px, var(--b) 0px 6px 0px, var(--b) 0px 7px 0px, var(--b) 0px 8px 0px, var(--b) 0px 9px 0px;
  94. }
  95.  
  96. #ageBarBody {
  97. background-color: red;
  98. }
  99.  
  100. #gameUI .material-icons, .joinAlBtn {
  101. color: red !important;
  102. }
  103.  
  104. #enterGame, #joinPartyButton, #ageBarBody, #gameUI .material-icons, .joinAlBtn, a {
  105. animation: 5s infinite linear both normal rainbow;
  106. }
  107.  
  108. @keyframes rainbow {
  109. 0% { filter: hue-rotate(0deg) }
  110. 100% { filter: hue-rotate(360deg) }
  111. }
  112.  
  113. /* OTHER */
  114.  
  115. #mapDisplay {
  116. background-image: url(https://ksw2-center.glitch.me/users/fzb/map.png) !important;
  117. background-size: contain !important;
  118. }
  119.  
  120. #topInfoHolder {
  121. border-radius: 3px;
  122. }
  123.  
  124. #pingDisplay {
  125. display: block;
  126. }
  127.  
  128. #vipServerBrowser {
  129. width: 100%;
  130. height: 24px;
  131. }
  132.  
  133. /* MODIFICATIONS */
  134.  
  135. ${modConfig.invertColors ? `
  136. #gameCanvas {
  137. -webkit-filter: invert(1);
  138. filter: invert(1);
  139. }
  140. `: ''}
  141.  
  142. `))
  143. document.head.appendChild(style)
  144.  
  145. window.addEventListener('DOMContentLoaded', () => {
  146. let mainMenu = document.querySelector('#mainMenu')
  147.  
  148. CanvasRenderingContext2D.prototype._rotate = CanvasRenderingContext2D.prototype.rotate
  149.  
  150. let discord = document.querySelector('#linksContainer2 [href*="discord"]')
  151. discord.href = '//gf.qytechs.cn/scripts/449133'
  152. discord.innerHTML = 'Rainbow UI'
  153.  
  154. // Always show ping
  155. mainMenu.insertAdjacentElement('beforebegin', document.querySelector('#pingDisplay'))
  156.  
  157. // Extra Resources
  158. ;(function() {
  159. extra()
  160.  
  161. let obs = new MutationObserver(extra)
  162. obs.observe(document.body, {
  163. childList: true,
  164. subtree: true,
  165. })
  166. })()
  167.  
  168. // VIP Servers
  169. ;(function() {
  170. document.querySelector('#altServer').insertAdjacentHTML('afterend', '<div class="menuHeader" style="margin-top:10px">VIP Servers</div><select id="vipServerBrowser"><option selected="">Select Server</option></select>')
  171.  
  172. let serverBrowser = document.querySelector('#serverBrowser')
  173. let vipServerBrowser = document.querySelector('#vipServerBrowser')
  174. let obs = new MutationObserver(() => {
  175. let servers = Array.from(serverBrowser.children).filter(e => e.textContent.includes('[0/'))
  176.  
  177. if(servers.length > 1) {
  178. servers.forEach(e => {
  179. e = e.cloneNode(true)
  180. e.textContent = e.textContent.split(' [')[0]
  181. vipServerBrowser.insertAdjacentElement('beforeend', e)
  182. })
  183.  
  184. vipServerBrowser.addEventListener('click', e => {
  185. let value = e.target.value
  186.  
  187. if(value.includes(':')) {
  188. location.replace('http://moomoo.io/?server=' + value)
  189. }
  190. })
  191.  
  192. obs.disconnect()
  193. }
  194. })
  195.  
  196. obs.observe(mainMenu, {
  197. childList: true,
  198. subtree: true,
  199. })
  200. })()
  201.  
  202. // Rainbow Objects
  203.  
  204. if(modConfig.rainbowObjects) {
  205. let deg = 0
  206.  
  207. CanvasRenderingContext2D.prototype.rotate = function(e) {
  208. this.filter = `hue-rotate(${deg}deg)`
  209. this._rotate(e)
  210. deg++
  211.  
  212. if(deg > 360) {
  213. deg = 0
  214. }
  215. }
  216. }
  217. })
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  

QingJ © 2025

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