Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Change placeId to the place you want to scan for and message players.
- Inspect Element->Console and copy and paste the code.
- 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.
- 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.
- Built off of (but in the end most of that code was removed): http://pastebin.com/s2nR7tha
- */
- var placeId = 000000; // Place to check and message
- var waitTime = 3; // In seconds
- var group = 1178558; // 0 for no group check, otherwise people in this group will not receive the message
- function sendMsg(userId, username) {
- function send() {
- $.post("http://www.roblox.com/messages/send",{
- subject: 'Looking for the perfect clan?',
- body: 'Hello, ' + username + '.\n\How long have you been looking for the perfect clan? Three months? Six months? Two years? These answers are very common, but what if I told you, we’ve found it? For YOU.\n\We are known as Zepris Confederation and we are perfect for you. We have an excellent community, excellent leaders and we’re looking for new people. We accept any skill level, because we guarantee that we will make you better at sword fighting.\n\Thank you for taking the time to read this, if you’re interested in joining I’ve included the link below. If you’re not interested, that’s okay too.\n\Link: http://www.roblox.com/My/Groups.aspx?gid=1178558\n\OverlyAttachedDev\n\ZC Warlord\n\Temporary Co-Leader\n\Head of Training and Activity',
- 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("http://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();
- }
- }
- var i=0;
- function run() {
- var timeout = 0;
- var url = "http://www.roblox.com/games/getgameinstancesjson?placeId=" + placeId +"&startindex=" + i*10;
- $.get(url).done(function(obj){
- for (var server in obj.Collection) {
- for (var players in obj.Collection[server].CurrentPlayers) {
- var plr = obj.Collection[server].CurrentPlayers[players];
- if (plr.Id > 0) {
- (function(time,id,name) {
- setTimeout(sendMsg,time,id,name);
- })(timeout,plr.Id,plr.Username);
- timeout+=waitTime*1000;
- }
- }
- }
- i++;
- setTimeout(run, timeout);
- });
- }
- run();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement