CoordsHelper

Now you’ve got more chances in PvP :)

// ==UserScript==
// @name        CoordsHelper
// @namespace   Violentmonkey Scripts
// @match       *://cavegame.io/*
// @match       *://mineroyale.io/*
// @grant       none
// @version     0.1.1.1
// @author      Drik
// @description Now you’ve got more chances in PvP :)
// ==/UserScript==

(function() {
    'use strict';
    let Drik = 0;
    let cavegame = 0;
    let a = null, b = null, c = null, d = null;

    window.addEventListener("keyup", function(e) {
        if(e.key.toLowerCase() === "r") {
            let tEvent = new KeyboardEvent('keydown', {
                key: "t",
                code: "KeyT",
                keyCode: 84,
                which: 84,
                bubbles: true,
                cancelable: true
            });
            document.dispatchEvent(tEvent);

            let coordsElem = document.querySelector('.player-position.no-select');
            let chatInput = document.querySelector('#chat-input');
            if(coordsElem && chatInput) {
                chatInput.value = coordsElem.textContent.trim();

                let enterEvent = new KeyboardEvent('keydown', {
                    key: "Enter",
                    code: "Enter",
                    keyCode: 13,
                    which: 13,
                    bubbles: true,
                    cancelable: true
                });
                chatInput.dispatchEvent(enterEvent);
            }
        }
    });
})();