Kirka gun fire rate increase toggleable, Speed hack, Fast Reload, AutoDodge, AutoJump, & AutoSwitch.

Click X/x to toggle fire rate, B/b to toggle AutoDodge, K/k to toggle AutoWalk, G/g to toggle AutoJump, N/n to toggle KillAura/AutoShoot, L/l to toggle AutoCrouch, M/m to toggle AutoSwitch

// ==UserScript==
// @name         Kirka gun fire rate increase toggleable, Speed hack, Fast Reload, AutoDodge, AutoJump, & AutoSwitch.
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Click X/x to toggle fire rate, B/b to toggle AutoDodge, K/k to toggle AutoWalk, G/g to toggle AutoJump, N/n to toggle KillAura/AutoShoot, L/l to toggle AutoCrouch, M/m to toggle AutoSwitch
// @author       Cqmbo__
// @match        https://kirka.io/
// @match        https://kirka.io/games
// @icon         https://yt3.ggpht.com/ofXbHpiwGc4bYnwwljjZJo53E7JRODr-SG32NPV1W6QiUnGUtVAYDwTP2NMz2pUPGnt99Juh5w=s88-c-k-c0x00ffffff-no-rj
// @license MIT
// @grant        none
// ==/UserScript==

let config = {
    fireRateEnabled: false,
    autoDodgeEnabled: false,
    isAutoWalking: false,
    isAutoDashing: false,
    isKillauaActive: false,
    autoJumpEnabled: false,
    isAutoCrouching: false,
    autoSwitchEnabled: false,
    fireRateValue: 2123,
    autoJumpIntervalValue: 100,
    autoSwitchIntervalValue: 50
};

let autoDashInterval = null;
let autoJumpInterval = null;
let autoCrouchInterval = null;
let autoSwitchInterval = null;
let autoDodgeInterval = null;

function saveConfig() {
    localStorage.setItem('kirkaHackConfig', JSON.stringify(config));
}

function loadConfig() {
    const saved = localStorage.getItem('kirkaHackConfig');
    if (saved) {
        config = Object.assign(config, JSON.parse(saved));
    }
}

loadConfig();

// Store original Date.now and performance.now functions
const originalDateNow = Date.now;
const originalPerformanceNow = performance.now;

// Automatically enable the speed hack
performance.now = () => originalPerformanceNow.call(performance) * 1.25;
console.log("Speed increase enabled");

function toggleFireRate() {
    console.log(config.fireRateEnabled);
    config.fireRateEnabled = !config.fireRateEnabled;
    if (config.fireRateEnabled) {
        // Increase the Date.now function rate
        Date.now = () => originalDateNow() * (config.fireRateValue);
        console.log("Gun fire rate increase enabled");
    } else {
        // Restore original Date.now function
        Date.now = originalDateNow;
        console.log("Gun fire rate increase disabled");
    }
    updateInfoDisplay();
    saveConfig();
}

function toggleAutoDodge() {
    config.autoDodgeEnabled = !config.autoDodgeEnabled;
    if (config.autoDodgeEnabled) {
        autoDodgeInterval = setInterval(() => {
            simulateKeydown('a');
            setTimeout(() => {
                simulateKeyup('a');
                simulateKeydown('d');
                setTimeout(() => {
                    simulateKeyup('d');
                }, 10);
            }, 10);
        }, 50);
        console.log("AutoDodge enabled");
    } else {
        clearInterval(autoDodgeInterval);
        autoDodgeInterval = null;
        console.log("AutoDodge disabled");
    }
    updateInfoDisplay();
}

function toggleAutoJump() {
    config.autoJumpEnabled = !config.autoJumpEnabled;
    if (config.autoJumpEnabled) {
        autoJumpInterval = setInterval(() => {
            simulateKeydown(' ');
            setTimeout(() => {
                simulateKeyup(' ');
            }, 10);
        }, config.autoJumpIntervalValue);
        console.log("AutoJump enabled");
    } else {
        clearInterval(autoJumpInterval);
        autoJumpInterval = null;
        console.log("AutoJump disabled");
    }
    updateInfoDisplay();
}

function toggleAutoSwitch() {
    config.autoSwitchEnabled = !config.autoSwitchEnabled;
    if (config.autoSwitchEnabled) {
        autoSwitchInterval = setInterval(() => {
            simulateKeydown('1');
            setTimeout(() => {
                simulateKeyup('1');
                setTimeout(() => {
                    simulateKeydown('2');
                    setTimeout(() => {
                        simulateKeyup('2');
                        setTimeout(() => {
                            simulateKeydown('3');
                            setTimeout(() => {
                                simulateKeyup('3');
                            }, 10);
                        }, config.autoSwitchIntervalValue);
                    }, 10);
                }, config.autoSwitchIntervalValue);
            }, 10);
        }, 170);
        console.log("AutoSwitch enabled");
    } else {
        clearInterval(autoSwitchInterval);
        autoSwitchInterval = null;
        console.log("AutoSwitch disabled");
    }
    updateInfoDisplay();
}

