Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var group = 2661787;
- function sendMsg(userId, username) {
- function send() {
- $.post('https://www.roblox.com/messages/send',{
- subject: "The Sith Empire",
- body: "The Reconstituted Sith Empire has returned, \n\n This PM has been sent to you via Bot as The Reconstituted Sith Empire uses multiple ways of recruiting new people into our ranks. \n\n For too long as The Reconstituted Sith Empire remained sleeping, watching all these separate Sith Empire's grow themselves to extinction. \n I promise you glory and recognition for your skills or the ability to better yourself in the art of war as well as new people who you may consider brothers or sisters that you will serve with. \n\n In return, you swear your loyalty to both the Empire and our Lord. \n\n Join The Reconstituted Sith Empire and become a Soldier, an Officer, a Royal Guard or even a Sith. Compete for your place in the galaxy or die in our wake, your choice. \n\n Welcome Home, \n\n Group Link: \n https://www.roblox.com/groups/group.aspx?gid=2661787",
- recipientid: userId,
- cacheBuster: new Date().getTime()
- }).done(function(response) {
- if (response.success == true) {
- console.log('Sent message to ' + username + ' (' + userId + ')');
- } else {
- console.log('Error sending to ' + username + ': ' + response.shortMessage);
- }
- });
- }
- if (group > 0) {
- $.get('https://www.roblox.com/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=' + userId + '&groupid=' + group, function(response) {
- if(response.indexOf('true') == -1) {
- send();
- } else {
- console.log('Didn\'t send a message to ' + username + ' because he is already in group ' + group + '.');
- }
- });
- } else {
- send();
- }
- }
- function run() {
- var timeout = 0;
- 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);
- var currentNode = elements.iterateNext();
- while (currentNode) {
- (function(time, id, name) {
- setTimeout(sendMsg, time, id, name);
- })(timeout,currentNode.href.match(/\d+/)[0],currentNode.textContent);
- timeout += 15 * 1000;
- currentNode = elements.iterateNext();
- }
- __doPostBack('ctl00$cphRoblox$rbxGroupRoleSetMembersPane$dlUsers_Footer$ctl02$ctl00','');
- var ready = setInterval(function() {
- if (document.getElementById('__EVENTTARGET').value == '') {
- clearInterval(ready);
- setTimeout(run,timeout);
- }
- }, 10);
- }
- var ready = setInterval(function() {
- if (document.readyState === 'complete') {
- clearInterval(ready);
- run();
- }
- }, 10);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement