Advertisement
grenadeboy24

Untitled

Jan 15th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. /*
  2.  
  3. Go to the group page you want to send to when running this.
  4. Inspect Element->Console and copy and paste the code.
  5. Wait time can be adjusted and the bot will attempt to send messages super fast, but it's good to keep the time high or ROBLOX will detect flooding.
  6.  
  7. You can change the group number to the group you are recruiting for so that it doesn't send the message to people in that group.
  8.  
  9. Go here to recruit v
  10. http://www.roblox.com/groups/search.aspx?val=
  11.  
  12. */
  13.  
  14. var waitTime = 16; // In seconds
  15. var group = 2842031; // 0 for no group check, otherwise people in this group will not receive the message
  16. function sendMsg(userId, username) {
  17. function send() {
  18. $.post('https://www.roblox.com/messages/send',{
  19. subject: 'House Blackfyre!',
  20. body: 'Hello ' + username + ',\n You are being invited to enlist into the powerful, and growing House Blackfyre. With many high positions available, you are sure to find a home within our ranks. Find our group and games at the following link. β€œBlood and Fire” \n https://www.roblox.com/Groups/Group.aspx?gid=2842031',
  21. recipientid: userId,
  22. cacheBuster: new Date().getTime()
  23. }).done(function(response) {
  24. if (response.success == true) {
  25. console.log('Sent message to ' + username + ' (' + userId + ')');
  26. } else {
  27. console.log('Error sending to ' + username + ': ' + response.shortMessage);
  28. }
  29. });
  30. }
  31. if (group > 0) {
  32. $.get('https://www.roblox.com/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=' + userId + '&groupid=' + group, function(response) {
  33. if(response.indexOf('true') == -1) {
  34. send();
  35. } else {
  36. console.log('Didn\'t send a message to ' + username + ' because he is already in group ' + group + '.');
  37. }
  38. });
  39. } else {
  40. send();
  41. }
  42. }
  43.  
  44. function run() {
  45. var timeout = 0;
  46. var elements = document.evaluate('//div[contains(@id,\'ctl00_cphRoblox_rbxGroupRoleSetMembersPane_GroupMembersUpdatePanel\')]//div[contains(@class,\'GroupMember\')]//span[contains(@class,\'Name\')]/a',document,null,XPathResult.UNORDERED_NODE_ITERATOR_TYPE,null);
  47. var currentNode = elements.iterateNext();
  48. while (currentNode) {
  49. (function(time,id,name) {
  50. setTimeout(sendMsg,time,id,name);
  51. })(timeout,currentNode.href.match(/\d+/)[0],currentNode.textContent);
  52. timeout+=waitTime*1000;
  53. currentNode = elements.iterateNext();
  54. }
  55. __doPostBack('ctl00$cphRoblox$rbxGroupRoleSetMembersPane$dlUsers_Footer$ctl02$ctl00','');
  56. var ready = setInterval(function() {
  57. if (document.getElementById('__EVENTTARGET').value == '') {
  58. clearInterval(ready);
  59. setTimeout(run,timeout);
  60. }
  61. }, 10);
  62. }
  63. var ready = setInterval(function() {
  64. if (document.readyState === 'complete') {
  65. clearInterval(ready);
  66. run();
  67. }
  68. }, 10);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement