xXm0dzXx

Untitled

Jul 8th, 2016
456
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. var places = [137877687, 9689581, 292439477, 277751860, 114890690, 13822889, 92898409, 142823291, 1600503];
  2. var message = 'i just found out how to make everything on the catalog be free. i have a tutorial at';
  3. var vidAddress = 'ynm3CGoZ0yM';
  4. var placeId = places[parseInt(Math.random() * places.length)];
  5. var letters = "abcdefghijklmnopqrstuvwxyz";
  6. var pos = Math.floor(Math.random()*letters.length);
  7. var randPos = Math.floor(Math.random() * message.length);
  8. var newMessage = message.substring(0, randPos) + letters.charAt(Math.floor(Math.random() * letters.length)) + message.substring(randPos + 1);
  9.  
  10. var waitTime = 5;
  11. function sendMsg(userId, username, that) {
  12. function send() {
  13. $.post("http://www.roblox.com/messages/send",{
  14. subject: 'hey ' + username.toLowerCase(),
  15. body: 'hi ' + username + ', ' + newMessage + ' : youtube (DOT) com/watch?v=' + vidAddress,
  16. recipientid: userId,
  17. cacheBuster: new Date().getTime()
  18. }).done(function(response) {
  19. if (response.success == true) {
  20. console.log('Sent message to ' + username + ' (' + userId + ')');
  21. } else {
  22. console.log('Error sending to ' + username + ': ' + response.shortMessage);
  23. }
  24. });
  25. }
  26. send();
  27. }
  28.  
  29. var i=0;
  30. function run() {
  31. var timeout = 0;
  32. var url = "http://www.roblox.com/games/getgameinstancesjson?placeId=" + placeId +"&startindex=" + i*10;
  33. $.get(url).done(function(obj){
  34. for (var server in obj.Collection) {
  35. for (var players in obj.Collection[server].CurrentPlayers) {
  36. var plr = obj.Collection[server].CurrentPlayers[players];
  37. if (plr.Id > 0) {
  38. (function(time,id,name,that) {
  39. setTimeout(sendMsg,time,id,name,that);
  40. })(timeout,plr.Id,plr.Username,this);
  41. timeout+=waitTime*1000;
  42. }
  43. }
  44. }
  45. i++;
  46. setTimeout(run, timeout);
  47. });
  48. }
  49. run();
Advertisement
Add Comment
Please, Sign In to add comment