// ==UserScript== // @name Menu template for your script // @namespace none // @version 1 // @description I just did it because I'm bored... How you will use this menu depends on you! I did it for the developers of cheats on Moo Moo.io, but it can be used on any game. // @author 00100110#6361 // @match *://moomoo.io/* // @match *://*.moomoo.io/* // @grant none // @downloadURL https://update.greasyfork.icu/scripts/433607/Menu%20template%20for%20your%20script.user.js // @updateURL https://update.greasyfork.icu/scripts/433607/Menu%20template%20for%20your%20script.meta.js // ==/UserScript== /* Stting menu */ let menu = { opacity: 1, position: { relative: `relative`, absolute: `absolute`, top: `${70}px`, left: `${20}px`, bottom: `${0}px`, right: `${0}px`, }, size: { width: `${330}px`, height: `${400}px`, height_title_block: `${30}px`, border_body_block: `${5}px`, border_radius_body_block: `${7}px`, font_size_title_block: `${21}px`, font_size_inner_block: `${18}px` }, colors: { background_title_block: `rgba(66, 66, 66, 0.61)`, background_body_block: `rgba(0, 0, 0, 0.25)`, background_inner_block: `rgba(0, 0, 0, 0.25)`, border_body_block: `rgba(38, 38, 38, 0.72)`, title_text: `#fff`, inner_block: `#fff`, }, display: { block: `block`, flex: `flex`, none: `none` }, align: { left: `left`, center: `center`, right: `right`, bottom: `bottom` } } menu = new Proxy(menu, { set(target, prop, val) { if (prop in target) { return true if (typeof val != 'string') { target[prop] = val.toString() } else { return target[prop] } } else { return prop return false throw new Error(`Prop: ${prop} not defined in ${target}`) } } }); /* Create menu HTML code */ const html = `
Menu
Your text
` /* Create menu CSS code */ let css = ` ` /* Create menu JS code */ let js = ` ` /* Add menu in body */ $('body').append(html, css, js) /* Add toggler for menu */ let openMenu = true document.addEventListener("keydown", function(event) { if (event.code == "Escape") { if (openMenu) { openMenu = false $('.menu--holder').css('display', menu.display.block) } else { openMenu = true $('.menu--holder').css('display', menu.display.none) } } })