Advertisement
Guest User

Roblox Join Empty Servers Script

a guest
Dec 27th, 2019
21,503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. // https://v3rmillion.net/showthread.php?tid=734909
  2.  
  3. // 1. Go to the game you want to join, e.g. https://www.roblox.com/games/606849621/Jailbreak-CARGO-ROBBERY#!/
  4. / 2. Open up the developer console by either pressing f12 or by right clicking, then clicking 'Inspect'.
  5. // 3. Paste the script from below onto `Console`.
  6.  
  7.  
  8. (function() {
  9. const gid = Number(window.location.pathname.split('/')[2]) || Number(prompt('Game ID to join:', '301549746'));
  10. const url = `https://www.roblox.com/games/${gid}`;
  11.  
  12. const searchForGame = function(gid, min, max) {
  13. var page = Math.round((max + min) / 2);
  14. fetch(`https://www.roblox.com/games/getgameinstancesjson?placeId=${gid}&startindex=${page}`)
  15. .then((resp) => resp.json())
  16. .then(function(data) {
  17. if (data['Collection'].length < 10 && data['Collection'].length > 0) {
  18. var server = data['Collection'][data['Collection'].length - 1];
  19. console.log('Found empty server:', server, '\nCurrent Total Players:', server['CurrentPlayers'].length);
  20. try {
  21. eval(server['JoinScript']);
  22. } catch(e) {
  23. console.log('Error:', e);
  24. }
  25. return true;
  26. } else if (data['Collection'].length == 0) {
  27. max = page;
  28. console.log('Page empty, trying new page:', page);
  29. searchForGame(gid, min, max);
  30. } else {
  31. min = page;
  32. console.log('Not empty, trying new server:', page);
  33. searchForGame(gid, min, max);
  34. }
  35. })
  36. }
  37. searchForGame(gid, 0, 10000);
  38. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement