- // ==UserScript==
- // @name Rainbow UI 🌈 | Ad Block 🛑 | Better Map 🗺 | Show Ping 🏓 | And More … | MooMoo.IO
- // @namespace -
- // @version 1.3.1
- // @description Rainbow UI, ad block, better map, always show ping, start with extra resources, and more for moomoo.io.
- // @author NotYou
- // @include *://moomoo.io/*
- // @include *://*.moomoo.io/*
- // @match https://moomoo.io/*
- // @match https://*.moomoo.io/*
- // @match http://moomoo.io/*
- // @match http://*.moomoo.io/*
- // @run-at document-body
- // @license GPL-3.0-or-later
- // @grant none
- // ==/UserScript==
-
- // You can change "false" to "true" (without quotes)
- let modConfig = {
- rainbowObjects: false,
- }
-
- // Do NOT edit code below
-
- let extra = function() {
- let getResources = window.follmoo
-
- if(getResources) {
- getResources()
- }
- }
- let style = document.createElement('style')
- style.appendChild(document.createTextNode(`
- :root {
- --w: rgb(255, 255, 255);
- --b: rgb(19, 19, 19);
- --f: rgb(9, 9, 9);
- --b-t: rgba(0, 0, 0, 0.6);
- --f-t: rgba(0, 0, 0, 0.8);
- }
-
- /* AD BLOCK */
-
- #adCard, #menuContainer > :last-child, #promoImgHolder, #pre-content-container, #ot-sdk-btn-floating, #moomooio_728x90_home, #moomooio_300x250_1,
-
- /* COOKIE BLOCK */
-
- #onetrust-consent-sdk
-
- {
- display: none !important;
- }
-
- /* RAINBOW UI */
-
- #serverBrowser, #vipServerBrowser, .menuCard, #linksContainer2 {
- background-color: var(--b);
- }
-
- #loadingText, #diedText, #gameName, #partyButton, #youtuberOf, #pingDisplay, #ageText, #linksContainer2, #enterGame span, #nameInput, .material-icons {
- color: var(--f);
- }
-
- #ageBody, #actionBar *, #resDisplay *, #upgradeHolder *, #mapDisplay, #topInfoHolder, #killCounter, .uiElement, #ageBar, #storeHolder, .storeTab, #allianceHolder, #allianceManager *, #chatBox, .notifButton {
- background-color: var(--f-t) !important;
- }
-
- .uiElement.gameButton:hover, #actionBar *:hover, #upgradeHolder *:hover, .storeTab:hover, .notifButton:hover {
- background-color: var(--b-t);
- }
-
- #menuCardHolder[style*="block"] {
- display: grid !important;
- }
-
- #rightCardHolder, #guideCard {
- height: 147px;
- }
-
- .menuCard {
- box-shadow: var(--f) 0 7px;
- }
-
- .menuCard * {
- color: var(--w);
- }
-
- #serverBrowser, #vipServerBrowser {
- border: 1px solid var(--f);
- }
-
- #gameName {
- 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;
- }
-
- #ageBarBody {
- background-color: red;
- }
-
- #gameUI .material-icons, .joinAlBtn {
- color: red !important;
- }
-
- #enterGame, #joinPartyButton, #ageBarBody, #gameUI .material-icons, .joinAlBtn, a {
- animation: 5s infinite linear both normal rainbow;
- }
-
- @keyframes rainbow {
- 0% { filter: hue-rotate(0deg) }
- 100% { filter: hue-rotate(360deg) }
- }
-
- /* OTHER */
-
- #mapDisplay {
- background-image: url(https://ksw2-center.glitch.me/users/fzb/map.png) !important;
- background-size: contain !important;
- }
-
- #topInfoHolder {
- border-radius: 3px;
- }
-
- #pingDisplay {
- display: block;
- }
-
- #vipServerBrowser {
- width: 100%;
- height: 24px;
- }
-
- /* MODIFICATIONS */
-
- ${modConfig.invertColors ? `
- #gameCanvas {
- -webkit-filter: invert(1);
- filter: invert(1);
- }
- `: ''}
-
- `))
- document.head.appendChild(style)
-
- window.addEventListener('DOMContentLoaded', () => {
- let mainMenu = document.querySelector('#mainMenu')
-
- CanvasRenderingContext2D.prototype._rotate = CanvasRenderingContext2D.prototype.rotate
-
- let discord = document.querySelector('#linksContainer2 [href*="discord"]')
- discord.href = '//gf.qytechs.cn/scripts/449133'
- discord.innerHTML = 'Rainbow UI'
-
- // Always show ping
- mainMenu.insertAdjacentElement('beforebegin', document.querySelector('#pingDisplay'))
-
- // Extra Resources
- ;(function() {
- extra()
-
- let obs = new MutationObserver(extra)
- obs.observe(document.body, {
- childList: true,
- subtree: true,
- })
- })()
-
- // VIP Servers
- ;(function() {
- document.querySelector('#altServer').insertAdjacentHTML('afterend', '<div class="menuHeader" style="margin-top:10px">VIP Servers</div><select id="vipServerBrowser"><option selected="">Select Server</option></select>')
-
- let serverBrowser = document.querySelector('#serverBrowser')
- let vipServerBrowser = document.querySelector('#vipServerBrowser')
- let obs = new MutationObserver(() => {
- let servers = Array.from(serverBrowser.children).filter(e => e.textContent.includes('[0/'))
-
- if(servers.length > 1) {
- servers.forEach(e => {
- e = e.cloneNode(true)
- e.textContent = e.textContent.split(' [')[0]
- vipServerBrowser.insertAdjacentElement('beforeend', e)
- })
-
- vipServerBrowser.addEventListener('click', e => {
- let value = e.target.value
-
- if(value.includes(':')) {
- location.replace('http://moomoo.io/?server=' + value)
- }
- })
-
- obs.disconnect()
- }
- })
-
- obs.observe(mainMenu, {
- childList: true,
- subtree: true,
- })
- })()
-
- // Rainbow Objects
-
- if(modConfig.rainbowObjects) {
- let deg = 0
-
- CanvasRenderingContext2D.prototype.rotate = function(e) {
- this.filter = `hue-rotate(${deg}deg)`
- this._rotate(e)
- deg++
-
- if(deg > 360) {
- deg = 0
- }
- }
- }
- })
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-