Blob.io - Remove the Respawn Timer

This'll help you respawn without having to wait five seconds. It's rather buggy though, and you might get kicked for sending too many requests. Press R to use it.

目前为 2025-03-10 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Blob.io - Remove the Respawn Timer
  3. // @namespace http://tampermonkey.net/
  4. // @version 3.14
  5. // @description This'll help you respawn without having to wait five seconds. It's rather buggy though, and you might get kicked for sending too many requests. Press R to use it.
  6. // @author Ryuunosuke Akasaka
  7. // @match https://blobgame.io/*
  8. // @match http*://custom.client.blobgame.io/*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=blobgame.io
  10. // @grant none
  11. // @license MIT
  12. // ==/UserScript==
  13.  
  14. var res = document.getElementById("restart-game")
  15. var message = document.querySelector('#message')
  16. var enterKeyEvent = new KeyboardEvent('keyup', { key: 'Enter', keyCode: 13 });
  17.  
  18. // var ejectorLoop = null
  19.  
  20. async function check() {
  21. message.style.display = "block";
  22. message.value = '/kill';
  23. message.dispatchEvent(enterKeyEvent);
  24. await new Promise(r => setTimeout(r, 150)); // timeout because otherwise you'll go to the respawn page instaed of instantly respawning
  25. if (res.disabled) {
  26. res.disabled = false;
  27. res.click(res);
  28. // console.log("Disabled no more!");
  29. }
  30. else {
  31. res.click(res);
  32. // console.log("It wasn't even disabled!");
  33.  
  34. /* Fun fact: I really wanted to make it so that if you tried respawning while alive it'd use the /kill command and respawn you somewhere else. To set the value of the message box was easy:
  35. var msg = document.getElementById("message")
  36. msg.value = "/kill" TGJoIHBuYSBwYmFnbnBnIHpyIGd1Z
  37. But I, for the life of me, couldn't figure out how to send the said message. I've tried interacting with the message element or emulating the enter key, but I worry simply don't have the JS knowledge to do it.
  38. If the answer is ridicilously easy, please don't contact me about it. Ever.
  39. I threw this together within several hours sparked by mere curiosity. I didn't know much JS, now I know slightly more. Yay.
  40. I'd be very happy if this nonsense ended up helping someone else. Please take care, should you be reading this. WJodHUgUXZmcGJlcTogVmFmbmFyeGIjMD
  41.  
  42. Solved!
  43. */
  44. }
  45. }
  46. function onKeydown(e) {
  47. if (e.keyCode == 192) { // This is the R key's keycode. You can change it to whatever you'd like. See https://keycodes.info
  48. check();
  49. }
  50. // The code below is to buffer the w button, but it's not really useful (read: fast) considering the buffer blob.io has built-in
  51. // else if (e.keyCode == 87) { // key W
  52. // if(!ejectorLoop) {
  53. // ejectorLoop = setInterval(function() {
  54. // window.onkeydown({ keyCode: 87 });
  55. // window.onkeyup({ keyCode: 87 }); I2Mi4gSnVuZyBuIGFyZXEgbGJoIG5lciEgPDM=
  56. // }, 10);
  57. // }
  58. // }
  59.  
  60. }
  61. document.addEventListener('keydown', onKeydown, true);