Show Your FPS

This mod allows you to see your FPS in the top left corner of the game.

  1. // ==UserScript==
  2. // @name Show Your FPS
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description This mod allows you to see your FPS in the top left corner of the game.
  6. // @author Quintec#0689
  7. // @match *://surviv.io/*
  8. // @match *://surviv2.io/*
  9. // @match *://2dbattleroyale.com/*
  10. // @match *://2dbattleroyale.org/*
  11. // @match *://piearesquared.info/*
  12. // @match *://thecircleisclosing.com/*
  13. // @match *://archimedesofsyracuse.info/*
  14. // @match *://secantsecant.com/*
  15. // @match *://parmainitiative.com/*
  16. // @match *://nevelskoygroup.com/*
  17. // @match *://kugahi.com/*
  18. // @match *://chandlertallowmd.com/*
  19. // @match *://ot38.club/*
  20. // @match *://kugaheavyindustry.com/*
  21. // @match *://drchandlertallow.com/*
  22. // @match *://rarepotato.com/*
  23. // @grant none
  24. // ==/UserScript==
  25.  
  26. var first = true;
  27. (function() {
  28. 'use strict';
  29. // Reposting this script because Quintec#0689 didn't include description or anything to tell what this script actually does,
  30. // and it's kinda a waste cause some people might find this useful.
  31.  
  32. const times = [];
  33. let fps;
  34.  
  35. function refreshLoop() {
  36. window.requestAnimationFrame(() => {
  37. const now = performance.now();
  38. while (times.length > 0 && times[0] <= now - 1000) {
  39. times.shift();
  40. }
  41. times.push(now);
  42. fps = times.length;
  43. if (first) {
  44. var obj = document.createElement("P");
  45. var text = document.createTextNode(Math.round(fps).toString() + " FPS");
  46. obj.appendChild(text);
  47. obj.setAttribute("id", "fps");
  48. document.getElementById("ui-top-left").appendChild(obj);
  49. var credit = document.createElement("P");
  50. var txt = document.createTextNode("Created by Quintec#0689 on Discord");
  51. credit.appendChild(txt);
  52. document.getElementById("ui-top-left").appendChild(credit);
  53. first = false;
  54. } else {
  55. document.getElementById("fps").innerHTML = Math.round(fps).toString() + " FPS";
  56. }
  57. refreshLoop();
  58. });
  59. }
  60. refreshLoop();
  61. })();