Advertisement
CowLoverSecret

ROBLOX Friend Request Bot

Jan 12th, 2015
2,131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. var pageloadtime = 5
  2. var msgwaittime = 1
  3. function gogogo()
  4. {
  5. var players = 0
  6. var users = 0
  7. function sendMsg(userId, username)
  8. {
  9. $.post("http://www.roblox.com/friends/sendfriendrequest",{
  10. targetUserID : userId
  11. }).complete(function(){
  12. console.log('Sent request to ' + username + '.')
  13. })
  14. }
  15.  
  16. function getPlayers()
  17. {
  18. var ids = []
  19. var sel = $('#ctl00_cphRoblox_TabbedInfo_GamesTab_RunningGamesList_RunningGamesContainer');
  20. sel = $(sel).find('a')
  21. for(i=0;i<sel.length;i++) {
  22. if(sel[i].href.toLowerCase().substring(0,'http://www.roblox.com/User.aspx?id='.length) == 'http://www.roblox.com/User.aspx?id='.toLowerCase()) {
  23. ids.push(sel[i].href.substring('http://www.roblox.com/User.aspx?id='.length))
  24. }
  25. }
  26. return ids
  27. }
  28.  
  29. function getUsernames()
  30. {
  31. var ids = []
  32. var sel = $('#ctl00_cphRoblox_TabbedInfo_GamesTab_RunningGamesList_RunningGamesContainer');
  33. sel = $(sel).find('a')
  34. for(i=0;i<sel.length;i++) {
  35. if(sel[i].href.toLowerCase().substring(0,'http://www.roblox.com/User.aspx?id='.length) == 'http://www.roblox.com/User.aspx?id='.toLowerCase()) {
  36. ids.push(sel[i].title)
  37. }
  38. }
  39. return ids
  40. }
  41.  
  42. var players = getPlayers()
  43. var users = getUsernames()
  44. var i=0;
  45. var time
  46.  
  47. function Loop()
  48. {
  49. setTimeout(function () {
  50. sendMsg(players[i],users[i])
  51. i++;
  52. if (i < players.length-1) {
  53. Loop();
  54. } else {
  55. __doPostBack('ctl00$cphRoblox$TabbedInfo$GamesTab$RunningGamesList$NextPageButton', '');
  56. setTimeout(function () {gogogo()},pageloadtime*1000)
  57. }
  58. }, msgwaittime*1000)
  59. }
  60.  
  61. Loop()
  62. }
  63.  
  64. gogogo()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement