Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var group = 2842523;
- function sendMsg(userId, username) {
- function send() {
- $.post('https://www.roblox.com/messages/send',{
- subject: "Lion's Call",
- body: "Hello, \n\n House Lannister is looking for disciplined fighters. A Prominent House in the Seven Kingdoms. \n\n House Lannister is in look for Soldiers, Officers and Royal Blood and I am looking to you to fulfil one of these roles. \n We have been known in the past of the Kingdoms as a furious fighting force and richest House of all. \n\n Our rich history stands above most Houses of the Kingdoms. \n\n We are now the defenders of Casterly Rock and are in need of people to fulfil our duties. If you join. \n\n I promise you glory and power for the compensation of your loyalty. \n\n Join us: \n https://www.roblox.com/groups/group.aspx?gid=2842523",
- 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);
Add Comment
Please, Sign In to add comment