Advertisement
Jayreaper

Alasaroth Kingdom

Apr 13th, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.04 KB | None | 0 0
  1. var group = 330422;
  2.  
  3. function sendMsg(userId, username) {
  4. function send() {
  5. $.post('https://www.roblox.com/messages/send',{
  6. subject: "Invite",
  7. body: "Hello, \n\n This is a PM being sent systematically to as many people as possible to announce the return of the Kingdom of Alasaroth. \n\n You are being invited into a historically successful sword clan called The Kingdom of Alasaroth. \n Of course, like those like you whom I have sent this message to, I am offering you a position within the army of Alasaroth. \n\n We want soldiers who will fight against anything that stands before us and who are disciplined enough to stand in line and charge. \n\n Swear your loyalty to the Sword and Fire and join us! \n\n So, what will it be? \n\n Group Link: \n https://www.roblox.com/groups/group.aspx?gid=330422",
  8. recipientid: userId,
  9. cacheBuster: new Date().getTime()
  10. }).done(function(response) {
  11. if (response.success == true) {
  12. console.log('Sent message to ' + username + ' (' + userId + ')');
  13. } else {
  14. console.log('Error sending to ' + username + ': ' + response.shortMessage);
  15. }
  16. });
  17. }
  18. if (group > 0) {
  19. $.get('https://www.roblox.com/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=' + userId + '&groupid=' + group, function(response) {
  20. if(response.indexOf('true') == -1) {
  21. send();
  22. } else {
  23. console.log('Didn\'t send a message to ' + username + ' because he is already in group ' + group + '.');
  24. }
  25. });
  26. } else {
  27. send();
  28. }
  29. }
  30.  
  31. function run() {
  32. var timeout = 0;
  33. 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);
  34. var currentNode = elements.iterateNext();
  35. while (currentNode) {
  36. (function(time, id, name) {
  37. setTimeout(sendMsg, time, id, name);
  38. })(timeout,currentNode.href.match(/\d+/)[0],currentNode.textContent);
  39. timeout += 15 * 1000;
  40. currentNode = elements.iterateNext();
  41. }
  42. __doPostBack('ctl00$cphRoblox$rbxGroupRoleSetMembersPane$dlUsers_Footer$ctl02$ctl00','');
  43. var ready = setInterval(function() {
  44. if (document.getElementById('__EVENTTARGET').value == '') {
  45. clearInterval(ready);
  46. setTimeout(run,timeout);
  47. }
  48. }, 10);
  49. }
  50. var ready = setInterval(function() {
  51. if (document.readyState === 'complete') {
  52. clearInterval(ready);
  53. run();
  54. }
  55. }, 10);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement