respawn script for tricksplit.io

instantly respawn with a press of a button

ของเมื่อวันที่ 11-08-2020 ดู เวอร์ชันล่าสุด

// ==UserScript==
// @name         respawn script for tricksplit.io
// @namespace    http://tampermonkey.net/
// @version      2.3
// @description  instantly respawn with a press of a button
// @author       sos
// @match        https://tricksplit.io/
// @grant        none
// ==/UserScript==
window.addEventListener('keydown', keydown);
window.addEventListener('keydown', fakeClip);
window.addEventListener('keyup', keyup);
var menu = document.getElementsByClassName('menu');
var endPanel = document.getElementsByClassName('end');
var closePanel = document.getElementsByClassName('closePanel');
window.onload = function(){
    closePanel[0].click(); // automaticlly closes the newSkins window at the start of the game
    window.game.animationDelay = 50; // Set this to any animation delay you want, !WARNING! if you set the animation delay below 1, your game is not gonna work
    setTimeout(startCollection, 5000);
};
function startCollection() {
    var freeCoins = document.getElementById("freeCoins");
    freeCoins.onclick = function() {
        console.log('auto coins collection started');
        window.game.api.utils.claimFreeCoins();
        setInterval(collectCoins, 7210000);
    }
}
function collectCoins() {

   window.game.api.utils.claimFreeCoins();

}
function keydown(event) {
    if (event.keyCode == 68) { // 68 is equal to the key D if you want to change it then look at the link at the end of the script for the list of key codes numbers
        spawn();
    }
}
function keyup(event) {
    if (event.keyCode == 68) {
        return;
    }
}
function spawn() {
   if (menu[0].style.display === "none" && window.game.chat.focused === false) {
          window.game.socket.onClose("xd");
          endPanel[0].style.display = "none";
          document.getElementById('overlays').style.display = "none";
          setTimeout(function() {
              window.game.spawn();
          }, 1000);
   }
}

function fakeClip(event) {
    if (event.keyCode == 70 && window.game.chat.focused === false) {
        window.game.socket.split();
        setTimeout(function() {
            window.game.socket.send(new Uint8Array([0x33]))
            setTimeout(function() {
               window.game.socket.send(new Uint8Array([0x18]))
            }, 400)
        }, 500)
    }
}

//     https://docstore.mik.ua/orelly/webprog/DHTML_javascript/0596004672_jvdhtmlckbk-app-b.html     \\ Link for key codes numbers