_N0N4M3's Diep.io Mod

Dark theme, FPS & Ping display

目前为 2024-11-01 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name _N0N4M3's Diep.io Mod
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024-11-01
  5. // @description Dark theme, FPS & Ping display
  6. // @author You
  7. // @match https://diep.io/
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=diep.io
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. let info = 0;
  13.  
  14. function darkTheme() {
  15. input.execute("ren_background false");
  16. input.execute("net_replace_colors 0x1c1c1c 0x333333 0x003b4b 0x003b4b 0x501a1c 0x3f2a51 0x004b24 0x2e5523 0x554d23 0x542727 0x272f54 0x502749 0x554d23 0x165530 0x3e3e3e 0x501a1c 0x544127 0x404040");
  17. input.execute("ren_minimap_background_color 0x555555");
  18. input.execute("ren_stroke_soft_color_intensity -2");
  19. input.execute("ren_health_background_color 0x222222");
  20. input.execute("ren_health_fill_color 0x00FF00");
  21. input.execute("ren_score_bar_fill_color 0xFF0000");
  22. input.execute("ren_xp_bar_fill_color 0xFFFF80");
  23. }
  24.  
  25. function lightTheme() {
  26. input.execute("ren_background true");
  27. input.execute("net_replace_colors 0x555555 0x999999 0x00B2E1 0x00B2E1 0xF14E54 0xBF7FF5 0x00E16E 0x8AFF69 0xFFE869 0xFC7677 0x768DFC 0xF177DD 0xFFE869 0x43FF91 0xBBBBBB 0xF14E54 0xFCC376 0xC0C0C0");
  28. input.execute("ren_minimap_background_color 0xCDCDCD");
  29. input.execute("ren_stroke_soft_color_intensity 0.25");
  30. input.execute("ren_health_background_color 0x555555");
  31. input.execute("ren_health_fill_color 0x85E37D");
  32. input.execute("ren_score_bar_fill_color 0x43FF91");
  33. input.execute("ren_xp_bar_fill_color 0xFFDE43");
  34. }
  35.  
  36. function showInfo() {
  37. input.execute("ren_debug_info true");
  38. input.execute("ren_fps true");
  39. }
  40.  
  41. function hideInfo() {
  42. input.execute("ren_debug_info false");
  43. input.execute("ren_fps false");
  44. }
  45.  
  46. document.addEventListener("keydown", e => {
  47. if (input.doesHaveTank()) {
  48. let code = e.code;
  49.  
  50. if (code == "KeyR") {
  51. darkTheme();
  52. }
  53.  
  54. if (code == "KeyT") {
  55. lightTheme();
  56. }
  57. }
  58. });
  59.  
  60. document.addEventListener("keyup", e => {
  61. if (input.doesHaveTank()) {
  62. let code = e.code;
  63.  
  64. if (code == "KeyL") {
  65. info = !info;
  66.  
  67. if (info) {
  68. showInfo();
  69. } else {
  70. hideInfo();
  71. }
  72. }
  73. }
  74. });