Roblox bulk log-in helper

Makes logging in with a combolist easier

  1. // ==UserScript==
  2. // @name Roblox bulk log-in helper
  3. // @namespace Roblox bulk log-in helper
  4. // @license Insanity
  5. // @version 1.01
  6. // @description Makes logging in with a combolist easier
  7. // @match https://www.roblox.com/*/login*
  8. // @match https://www.roblox.com/*/Login*
  9. // @match https://www.roblox.com/login*
  10. // @match https://www.roblox.com/Login*
  11. // @icon https://www.google.com/s2/favicons?sz=64&domain=roblox.com
  12. // ==/UserScript==
  13.  
  14. (async function() {
  15. 'use strict';
  16. const url = window.document.location.href;
  17.  
  18. if (!url.includes('securityNotification')) {
  19. // Log-in
  20. const usernameElem = await document.querySelector('#login-username');
  21. const passwordElem = await document.querySelector('#login-password');
  22. const loginElem = await document.querySelector('#login-button');
  23.  
  24. if (usernameElem && passwordElem) {
  25.  
  26. const redefineValue = (elem, newValue) => {
  27. Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value')
  28. .set.call(elem, newValue);
  29. elem.dispatchEvent(new Event('input', { bubbles: true }));
  30. };
  31.  
  32.  
  33. while (true) {
  34. if (usernameElem.value.includes(':')) {
  35. const [ username, password ] = usernameElem.value.split(':');
  36.  
  37. await redefineValue(usernameElem, username);
  38. await redefineValue(passwordElem, password);
  39.  
  40. loginElem.click();
  41. break;
  42. }
  43.  
  44. await new Promise(resolve => setTimeout(resolve, 100));
  45. }
  46. }
  47.  
  48. // Fail check
  49. const polite = document.querySelector("#login-form .login-form > .password-form-group > div");
  50. if (!polite) return console.error("Element not found. Exiting.");
  51.  
  52. while (true) {
  53. try {
  54. const message = polite.querySelector("p");
  55. if (message && message.textContent === 'Incorrect username or password.') {
  56. window.document.location.href = 'https://www.roblox.com/login';
  57. break;
  58. }
  59. } catch (e) {}
  60.  
  61. await new Promise(resolve => setTimeout(resolve, 100));
  62. }
  63. } else window.document.location.href = 'https://www.roblox.com/login';
  64. })();