Zombs.io Auto heal

a working zombs auto heal

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name        Zombs.io Auto heal
// @namespace    http://tampermonkey.net/
// @version      v1.1
// @description  a working zombs auto heal
// @author       HellHouse
// @match        http//zombs.io/
// @grant        none
// ==/UserScript==

(function() {
 heal = document.getElementbyClassName('hud-shop-item')[9];
 Petheal = document.getElementbyClassName('hud-shop-item')[10];
useheal = document.getElementbyClassName('hud-toolbar-item')[4];
usePetheal = document.getElementbyClassName('hud-toolbar-item')[5];
healthBar = document.getElementbyClassName('hud-heath-bar-inner')[0];
up = new Event('mouseup');
healLevel = 70


HEAL = function(){
    heal.attributes.class.value = 'hud-shop-item';
    petHeal.attributes.class.value = 'hud-shop-item';
    useHeal.dispatchEvent(up);
    usePetHeal.dispatchEvent(up);
    heal.click();
    petheal();
};

script = function(e){
    if(e.keyCode == 82){
        HEAL();
    }
};

document.add.Eventlistener('keydown',function(e){
    script(e);
});
observer = new mutationObserver(function(e){
    mutation.forEach(function(mutationRecord) {
        if(parsint(mutations[0].target.style.width) < healLevel){
            HEAL();

        }

    });
});
observer.observe(healthBar, { attributes : true , attributeFilter : ['style'] });
});