Blooket Random Game

this may or may not be bannable lol!

  1. // ==UserScript==
  2. // @name Blooket Random Game
  3. // @namespace http://fb.blooket.com/c/firebase/id
  4. // @version 0.6
  5. // @description this may or may not be bannable lol!
  6. // @author not-made-by-konz-but-give-konz-credit
  7. // @match fb.blooket.com/c/firebase/id*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=blooket.com
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. function load() {
  13. if (document.body.innerHTML.includes('"success":')) {
  14. init();
  15. } else {
  16. setTimeout(load, 1); // Check again in 100ms
  17. }
  18. }
  19.  
  20. load();
  21.  
  22. function init(){
  23. if (document.body.innerHTML.includes('"success":')) {
  24. const urlParams = new URLSearchParams(window.location.search);
  25. const id = urlParams.get('id');
  26. if (window.location.href.startsWith('https://fb.blooket.com/c/firebase/id') && document.body.innerHTML.includes('"success":true')) {
  27. window.location.href = `https://play.blooket.com/play?id=${id}`;
  28. }
  29. else {
  30. document.body.innerHTML = "";
  31. const randomCode = Math.floor(1000000 + Math.random() * 9000000);
  32. console.log('Random code:', randomCode);
  33. window.location.href = `id?id=${randomCode}&&timestamp=${Date.now()}`;
  34. location.refresh();
  35. }
  36. }
  37. };