Mario ModMenu

Including, ESP, Kill Nearby Entities, Tracers, Infinity Coins, Infinity Score, Infinity Time, Infinity Lives.

目前為 2024-01-19 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Mario ModMenu
// @namespace    http://tampermonkey.net/
// @version       2024-01-20
// @description  Including, ESP, Kill Nearby Entities, Tracers, Infinity Coins, Infinity Score, Infinity Time, Infinity Lives.
// @author       You
// @license      MIT
// @match        https://gamaverse.com/c/f/g/super-mario-bros/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=gamaverse.com
// @grant        none
// ==/UserScript==

(function() {
    setTimeout(function() {
        var ww = document.createElement('div')
        ww.id="modWrap"
        ww.innerHTML=`
<a id="title">GabiMod</a>
<div id="mods">
    <div id="checks">
    <div class="checkW">
        <input class="check" type="checkbox">
        <a class="checkDesc">Player Hitbox</a>
    </div>
    <div class="checkW">
        <input class="check" type="checkbox">
        <a class="checkDesc">Enemy Hitbox</a>
    </div>
    <div class="checkW">
        <input class="check" type="checkbox">
        <a class="checkDesc">Tracers</a>
    </div>
    <div class="checkW">
        <input class="check" type="checkbox">
        <a class="checkDesc">Distance</a>
    </div>
    <div class="checkW">
        <input class="check" type="checkbox">
        <a class="checkDesc">Star</a>
    </div>
    <div class="checkW">
        <input class="check" type="checkbox">
        <a class="checkDesc">Freeze Entities</a>
    </div>
    </div>
    <br>
    <div id="values">
    <div class="mod">
        <input type="text" class="modInput" placeholder="Set Coins">
        <input type="button" class="modBtn" value="Apply">
    </div>
    <div class="mod">
        <input type="text" class="modInput" placeholder="Set Score">
        <input type="button" class="modBtn" value="Apply">
    </div>
    <div class="mod">
        <input type="text" class="modInput" placeholder="Set Lives">
        <input type="button" class="modBtn" value="Apply">
    </div>
    <div class="mod">
        <input type="text" class="modInput" placeholder="Set Gravity">
        <input type="button" class="modBtn" value="Apply">
    </div>
    <div class="mod">
        <input type="text" class="modInput" placeholder="Set Time">
        <input type="button" class="modBtn" value="Apply">
    </div>
    <div class="mod">
        <input type="text" class="modInput" placeholder="Set BG Color">
        <input type="button" class="modBtn" value="Apply">
        </div>
    </div>
    <div id="buttonMods">
    <button class="buttonMod">Turn Big</button>
    <button class="buttonMod">Shoot Flames</button>
    <button class="buttonMod">Kill Nearby Enemies</button>
    <button class="buttonMod">Remove Bushes</button>
    <button class="buttonMod">Remove Clouds</button>
    <button class="buttonMod">Remove Hills</button>
    </div>
</div>

<style>
    ::-webkit-scrollbar {
        width: 0.8vw;
    }

    ::-webkit-scrollbar-thumb {
        background: rgb(151, 151, 151);
        border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #c7c7c7;
    }

    #title {
        position: relative;
        display: inline-block;
        height: 0;
        top: 1%;
        font-size: 10pt;
        color: c6c6c6;
    }

    #modWrap {
        z-index: 3232;
        position: absolute;
        font-family: "Lucida Console", "Courier New", monospace;
        border: 2px #505050 solid;
        border-radius: 0.5vw;
        background: black;
        user-select: none;
        opacity: 0.95;
        height: 20vw;
        width: 17vw;
    }


    #mods {
        position: relative;
        overflow-y: scroll;
        overflow-x: hidden;
        height: 79%;
        top: 10%;

    }

    #checks {
        text-align: left;
        position: relative;
        top: 2%;
        left: 5%;
    }

    .checkW {
        margin-top: 2%;
    }

    .check {
        outline: #acacac 1px solid;
        vertical-align: middle;
        appearance: none;
        border-radius: 30%;
        height: 1.3vw;
        width: 1.3vw;
        top: 30%;
    }

    .check:checked {
        background-color: #acacac;
    }

    .checkDesc {
        color: white;
        font-size: 1.2vw;
    }


    #values {
        position: relative;
    }

    .mod {
        position: relative;
        margin-bottom: 3%;
        margin-top: 3%;
    }


    .modInput {
        border-radius: 0.4vw 0 0 0.4vw;
        border: 2px #505050 solid;
        background: #b0b0b0;
        height: 18%;
        width: 60%;
    }

    .modInput,
    ::-webkit-input-placeholder {
        position: relative;
        color: #505050;
        left: 4%;
    }

    .modInput:focus {
        outline: none
    }

    .modBtn {
        border-radius: 0 0.4vw 0.4vw 0;
        border: 2px #505050 solid;
        background: #505050;
        transition: all 0.3s;
        position: relative;
        font-size: 10pt;
        color: #c0c0c0;
        height: 18%;
        width: 25%;
        left: -1%;
    }
    .modBtn:hover {
        background: #707070;
    }


    #buttonMods {
        position: absolute;
        left: 3%;
        height: 100%;
    }
    .buttonMod {
        border: 2px #c0c0c0 solid;
        background: #505050;
        transition: all 0.3s;
        border-radius: 0.4vw;
        margin-bottom: 2%;
        margin-top: 2%;
        color: #d0d0d0;
        height: 14%;
        width: 90%;

    }
    .buttonMod:hover {
        background: #707070;
    }
</style>`
        document.body.appendChild(ww)
        var title = document.getElementById('title')
        var gui = document.getElementById('modWrap')

        window.onload = addListeners();


        function addListeners(){
            title.addEventListener('mousedown', mouseDown, false);
            window.addEventListener('mouseup', mouseUp, false);
        }
        function mouseUp() {
            window.removeEventListener('mousemove', divMove, true);
            document.body.style.userSelect="all"
        }

        function mouseDown(e){
            document.body.style.userSelect="none"
            window.addEventListener('mousemove', divMove, true);
        }

        function divMove(e) {
            gui.style.left=e.clientX-110+"px"
            gui.style.top=e.clientY-10+"px"
        }





        var pEsp = false;
        var eEsp = false;
        var tracer = false;
        var eDis = false;
        var canvas = document.querySelector("body > canvas")



        drawThingOnCanvas = (function() {
            var cached_function = drawThingOnCanvas;
            return function() {
                var result = cached_function.apply(this, arguments); // use .apply() to call it
                updateDrawings() // <- add this function to update function
                return result;
            };
        })()

        function updateDrawings() {
            for(var i=0;i<characters.length;i++) {
                if(characters[i].type=="mario" && pEsp==true) {
                    context.beginPath()
                    context.strokeStyle="#00ff00"
                    context.strokeRect(
                        characters[i].left,
                        characters[i].top,
                        characters[i].width*4,
                        characters[i].height*4
                    )
                    context.stroke()
                }
                if(characters[i].type!="coin" && characters[i].type!="fireball") {
                    var dx = mario.left-characters[i].left
                    var dy = mario.top-characters[i].top
                    var distance = Math.round(Math.sqrt(dx*dx+dy*dy))
                    if(abs(distance)<canvas.width-mario.left-50) {


                        if(characters[i].type!="mario" && eEsp==true) {
                            context.beginPath()
                            context.strokeStyle="#ff0000"
                            context.strokeRect(
                                characters[i].left,
                                characters[i].top,
                                characters[i].width*4,
                                characters[i].height*4
                            )
                            context.stroke()
                        }

                        if(characters[i].type!="mario" && tracer==true) {
                            console.log(characters[i].type)
                            context.beginPath()
                            context.moveTo(mario.left+15,mario.top+10)
                            context.lineTo(characters[i].left+13,characters[i].top+10)
                            context.strokeStyle="#00ff00"
                            context.stroke()
                        }
                        if(characters[i].type!="mario" && eDis==true) {
                            context.fillStyle = "blue";
                            context.font = "bold 10px Arial";
                            context.textAlign = 'center';
                            context.textBaseline = 'middle';
                            context.rotate(40+"deg")
                            context.fillText(distance, ((characters[i].left+mario.left)/2), ((mario.top+characters[i].top)/2));
                        }
                    }
                }
            }
        }

        var check = document.getElementsByClassName("check")
        var modBtn = document.getElementsByClassName("modBtn")
        var modInput = document.getElementsByClassName("modInput")
        var modInput = document.getElementsByClassName("modInput")
        var buttonMod = document.getElementsByClassName("buttonMod")




        check[0].addEventListener('click', (e) => {
            if(check[0].checked==true) {
                pEsp = true;
            }
            else {
                pEsp = false
            }
        })
        check[1].addEventListener('click', (e) => {
            if(check[1].checked==true) {
                eEsp = true;
            }
            else {
                eEsp = false
            }
        })
        check[2].addEventListener('click', (e) => {
            if(check[2].checked==true) {
                tracer = true;
            }
            else {
                tracer = false
            }
        })
        check[3].addEventListener('click', (e) => {
            if(check[3].checked==true) {
                eDis = true;
            }
            else {
                eDis = false
            }
        })
        check[4].addEventListener('click', (e) => {
            if(check[4].checked==true) {

                ++mario.star;
                play("Powerup.wav");
                playTheme("Starman", true);
                addEvent(marioRemoveStar, 549849343343, mario);
                switchClass(mario, "normal", "star");
                addSpriteCycle(mario, ["star1", "star2", "star3", "star4"], "star", 5);
            }
            else {

                var me = mario
                mario.star=0;
                addEvent(marioRemoveStar, 0, mario);
                switchClass(mario, "star", "normal");
                clearAllCycles(mario, ["star1", "star2", "star3", "star4"], "star", 5);
            }
        })
        check[5].addEventListener('click', (e) => {
            if(check[5].checked==true) {
                var freeze = setInterval(function() {
                    for(var i=0;i<characters.length;i++) {
                        if(characters[i].type!="mario") {
                            characters[i].lastSpeed = characters[1].xvel
                            characters[i].xvel=0
                        }
                    }
                },300)
                }
            else {
                for(var i=0;i<characters.length;i++) {
                    clearInterval(freeze)
                    if(characters[i].type!="mario") {
                        characters[i].xvel=characters[i].lastSpeed
                    }
                }
            }
        })

        modBtn[0].addEventListener('click', function() {
            data.coins.amount=parseInt(modInput[0].value)
            updateDataElement(data.coins)
        })
        modBtn[1].addEventListener('click', function() {
            data.score.amount=parseInt(modInput[1].value)
            updateDataElement(data.score)
        })
        modBtn[2].addEventListener('click', function() {
            data.lives.amount=parseInt(modInput[2].value)
            updateDataElement(data.lives)
        })
        modBtn[3].addEventListener('click', function() {
            mario.gravity=parseInt(modInput[3].value)/30
        })
        modBtn[4].addEventListener('click', function() {
            data.time.amount=parseInt(modInput[4].value)
            updateDataElement(data.time)
        })
        modBtn[5].addEventListener('click', function() {
            map.area.fillStyle=modInput[5].value
        })
        function remScenery(name) {
            for(var i=0;i<scenery.length;i++) {
                if(scenery[i].title.includes(name)) {
                    fireExplodes(scenery[i])
                }
            }
        }

        buttonMod[0].addEventListener('click', function() {
            mario.shrooming = true;
            mario.power=2
            marioGetsBig(mario)
            storeMarioStats();
        })
        buttonMod[1].addEventListener('click', function() {
            mario.shrooming = true;
            mario.power=3
            marioGetsBig(mario)
            marioGetsFire(mario)
            storeMarioStats();
        })
        buttonMod[2].addEventListener('click', function() {
            for(var i=0;i<characters.length;i++) {
                if(characters[i].type=="goomba" || characters[i].type=="koopa") {
                    fireExplodes(characters[i])
                }
            }
        })
        buttonMod[3].addEventListener('click', function() {
            remScenery("Bush")
        })
        buttonMod[4].addEventListener('click', function() {
            remScenery("Cloud")
        })
        buttonMod[5].addEventListener('click', function() {
            remScenery("Hill")
        })
    },100)

})();