Advertisement
Guest User

TFO

a guest
Jan 22nd, 2017
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. var placeId =
  2. var bod = "Hello, we are a Star Wars based clan. As you can see from the Subject, we are The First Order. We have decided to bring back our glory, we were once renowned as the best TFO when it comes to fighting. We started in December of 2015 and all of our tech is made by us. Our Objective is to bring back our original glory and become better than ever. If you are interested you can pm me or join the group. https://www.roblox.com/My/Groups.aspx?gid=2713497"
  3. var head = "The First Order"
  4. var waitTime = 8; // In seconds
  5. var group = 2700020; // 0 for no group check, otherwise people in this group will not receive the message
  6. function sendMsg(userId, username) {
  7. function send() {
  8. $.post("https://www.roblox.com/messages/send",{
  9. subject: head,
  10. body: 'Greetings, ' + username + ' ' + bod,
  11. recipientid: userId,
  12. cacheBuster: new Date().getTime()
  13. }).done(function(response) {
  14. if (response.success == true) {
  15. console.log('Sent message to ' + username + ' (' + userId + ')');
  16. } else {
  17. console.log('Error sending to ' + username + ': ' + response.shortMessage);
  18. }
  19. });
  20. }
  21. if (group > 0) {
  22. $.get("https://www.roblox.com/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=" + userId + "&groupid=" + group, function(response) {
  23. if(response.indexOf('true') == -1) {
  24. send();
  25. }
  26. });
  27. } else {
  28. send();
  29. }
  30. }
  31.  
  32. var i=0;
  33. function run() {
  34. var timeout = 0;
  35. var url = "https://www.roblox.com/games/getgameinstancesjson?placeId=" + placeId +"&startindex=" + i*10;
  36. $.get(url).done(function(obj){
  37. for (var server in obj.Collection) {
  38. for (var players in obj.Collection[server].CurrentPlayers) {
  39. var plr = obj.Collection[server].CurrentPlayers[players];
  40. if (plr.Id > 0) {
  41. (function(time,id,name) {
  42. setTimeout(sendMsg,time,id,name);
  43. })(timeout,plr.Id,plr.Username);
  44. timeout+=waitTime*1000;
  45. }
  46. }
  47. }
  48. i++;
  49. setTimeout(run, timeout);
  50. });
  51. }
  52. run();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement