useful hats

flipper hat, spike gear, samurai armour

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         useful hats
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  flipper hat, spike gear, samurai armour
// @author       alcachoo
// @match        http://moomoo.io/*
// @match        http://sandbox.moomoo.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

       var ID_FlipperHat = 31; // (f) to use
    var ID_SpikeGear = 11; // (caps lock) to use, i don't know if the 2 key works for it aswell.
    var ID_SamuraiArmour = 20; // (\) to use
    var ID_WinterHat = 15; // (v) to use

    document.addEventListener('keydown', function(e) {
        if(e.keyCode === 16 && document.activeElement.id.toLowerCase() !== 'chatbox')
        {
        storeEquip(0);
        }
        else if (e.keyCode === 70 && document.activeElement.id.toLowerCase() !== 'chatbox') // 70 is the keycode for (f)
        {
        storeEquip(ID_FlipperHat); // the hat in the game is named 31 in the storeEquip also called the hat shop. i made it so that ID_FlipperHat and 31 can be used though writing var ID_FlipperHat == 31. var just stands for Variable
        }
        else if (e.keyCode === 20 && document.activeElement.id.toLowerCase() !== 'chatbox')
        {
        storeEquip(ID_SpikeGear);
        }
        else if (e.keyCode === 220 && document.activeElement.id.toLowerCase() !== 'chatbox')
        {
        storeEquip(ID_SamuraiArmour);
        }
        else if (e.keycode === 86 && document.activeElement.id.toLowerCase() !== "chatbox")
        {
        storeEquip(ID_WinterHat);
        }
    });

})();