function simulateKeydown(key) {
    const keyMap = {
        'a': { key: 'a', code: 'KeyA', keyCode: 65, which: 65 },
        'd': { key: 'd', code: 'KeyD', keyCode: 68, which: 68 },
        'w': { key: 'w', code: 'KeyW', keyCode: 87, which: 87 },
        ' ': { key: ' ', code: 'Space', keyCode: 32, which: 32 },
        'e': { key: 'e', code: 'KeyE', keyCode: 69, which: 69 },
        'Shift': { key: 'Shift', code: 'ShiftLeft', keyCode: 16, which: 16 },
        '1': { key: '1', code: 'Digit1', keyCode: 49, which: 49 },
        '2': { key: '2', code: 'Digit2', keyCode: 50, which: 50 },
        '3': { key: '3', code: 'Digit3', keyCode: 51, which: 51 }
    };

    const keydownEvent = new KeyboardEvent('keydown', {
        key: keyMap[key].key,
        code: keyMap[key].code,
        keyCode: keyMap[key].keyCode,
        which: keyMap[key].which,
        shiftKey: false,
        ctrlKey: false,
        altKey: false,
        metaKey: false,
        repeat: true,
        bubbles: true,
        cancelable: true
    });
    document.dispatchEvent(keydownEvent);
}

function simulateKeyup(key) {
    const keyMap = {
        'a': { key: 'a', code: 'KeyA', keyCode: 65, which: 65 },
        'd': { key: 'd', code: 'KeyD', keyCode: 68, which: 68 },
        'w': { key: 'w', code: 'KeyW', keyCode: 87, which: 87 },
        ' ': { key: ' ', code: 'Space', keyCode: 32, which: 32 },
        'e': { key: 'e', code: 'KeyE', keyCode: 69, which: 69 },
        'Shift': { key: 'Shift', code: 'ShiftLeft', keyCode: 16, which: 16 },
        '1': { key: '1', code: 'Digit1', keyCode: 49, which: 49 },
        '2': { key: '2', code: 'Digit2', keyCode: 50, which: 50 },
        '3': { key: '3', code: 'Digit3', keyCode: 51, which: 51 }
    };

    const keyupEvent = new KeyboardEvent('keyup', {
        key: keyMap[key].key,
        code: keyMap[key].code,
        keyCode: keyMap[key].keyCode,
        which: keyMap[key].which,
        shiftKey: false,
        ctrlKey: false,
        altKey: false,
        metaKey: false,
        repeat: false,
        bubbles: true,
        cancelable: true
    });
    document.dispatchEvent(keyupEvent);
}

function updateInfoDisplay() {
    const infoDisplay = document.getElementById("infoDisplay");
    infoDisplay.innerHTML = `
        Blatant: Fire Rate: ${config.fireRateEnabled ? 'Enabled (x)' : 'Disabled (x)'} | KillAura/AutoShoot: ${config.isKillauaActive ? 'Enabled (n)' : 'Disabled (n)'}
        <small>${config.isKillauaActive ? '(Right-click when KillAura is enabled to shoot)' : ''}</small><br>
        Movement: AutoDodge: ${config.autoDodgeEnabled ? 'Enabled (b)' : 'Disabled (b)'} | AutoWalk: ${config.isAutoWalking ? 'Enabled (k)' : 'Disabled (k)'} | AutoJump: ${config.autoJumpEnabled ? 'Enabled (g)' : 'Disabled (g)'} | AutoDash: ${config.isAutoDashing ? 'Enabled (h)' : 'Disabled (h)'} | AutoCrouch: ${config.isAutoCrouching ? 'Enabled (l)' : 'Disabled (l)'}<br>
        Fun: AutoSwitch: ${config.autoSwitchEnabled ? 'Enabled (m)' : 'Disabled (m)'}
    `;
    saveConfig();
}

// Create toggle button for info display
const toggleButton = document.createElement("button");
toggleButton.innerText = "Toggle InfoDisplay (y)";
toggleButton.style.position = "fixed";
toggleButton.style.top = "10px";
toggleButton.style.right = "10px";
toggleButton.style.zIndex = "10000";
document.body.appendChild(toggleButton);

const toggleButtonText = document.createElement("small");
toggleButtonText.innerText = "Use button or click 'y' to toggle menu/InfoDisplay";
toggleButtonText.style.position = "fixed";
toggleButtonText.style.top = "35px";
toggleButtonText.style.right = "10px";
toggleButtonText.style.zIndex = "10000";
toggleButtonText.style.color = "lime";
document.body.appendChild(toggleButtonText);

