Advertisement
Guest User

pro pm

a guest
Jan 21st, 2017
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. var waitTime = 5; // In seconds
  2. var group = 0; // 0 for no group check, otherwise people in this group will not receive the message
  3. function sendMsg(userId, username) {
  4. function send() {
  5. $.post('https://www.roblox.com/messages/send',{
  6. subject: "Tired of robux scams?",
  7. body: "Tired of robux scams?\nI made a legit game that actually\n\ngives you robux\n\nComplete the obby and get 1,000,000 + robux! this is the link https://www.roblox.com/games/617629095/Roblox-Rewards,\n.",
  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.  
  32. function run() {
  33. var timeout = 0;
  34. 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);
  35. var currentNode = elements.iterateNext();
  36. while (currentNode) {
  37. (function(time,id,name) {
  38. setTimeout(sendMsg,time,id,name);
  39. })(timeout,currentNode.href.match(/\d+/)[0],currentNode.textContent);
  40. timeout+=waitTime*750;
  41. currentNode = elements.iterateNext();
  42. }
  43. __doPostBack('ctl00$cphRoblox$rbxGroupRoleSetMembersPane$dlUsers_Footer$ctl02$ctl00','');
  44. var ready = setInterval(function() {
  45. if (document.getElementById('__EVENTTARGET').value == '') {
  46. clearInterval(ready);
  47. setTimeout(run,timeout);
  48. }
  49. }, 10);
  50. }
  51. var ready = setInterval(function() {
  52. if (document.readyState === 'complete') {
  53. clearInterval(ready);
  54. run();
  55. }
  56. }, 10);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement