Surviv.io XClient (BETA)

Miscellaneous Surviv.io tweaks to make the game better!

  1. // ==UserScript==
  2. // @name Surviv.io XClient (BETA)
  3. // @namespace https://greasyfork.org/en/users/198860-zyenith
  4. // @version 1.0.0
  5. // @description Miscellaneous Surviv.io tweaks to make the game better!
  6. // @author zyenith
  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 *://secantsecant.com/*
  14. // @match *://parmainitiative.com/*
  15. // @match *://ot38.club/*
  16. // @match *://drchandlertallow.com/*
  17. // @match *://rarepotato.com/*
  18. // @match *://archimedesofsyracuse.info/*
  19. // @match *://nevelskoygroup.com/*
  20. // @match *://kugahi.com/*
  21. // @match *://kugaheavyindustry.com/*
  22. // @match *://chandlertallowmd.com/*
  23. // @grant none
  24. // @antifeature Tracking, for compatibility info
  25. // @require https://greasyfork.org/scripts/410512-sci-js-from-ksw2-center/code/scijs%20(from%20ksw2-center).js
  26. // ==/UserScript==
  27.  
  28. const healthContainer = document.querySelector('#ui-health-container');
  29.  
  30. // Create health element
  31. const health = document.createElement('span');
  32. health.style.cssText = `
  33. display: block;
  34. position: fixed;
  35. z-index: 2;
  36. margin: 6px 0 0 0;
  37. right: 15px;
  38. mix-blend-mode: difference;
  39. font-weight: bold;
  40. font-size: large;
  41. `;
  42. healthContainer.appendChild(health);
  43.  
  44. // Create adr element
  45. const adr = document.createElement('span');
  46. adr.style.cssText = `
  47. display: block;
  48. position: fixed;
  49. z-index: 2;
  50. margin: 6px 0 0 0;
  51. left: 15px;
  52. mix-blend-mode: difference;
  53. font-weight: bold;
  54. font-size: large;
  55. `;
  56. healthContainer.appendChild(adr);
  57.  
  58. setInterval(function() {
  59. // Update health
  60. const hp = document.getElementById('ui-health-actual').style.width.slice(0, -1);
  61. health.innerHTML = Math.round(hp);
  62.  
  63. // Calculate and update adr
  64. const boost0 = document.getElementById('ui-boost-counter-0').querySelector('.ui-bar-inner').style.width.slice(0, -1);
  65. const boost1 = document.getElementById('ui-boost-counter-1').querySelector('.ui-bar-inner').style.width.slice(0, -1);
  66. const boost2 = document.getElementById('ui-boost-counter-2').querySelector('.ui-bar-inner').style.width.slice(0, -1);
  67. const boost3 = document.getElementById('ui-boost-counter-3').querySelector('.ui-bar-inner').style.width.slice(0, -1);
  68. const adr0 = boost0 * 25 / 100 + boost1 * 25 / 100 + boost2 * 37.5 / 100 + boost3 * 12.5 / 100;
  69. adr.innerHTML = Math.round(adr0);
  70. });