Greasy Fork is available in English.

Diep Tools

Make quick builds with this script (and more soon)!

  1. // ==UserScript==
  2. // @name Diep Tools
  3. // @namespace http://ggforgaming.ml/
  4. // @version 1.6
  5. // @license MIT
  6. // @description Make quick builds with this script (and more soon)!
  7. // @author GGforGaming
  8. // @match https://*.diep.io/*
  9. // @icon https://www.google.com/s2/favicons?domain=diep.io
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. 'use strict';
  14. const HTML = `
  15. <table style="width:100%">
  16. <tr>
  17. <td><b>Build</b></td>
  18. <td><b>Apply</b></td>
  19. </tr>
  20. <tr>
  21. <td>Build for most tanks</td>
  22. <td><button onclick='input.execute("game_stats_build 565611122565656565647474747474747")'>Apply</button></td>
  23. </tr>
  24. <tr>
  25. <td>Build Ram Damage</td>
  26. <td><button onclick='input.execute("game_stats_build 123123123123123123123676767676766")'>Apply</button></td>
  27. </tr>
  28. <tr>
  29. <td>Build for booster tri-angle etc.</td>
  30. <td><button onclick='input.execute("game_stats_build 123123123123123123123678678678678")'>Apply</button></td>
  31. </tr>
  32. <tr>
  33. <td>Clear build</td>
  34. <td><button onclick='input.execute("game_stats_build 0")'>Apply</button></td>
  35. </tr>
  36. <tr>
  37. <td><b>Console</b></td>
  38. <td><input id="con"><button onclick='document.getElementById("conoutput").value = input.execute(document.getElementById("con"))'>Send</button></td>
  39. </tr>
  40. <tr>
  41. <td><b>Console output</b></td>
  42. <td id="conoutput">Use above console to get result here!</td>
  43. </tr>
  44. </table>
  45. `
  46. const styles = `
  47. div#dt-menu > table, th, td {
  48. border: 1px solid green;
  49. padding-left:10px;
  50. padding-right:10px;
  51. border-collapse: collapse;
  52. overflow-y:auto;
  53. word-wrap:break-all;
  54. }
  55. div#dt-menu > button {
  56. font-family: inherit;
  57. font-size: 1em;
  58. }
  59.  
  60. `
  61. const menuStyles = {
  62. position: "absolute",
  63. top: "25%",
  64. width:"50vw",
  65. height:"50vh",
  66. left: "25%",
  67. display: "none",
  68. "background-color": "rgba(255,255,255,0.5)",
  69. "font-family":'"Montserrat","Verdana"'
  70. }
  71. // <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat">
  72. const menu = document.createElement("div")
  73. for (var prop in menuStyles) {
  74. menu.style[prop] = menuStyles[prop]
  75. }
  76. menu.innerHTML = HTML
  77. menu.id = "dt-menu"
  78. const styleElement = document.createElement("style")
  79. const font = document.createElement("link")
  80. font.rel = "stylesheet"
  81. font.href = "https://fonts.googleapis.com/css?family=Montserrat"
  82. styleElement.innerHTML = styles
  83. document.head.appendChild(styleElement)
  84. document.head.appendChild(font)
  85. document.body.appendChild(menu)
  86. const myEvent = function(event) {
  87. switch (event.key) {
  88. case "Escape":
  89. if (menu.style.display == "none") {
  90. menu.style.display = "block"
  91. console.log("Menu Enabled!")
  92. }
  93. else {
  94. menu.style.display = "none"
  95. console.log("Menu Disabled!")
  96. }
  97. break
  98. case "9":
  99. input.execute("game_stats_build 565611122565656565647474747474747");
  100. console.log("Build [Key 9] Applied!");
  101. break
  102. case "0":
  103. input.execute("game_stats_build 123123123123123123123676767676766");
  104. console.log("Build [Key 0] Applied!");
  105. break
  106. case "-":
  107. input.execute("game_stats_build 123123123123123123123678678678678");
  108. console.log("Build [Key -] Applied!");
  109. break
  110. case "/":
  111. input.execute("game_stats_build 0");
  112. console.log("Stopped upgrading!")
  113. break
  114. default:
  115. return
  116. break
  117. }
  118. }
  119. window.addEventListener("keydown",myEvent)
  120. console.log("DiepTools Loaded!")