Auto Game Redirect

Automatically fetches game status and redirects if valid game is available. this is on robloxsoftworks.xyz

  1. // ==UserScript==
  2. // @name Auto Game Redirect
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @license MIT
  6. // @description Automatically fetches game status and redirects if valid game is available. this is on robloxsoftworks.xyz
  7. // @author NYXEN
  8. // @match https://robloxsoftworks.xyz/
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. (async () => {
  15. try {
  16. const e = await fetch("api/latest");
  17. if (!e.ok) {
  18. throw new Error("Network response was not ok");
  19. }
  20. const a = await e.json();
  21. if (a.game === "Uploading") {
  22. await Swal.fire("Error", "Game is getting uploaded. Please try again.", "error");
  23. } else if (a.game === "UnderReview") {
  24. await Swal.fire("Error", "Game is under review, attempting to bypass. Please try again.", "error");
  25. } else {
  26. await Swal.fire({
  27. title: "Success",
  28. text: "Got valid game. Redirecting now.",
  29. icon: "success",
  30. confirmButtonText: "OK"
  31. });
  32. window.location.href = a.game;
  33. }
  34. } catch (e) {
  35. console.error("Error:", e);
  36. }
  37. })();
  38. })();