Advertisement
carcine12

Join solo roblox game/ with 1 other person | F12 console

Jun 21st, 2020
2,063
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function() {
  2. const gid = Number(window.location.pathname.split('/')[2]) || Number(prompt('Game ID to join:', '301549746'));
  3. const url = `https://www.roblox.com/games/${gid}`;
  4. const searchForGame = function(gid, min, max) {
  5. var page = Math.round((max + min) / 2);
  6. fetch(`https://www.roblox.com/games/getgameinstancesjson?placeId=${gid}&startindex=${page}`)
  7. .then((resp) => resp.json())
  8. .then(function(data) {
  9. if (data['Collection'].length < 10 && data['Collection'].length > 0) {
  10. var server = data['Collection'][data['Collection'].length - 1];
  11. console.log('Found empty server:', server, '\nCurrent Total Players:', server['CurrentPlayers'].length);
  12. try {
  13. eval(server['JoinScript']);
  14. } catch(e) {
  15. console.log('Error:', e);
  16. }
  17. return true;
  18. } else if (data['Collection'].length == 0) {
  19. max = page;
  20. console.log('Page empty, trying new page:', page);
  21. searchForGame(gid, min, max);
  22. } else {
  23. min = page;
  24. console.log('Not empty, trying new server:', page);
  25. searchForGame(gid, min, max);
  26. }
  27. })
  28. }
  29. searchForGame(gid, 0, 10000);
  30. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement