Roblox group claimer with auto join, and discord webhooks

Finds unclaimed roblox groups and sends them to a webhook, or auto joins them!

  1. // ==UserScript==
  2. // @name Roblox group claimer with auto join, and discord webhooks
  3. // @namespace Roblox group claimer
  4. // @version 2
  5. // @description Finds unclaimed roblox groups and sends them to a webhook, or auto joins them!
  6. // @author ._._.dustin
  7. // @match https://roblox.com/*
  8. // @grant GM_xmlhttpRequest
  9. // @license MIT
  10. // @contributionURL https://www.buymeacoffee.com/dustin21335
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. const useDiscordWebhook = true; // Set to true if you want to use a discord webhook
  17. const autoClaim = true; // Set to true if you want to auto claim groups
  18.  
  19. const webhookURL = 'DISCORD_WEBHOOK'; // Put discord webhook where DISCORD_WEBHOOK is
  20. const threads = 5;
  21.  
  22. function groupFinder(id) {
  23. GM_xmlhttpRequest({
  24. method: 'GET',
  25. url: `https://www.roblox.com/groups/group.aspx?gid=${id}`,
  26. onload: function(response) {
  27. if (response.responseText.includes('owned')) {
  28. } else {
  29. GM_xmlhttpRequest({
  30. method: 'GET',
  31. url: `https://groups.roblox.com/v1/groups/${id}`,
  32. onload: function(groupResponse) {
  33. const data = JSON.parse(groupResponse.responseText);
  34. if (!groupResponse.responseText.includes('isLocked') && groupResponse.responseText.includes('owner')) {
  35. if (data.publicEntryAllowed && data.owner === null) {
  36. console.log(`[+] Hit: ${id}`);
  37. if (useDiscordWebhook) {
  38. sendWebhook(`@everyone Hit: https://www.roblox.com/groups/group.aspx?gid=${id}`);
  39. }
  40. if (autoClaim) {
  41. autoClaimGroup(id);
  42. }
  43. }
  44. }
  45. }
  46. });
  47. }
  48. }
  49. });
  50. }
  51.  
  52. function sendWebhook(message) {
  53. GM_xmlhttpRequest({
  54. method: 'POST',
  55. url: webhookURL,
  56. data: JSON.stringify({ content: message }),
  57. headers: {
  58. 'Content-Type': 'application/json',
  59. },
  60. });
  61. }
  62.  
  63. function autoClaimGroup(id) {
  64. setTimeout(function() {
  65. window.location.href = `https://www.roblox.com/groups/${id}`;
  66. }, 1000);
  67. setTimeout(function() {
  68. document.getElementById('group-join-button').click();
  69. document.querySelector('.icon-more').click();
  70. setTimeout(function() {
  71. const claimOwnershipBtn = document.querySelector('#claim-ownership button');
  72. if (claimOwnershipBtn) {
  73. claimOwnershipBtn.click();
  74. console.log("Group claimed!");
  75. } else {
  76. console.log("Failed to claim :C");
  77. }
  78. }, 890);
  79. }, 2000);
  80. }
  81.  
  82. function main() {
  83. setInterval(() => {
  84. const ids = Array.from({ length: threads * 2 }, () => Math.floor(Math.random() * (1150000 - 1000000 + 1)) + 1000000);
  85. ids.forEach(id => groupFinder(id));
  86. }, 5000);
  87. }
  88.  
  89. main();
  90.  
  91. })();