toggleButton.addEventListener("click", function() {
    const infoDisplay = document.getElementById("infoDisplay");
    infoDisplay.style.display = infoDisplay.style.display === "none" ? "block" : "none";
});

document.addEventListener("keydown", function(event) {
    if (event.key.toLowerCase() === "y") {
        const infoDisplay = document.getElementById("infoDisplay");
        infoDisplay.style.display = infoDisplay.style.display === "none" ? "block" : "none";
    }
});

// Toggle functions when pressing keys
document.addEventListener('keydown', function(event) {
    if (event.key.toLowerCase() === 'x') {
        toggleFireRate();
    } else if (event.key.toLowerCase() === 'b') {
        toggleAutoDodge();
    } else if (event.key.toLowerCase() === 'k') {
        toggleAutoWalk();
    } else if (event.key.toLowerCase() === 'g') {
        toggleAutoJump();
    } else if (event.key.toLowerCase() === 'h') {
        toggleAutoDash();
    } else if (event.key.toLowerCase() === 'n') {
        toggleKillaura();
    } else if (event.key.toLowerCase() === 'l') {
        toggleAutoCrouch();
    } else if (event.key.toLowerCase() === 'm') {
        toggleAutoSwitch();
    }
    updateInfoDisplay();
});

// Create info display
const infoDisplay = document.createElement("div");
infoDisplay.id = "infoDisplay";
infoDisplay.style.position = "fixed";
infoDisplay.style.top = "10px";
infoDisplay.style.left = "10px";
infoDisplay.style.color = "#ffffff";
infoDisplay.style.zIndex = "9999";
infoDisplay.style.backgroundColor = "rgba(0, 0, 0, 0.5)";
infoDisplay.style.padding = "5px";
infoDisplay.style.borderRadius = "5px";
document.body.appendChild(infoDisplay);

updateInfoDisplay();

// Create sliders container
const slidersContainer = document.createElement('div');
slidersContainer.id = 'kirka-sliders';
slidersContainer.style.position = 'fixed';
slidersContainer.style.top = '350px';
slidersContainer.style.right = '10px';
slidersContainer.style.zIndex = '10000';
slidersContainer.style.color = 'white';
slidersContainer.innerHTML =
    `
    <h2>Kirka Settings</h2>
    <div>
        <label for="fireRateSlider">Fire Rate (2-3000 ms):</label>
        <input type="range" id="fireRateSlider" min="2" max="3000" value="${config.fireRateValue}">
        <output id="fireRateValue">${config.fireRateValue}</output>
    </div>
    <div>
        <label for="autoJumpSlider">AutoJump Interval (10-1500 ms):</label>
        <input type="range" id="autoJumpSlider" min="10" max="1500" value="${config.autoJumpIntervalValue}">
        <output id="autoJumpValue">${config.autoJumpIntervalValue}</output>
    </div>
    <div>
        <label for="autoSwitchSlider">AutoSwitch Interval (50-1000 ms):</label>
        <input type="range" id="autoSwitchSlider" min="50" max="1000" value="${config.autoSwitchIntervalValue}">
        <output id="autoSwitchValue">${config.autoSwitchIntervalValue}</output>
    </div>
    `;
document.body.appendChild(slidersContainer);

// Function to update the slider output value
function updateSliderOutput(sliderId, outputId) {
    const slider = document.getElementById(sliderId);
    const output = document.getElementById(outputId);
    slider.addEventListener('input', () => {
        output.value = slider.value;
    });
}

// Update the slider output values on input
updateSliderOutput('fireRateSlider', 'fireRateValue');
updateSliderOutput('autoJumpSlider', 'autoJumpValue');
updateSliderOutput('autoSwitchSlider', 'autoSwitchValue');

// Add event listeners to update the values and restart intervals if active
document.getElementById('fireRateSlider').addEventListener('input', function() {
    config.fireRateValue = parseInt(this.value);
    if (config.fireRateEnabled) {
        // Re-apply fire rate if enabled
        Date.now = () => originalDateNow() * (config.fireRateValue);
    }
    saveConfig();
});
document.getElementById('autoJumpSlider').addEventListener('input', function() {
    config.autoJumpIntervalValue = parseInt(this.value);
    if (config.autoJumpEnabled) {
        // Restart autoJump if enabled
        clearInterval(autoJumpInterval);
        autoJumpInterval = setInterval(() => {
            simulateKeydown(' ');
            setTimeout(() => {
                simulateKeyup(' ');
            }, 10);
        }, config.autoJumpIntervalValue);
    }
    saveConfig();
});
document.getElementById('autoSwitchSlider').addEventListener('input', function() {
    config.autoSwitchIntervalValue = parseInt(this.value);
    if (config.autoSwitchEnabled) {
        // Restart autoSwitch if enabled
        clearInterval(autoSwitchInterval);
        autoSwitchInterval = setInterval(() => {
            simulateKeydown('1');
            setTimeout(() => {
                simulateKeyup('1');
                setTimeout(() => {
                    simulateKeydown('2');
                    setTimeout(() => {
                        simulateKeyup('2');
                        setTimeout(() => {
                            simulateKeydown('3');
                            setTimeout(() => {
                                simulateKeyup('3');
                            }, 10);
                        }, config.autoSwitchIntervalValue);
                    }, 10);
                }, config.autoSwitchIntervalValue);
            }, 10);
        }, 170);
    }
    saveConfig();
});

function toggleAutoWalk() {
    config.isAutoWalking = !config.isAutoWalking;
    if (config.isAutoWalking) {
        simulateKeydown('w');
        console.log("AutoWalk enabled");
    } else {
        simulateKeyup('w');
        console.log("AutoWalk disabled");
    }
    updateInfoDisplay();
}

function toggleKillaura() {
    config.isKillauaActive = !config.isKillauaActive;
    if (config.isKillauaActive) {
        document.addEventListener('mousedown', onMouseDownHandler);
        document.addEventListener('mouseup', onMouseUpHandler);
        console.log("KillAura/AutoShoot enabled");
    } else {
        document.removeEventListener('mousedown', onMouseDownHandler);
        document.removeEventListener('mouseup', onMouseUpHandler);
        console.log("KillAura/AutoShoot disabled");
    }
    updateInfoDisplay();
}

function onMouseDownHandler(event) {
    if (event.target.tagName === 'CANVAS') {
        simulateMouseDown();
    }
}

function onMouseUpHandler(event) {
    if (event.target.tagName === 'CANVAS') {
        simulateMouseUp();
    }
}

function simulateMouseDown() {
    const canvas = document.querySelector('canvas');
    if (canvas) {
        const mouseDownEvent = new MouseEvent('mousedown', {
            bubbles: true,
            cancelable: true,
            view: window,
            button: 0,
            clientX: canvas.width / 2,
            clientY: canvas.height / 2
        });
        canvas.dispatchEvent(mouseDownEvent);
    }
}

function simulateMouseUp() {
    const canvas = document.querySelector('canvas');
    if (canvas) {
        const mouseUpEvent = new MouseEvent('mouseup', {
            bubbles: true,
            cancelable: true,
            view: window,
            button: 0,
            clientX: canvas.width / 2,
            clientY: canvas.height / 2
        });
        canvas.dispatchEvent(mouseUpEvent);
    }
}

function toggleAutoDash() {
    config.isAutoDashing = !config.isAutoDashing;
    if (config.isAutoDashing) {
        autoDashInterval = setInterval(() => {
            simulateKeydown('e');
            setTimeout(() => {
                simulateKeyup('e');
            }, 10);
        }, 1500);
        console.log("AutoDash enabled");
    } else {
        clearInterval(autoDashInterval);
        autoDashInterval = null;
        console.log("AutoDash disabled");
    }
    updateInfoDisplay();
}

function toggleAutoCrouch() {
    config.isAutoCrouching = !config.isAutoCrouching;
    if (config.isAutoCrouching) {
        autoCrouchInterval = setInterval(() => {
            simulateKeydown('Shift');
            setTimeout(() => {
                simulateKeyup('Shift');
            }, 10);
        }, 500);
        console.log("AutoCrouch enabled");
    } else {
        clearInterval(autoCrouchInterval);
        autoCrouchInterval = null;
        console.log("AutoCrouch disabled");
    }
    updateInfoDisplay();
}

// Prevent the 'left mouse button' from stopping KillAura when clicked
document.addEventListener('mousedown', function(event) {
    if (event.button === 0 && config.isKillauaActive) {
        event.preventDefault(); // Prevent default behavior of the left mouse button
    }
});

window.onload = () => {
if (config.fireRateEnabled) {
    toggleFireRate();
    toggleFireRate();
}
if (config.autoDodgeEnabled) {
    toggleAutoDodge();
    toggleAutoDodge();
}
if (config.isAutoWalking) {
    toggleAutoWalk();
    toggleAutoWalk();
}
if (config.isAutoDashing) {
    toggleAutoDash();
    toggleAutoDash();
}
if (config.isKillauaActive) {
    toggleKillaura();
    toggleKillaura();
}
if (config.autoJumpEnabled) {
    toggleAutoJump();
    toggleAutoJump();
}
if (config.isAutoCrouching) {
    toggleAutoCrouch();
    toggleAutoCrouch();
}
if (config.autoSwitchEnabled) {
    toggleAutoSwitch();
    toggleAutoSwitch();
}

}
长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

一年攒够 12 元

云驰互联

云驰互联