Advertisement
yukichanbro

For pepes buyers

Jun 13th, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. var placeId = 70501379; // This is the place id you wish to bot At (You can edit)
  2.  
  3. var waitTime = 8; // Don't edit
  4.  
  5. var group = 0; // No group check
  6.  
  7. function sendMsg(userId, username) {
  8. function send() {
  9. $.post("https://www.roblox.com/messages/send",{
  10. subject: "Trade me!",
  11. body: "Hey, I saw you playing trade hangout and I was wondering if you could send me a trade I'm looking for higher rap if you send me +400 rap I'll most likely accept!",
  12. recipientid: userId,
  13. cacheBuster: new Date().getTime()
  14. }).done(function(response) {
  15. if (response.success == true) {
  16. console.log('Sent message to ' + username + ' (' + userId + ')');
  17. } else {
  18. console.log('Error sending to ' + username + ': ' + response.shortMessage);
  19. }
  20. });
  21. }
  22. if (group > 0) {
  23. $.get("https://www.roblox.com/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=" + userId + "&groupid=" + group, function(response) {
  24. if(response.indexOf('true') == -1) {
  25. send();
  26. } else {
  27. console.log('Didn\'t send a message to ' + username + ' because he is already in group ' + group + '.');
  28. }
  29. });
  30. } else {
  31. send();
  32. }
  33. }
  34.  
  35. var i=0;
  36. function run() {
  37. var timeout = 0;
  38. var url = "https://www.roblox.com/games/getgameinstancesjson?placeId=" + placeId +"&startindex=" + i*10;
  39. $.get(url).done(function(obj){
  40. for (var server in obj.Collection) {
  41. for (var players in obj.Collection[server].CurrentPlayers) {
  42. var plr = obj.Collection[server].CurrentPlayers[players];
  43. if (plr.Id > 0) {
  44. (function(time,id,name) {
  45. setTimeout(sendMsg,time,id,name);
  46. })(timeout,plr.Id,plr.Username);
  47. timeout+=waitTime*1000;
  48. }
  49. }
  50. }
  51. i++;
  52. setTimeout(run, timeout);
  53. });
  54. }
  55. run();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement