LOLBeans.io Idler

Get LOLBeans colors and accessories while doing absolutely nothing

  1. // ==UserScript==
  2. // @name LOLBeans.io Idler
  3. // @description Get LOLBeans colors and accessories while doing absolutely nothing
  4. // @author https://github.com/abbydiode
  5. // @version 2021.02.09a
  6. // @match https://lolbeans.io/*
  7. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js
  8. // @namespace https://greasyfork.org/users/875843
  9. // ==/UserScript==
  10.  
  11. function startIdler() {
  12. let idleTime = sessionStorage.idleTime ?? 0;
  13. let playButton = $('#btn-play')[0];
  14. console.log('LOLBeans Idler Started');
  15. sessionStorage.idling = true;
  16. playButton.click();
  17.  
  18. setInterval(() => {
  19. sessionStorage.idleTime = ++idleTime;
  20. $('#idle-info')[0].textContent = 'You\'ve idled for ' + idleTime + ' seconds';
  21.  
  22. $('.continue-btn.visible')[0].click();
  23. $('.new-game-btn.visible')[0].click();
  24. }, 1000);
  25. }
  26.  
  27. function loadUI() {
  28. $('#btn-play').after('<button id="btn-idle" class="cta" style="font-size:large;margin-top: 16px;">Start Idling</button>');
  29. $('#btn-idle').click(() => startIdler());
  30. $('#death-screen-quit-btn').click(() => {
  31. console.log('LOLBeans Idler Stopped');
  32. sessionStorage.idling = false;
  33. sessionStorage.idleTime = 0;
  34. location.reload();
  35. });
  36. let idleTime = 0;
  37. $('#fps').after('<div id="idle-info" style="font-family: Arial; position: absolute; bottom: 22px; left: 16px; z-index: 100; font-size: 12px; color: #fff; background-color: rgba(0,0,0,.2);">Idler Disabled</div>')
  38. }
  39.  
  40. $(() => {
  41. loadUI();
  42. if (sessionStorage.idling === "true") { setTimeout(() => startIdler(), 1000); }
  43. });