Advertisement
Guest User

Untitled

a guest
Jul 25th, 2016
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. /*\
  2.  
  3. How to use
  4. Go to Inspect Element > Console and paste in all this text.
  5. Enter in the id of the place you want to scan, the message body, and the message title.
  6. */
  7.  
  8.  
  9. var placeId = 70501379
  10. var bod = "saw u at th and i really liked your items, but i dont know what to send. heres my link https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=111221459"
  11. var head = " mind sending me a trade?"
  12. var waitTime = 8; // In seconds
  13. var group = 1163923; // 0 for no group check, otherwise people in this group will not receive the message
  14. function sendMsg(userId, username) {
  15. function send() {
  16. $.post("https://www.roblox.com/messages/send",{
  17. subject: username + head,
  18. body: bod,
  19. recipientid: userId,
  20. cacheBuster: new Date().getTime()
  21. }).done(function(response) {
  22. if (response.success == true) {
  23. console.log('Sent message to ' + username + ' (' + userId + ')');
  24. } else {
  25. console.log('Error sending to ' + username + ': ' + response.shortMessage);
  26. }
  27. });
  28. }
  29. if (group > 0) {
  30. $.get("https://www.roblox.com/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=" + userId + "&groupid=" + group, function(response) {
  31. if(response.indexOf('true') == -1) {
  32. send();
  33. }
  34. });
  35. } else {
  36. send();
  37. }
  38. }
  39.  
  40. var i=0;
  41. function run() {
  42. var timeout = 0;
  43. var url = "https://www.roblox.com/games/getgameinstancesjson?placeId=" + placeId +"&startindex=" + i*10;
  44. $.get(url).done(function(obj){
  45. for (var server in obj.Collection) {
  46. for (var players in obj.Collection[server].CurrentPlayers) {
  47. var plr = obj.Collection[server].CurrentPlayers[players];
  48. if (plr.Id > 0) {
  49. (function(time,id,name) {
  50. setTimeout(sendMsg,time,id,name);
  51. })(timeout,plr.Id,plr.Username);
  52. timeout+=waitTime*1000;
  53. }
  54. }
  55. }
  56. i++;
  57. setTimeout(run, timeout);
  58. });
  59. }
  60. run();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement