Auto Walk[NumPad 1] and Walk+Jump[NumPad 2] Mod For Shell Shockers

Auto Walk and Walk+Jump script triggered by numpad keys (1 and 2), initially disabled.

目前为 2024-06-03 提交的版本。查看 最新版本

// ==UserScript==
// @name         Auto Walk[NumPad 1] and Walk+Jump[NumPad 2] Mod For Shell Shockers
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Auto Walk and Walk+Jump script triggered by numpad keys (1 and 2), initially disabled.
// @match        *://algebra.best/*
// @match        *://algebra.vip/*
// @match        *://biologyclass.club/*
// @match        *://deadlyegg.com/*
// @match        *://deathegg.world/*
// @match        *://eggcombat.com/*
// @match        *://egg.dance/*
// @match        *://eggfacts.fun/*
// @match        *://egghead.institute/*
// @match        *://eggisthenewblack.com/*
// @match        *://eggsarecool.com/*
// @match        *://geometry.best/*
// @match        *://geometry.monster/*
// @match        *://geometry.pw/*
// @match        *://geometry.report/*
// @match        *://hardboiled.life/*
// @match        *://hardshell.life/*
// @match        *://humanorganising.org/*
// @match        *://mathdrills.info/*
// @match        *://mathfun.rocks/*
// @match        *://mathgames.world/*
// @match        *://math.international/*
// @match        *://mathlete.fun/*
// @match        *://mathlete.pro/*
// @match        *://overeasy.club/*
// @match        *://scrambled.best/*
// @match        *://scrambled.tech/*
// @match        *://scrambled.today/*
// @match        *://scrambled.us/*
// @match        *://scrambled.world/*
// @match        *://shellshockers.club/*
// @match        *://shellshockers.site/*
// @match        *://shellshockers.us/*
// @match        *://shellshockers.world/*
// @match        *://softboiled.club/*
// @match        *://violentegg.club/*
// @match        *://violentegg.fun/*
// @match        *://yolk.best/*
// @match        *://yolk.life/*
// @match        *://yolk.rocks/*
// @match        *://yolk.tech/*
// @match        *://shellshock.io/*
// @match        *://zygote.cafe/*
// @grant        none
// @icon         -
// @run-at       document-start
// @require      https://cdn.jsdelivr.net/npm/[email protected]/babylon.min.js
// ==/UserScript==

(function() {
    'use strict';

    let autoWalkActive = false;

    function triggerKeyDown(key) {
        document.dispatchEvent(new KeyboardEvent('keydown', { 'key': key }));
    }

    function triggerKeyUp(key) {
        document.dispatchEvent(new KeyboardEvent('keyup', { 'key': key }));
    }

    function autoWalk() {
        if (autoWalkActive) {
            triggerKeyDown('w');
        } else {
            triggerKeyUp('w');
        }
    }

    let autoWalkInterval;
    let autoWalkJumpInterval;

    document.addEventListener('keydown', function(event) {
        // Toggle auto walk on Numpad1
        if (event.code === 'Numpad1' && !event.ctrlKey && !event.altKey && !event.shiftKey && !event.metaKey) {
            autoWalkActive = !autoWalkActive;
            autoWalk();
        }
        // Toggle auto walk+jump on Numpad2
        else if (event.code === 'Numpad2' && !event.ctrlKey && !event.altKey && !event.shiftKey && !event.metaKey) {
            if (!autoWalkJumpInterval) {
                autoWalkJumpInterval = setInterval(() => {
                    triggerKeyDown('w');
                    triggerKeyDownUp(' ');
                }, 100);
            } else {
                clearInterval(autoWalkJumpInterval);
                triggerKeyUp('w');
                autoWalkJumpInterval = null;
            }
        }
    });

    function triggerKeyDownUp(key) {
        document.dispatchEvent(new KeyboardEvent('keydown', { 'key': key }));
        setTimeout(() => {
            document.dispatchEvent(new KeyboardEvent('keyup', { 'key': key }));
        }, 100);
    }
})();

QingJ © 2025

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