Miniroyale2.io Hack 2021 | Capture the flag on key

Press [Home] key to capture the flag.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Miniroyale2.io Hack 2021 | Capture the flag on key
// @description  Press [Home] key to capture the flag.
// @author       Zeerocss
// @namespace    https://greasyfork.org/en/users/735136-zeerocss
// @iconURL      https://cdn.icon-icons.com/icons2/512/PNG/128/prog-js01_icon-icons.com_50789.png
// @version      0.3
// @include     *://miniroyale2.io/*
// ==/UserScript==

/*
If you want to change the key to another, change 36 ( at line 17 [if (event.keyCode === 36) {] ) to another number from this list:
http://gcctech.org/csc/javascript/javascript_keycodes.htm
*/

window.onkeydown = function(event) {
   if (event.keyCode === 36) {
//----------------------------------------------------------------

    var get = {};
    get.getEntityByName = function(a) {
        return Object.values(pc.app._entityIndex).find(get => get.name == a);
    };
    var nm = get.getEntityByName("NetworkManager");

//----------------------------------------------------------------

nm == (nm.script.network.setFlagBack(), nm.script.network.setSavedFlag(), nm.script.network.setCaptureFlag());

//----------------------------------------------------------------
   }
};