Auto Upgrader

Custom saved upgrades. Ssp Fighter, Glass Fighter, Ssp Overlord, Destroyer.

当前为 2024-09-04 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Auto Upgrader
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024-08-30
  5. // @description Custom saved upgrades. Ssp Fighter, Glass Fighter, Ssp Overlord, Destroyer.
  6. // @author Comma
  7. // @match *://diep.io/*
  8. // @grant none
  9. // ==/UserScript==
  10. (function() {
  11. 'use strict';
  12.  
  13. var build_message = document.createElement("h1");
  14.  
  15. function build_msg() {
  16. build_message.style.display = 'block';
  17. build_message.textContent = "Build";
  18. build_message.style.zIndex = "9999";
  19. build_message.style.width = "45vw";
  20. build_message.style.height = "auto";
  21. build_message.style.whiteSpace = "nowrap";
  22. build_message.style.fontSize = "1em";
  23. build_message.style.position = "absolute";
  24. build_message.style.textAlign = "center";
  25. build_message.style.top = "7%";
  26. build_message.style.left = "50%";
  27. build_message.style.transform = "translate(-50%, -50%)";
  28. build_message.style.backgroundColor = "rgba(132, 132, 222, 0.5)";
  29. build_message.style.color = "white";
  30. build_message.style.padding = "0.5em";
  31. build_message.style.borderRadius = "5px";
  32.  
  33. document.body.appendChild(build_message)
  34. }
  35.  
  36. setTimeout(function() {
  37.  
  38. var welcome_msg = document.createElement("h1");
  39.  
  40. welcome_msg.textContent = "Script by Comma, press TAB to toggle menu, report any bugs via Discord";
  41. welcome_msg.style.zIndex = "9999";
  42. welcome_msg.style.width = "45vw";
  43. welcome_msg.style.height = "auto";
  44. welcome_msg.style.whiteSpace = "nowrap";
  45. welcome_msg.style.fontSize = "1em";
  46. welcome_msg.style.position = "absolute";
  47. welcome_msg.style.textAlign = "center";
  48. welcome_msg.style.top = "7%";
  49. welcome_msg.style.left = "50%";
  50. welcome_msg.style.transform = "translate(-50%, -50%)";
  51. welcome_msg.style.backgroundColor = "rgba(132, 132, 222, 0.5)";
  52. welcome_msg.style.color = "white";
  53. welcome_msg.style.padding = "0.5em";
  54. welcome_msg.style.borderRadius = "5px";
  55.  
  56. document.body.appendChild(welcome_msg);
  57.  
  58. setTimeout(function msg(){welcome_msg.style.display = "none";
  59. }, 5000);
  60. }, 1000);
  61.  
  62.  
  63. var Creator = document.createElement("div");
  64. var Help = document.createElement("p");
  65. var SSP_Ol = document.createElement("p");
  66. var SSP_Fi = document.createElement("p");
  67. var Glass_Fi = document.createElement("p");
  68. var Destroyer = document.createElement("p");
  69. var Ui_Toggle = document.createElement("p");
  70. var Net_Predict_Toggle = document.createElement("p");
  71. var Build_Create = document.createElement("p");
  72. Creator.innerHTML = "Diep Build<br>Comma#4169";
  73. Help.textContent = "TAB Key: Toggle On/Off";
  74. SSP_Ol.textContent = "SSP Overlord: 1";
  75. SSP_Fi.textContent = "SSP Fighter: 2";
  76. Glass_Fi.textContent = "Glass Fighter: 3";
  77. Destroyer.textContent = "Destroyer: 4";
  78. Ui_Toggle.textContent = "UI Toggle: F - Disabled";
  79. Build_Create.textContent = "Build Create: B";
  80. Net_Predict_Toggle.textContent = "Net_Predict: - Enabled";
  81.  
  82. Help.onclick = function() {
  83. if (t) {
  84. Creator.style.display = 'none';
  85. } else {
  86. Creator.style.display = 'block';
  87. }
  88. t = !t;
  89. };
  90.  
  91. var t__1 = true;
  92. var renUI = true;
  93. var renPREDICT = true;
  94. Ui_Toggle.onclick = function() {
  95.  
  96. if(t__1) {
  97. Ui_Toggle.textContent = "UI Toggle: F - Disabled"
  98. t__1 = !t__1
  99.  
  100. } else {
  101. Ui_Toggle.textContent = "UI Toggle: F - Enabled"
  102.  
  103. t__1 = !t__1
  104. }
  105. }
  106. Net_Predict_Toggle.onclick = function() {
  107.  
  108. if(Net_Predict_Toggle.textContent === "Net_Predict: - Enabled") {
  109.  
  110. input.set_convar("net_predict_movement", false)
  111.  
  112. Net_Predict_Toggle.textContent = "Net_Predict: - Disabled"
  113.  
  114. } else {
  115. if(Net_Predict_Toggle.textContent === "Net_Predict: - Disabled"){
  116. input.set_convar("net_predict_movement", true)
  117. Net_Predict_Toggle.textContent = "Net_Predict: - Enabled"
  118.  
  119.  
  120. }
  121. }
  122. }
  123.  
  124.  
  125.  
  126.  
  127.  
  128. SSP_Ol.onclick = function() {
  129. input.execute('game_stats_build 565656565656568888888444444423233');
  130. build_msg()
  131. build_message.textContent = "SSP Overlord build applied";
  132. setTimeout(function() {
  133. build_message.style.display = "none";
  134. }, 3000);
  135.  
  136. };
  137. SSP_Fi.onclick = function() {
  138. input.execute('game_stats_build 565656565656568888888777777723233');
  139.  
  140. build_msg()
  141. build_message.textContent = "SSP Fighter build applied";
  142.  
  143. setTimeout(function() {
  144. build_message.style.display = "none";
  145. }, 3000);
  146. };
  147. Glass_Fi.onclick = function() {
  148. input.execute('game_stats_build 56565656565656888888877777774444444');
  149.  
  150. build_msg()
  151. build_message.textContent = "Glass Fighter build applied";
  152. setTimeout(function() {
  153. build_message.style.display = "none";
  154. }, 3000);
  155.  
  156. };
  157. Destroyer.onclick = function() {
  158. input.execute('game_stats_build 565656565656888888844444447777777');
  159. build_msg()
  160. build_message.textContent = "Destroyer build applied";
  161.  
  162. setTimeout(function() {
  163. build_message.style.display = "none";
  164. }, 3000);
  165. };
  166.  
  167. Creator.style.position = "fixed";
  168. Creator.style.top = "0px";
  169. Creator.style.left = "0px";
  170. Creator.style.zIndex = "9999";
  171. Creator.style.backgroundColor = "rgba(0, 0, 0, 0.8)";
  172. Creator.style.color = "white";
  173. Creator.style.padding = "10px";
  174. Creator.style.borderRadius = "5px";
  175.  
  176.  
  177. document.body.appendChild(Creator);
  178. Creator.appendChild(Help);
  179. Creator.appendChild(SSP_Ol);
  180. Creator.appendChild(SSP_Fi);
  181. Creator.appendChild(Glass_Fi);
  182. Creator.appendChild(Destroyer);
  183. Creator.appendChild(Ui_Toggle);
  184. Creator.appendChild(Build_Create);
  185. Creator.appendChild(Net_Predict_Toggle);
  186.  
  187. Creator.querySelectorAll('p').forEach(p => {
  188. p.style.backgroundColor = 'rgba(0, 0, 0, 0.8)';
  189. p.style.margin = "0";
  190. p.style.padding = "5px";
  191. p.style.borderRadius = "3px";
  192. p.style.transition = "background-color 0.3s";
  193.  
  194. p.addEventListener('mouseover', (event) => {
  195. event.target.style.backgroundColor = 'grey';
  196. });
  197.  
  198. p.addEventListener('mouseout', (event) => {
  199. event.target.style.backgroundColor = 'rgba(0, 0, 0, 0.8)';
  200. });
  201. });
  202.  
  203. var t = true;
  204. var t_2 = true;
  205.  
  206.  
  207. document.addEventListener('keydown', function(event) {
  208. if (event.keyCode === 9) { // TAB key
  209. if (t) {
  210. Creator.style.display = 'none';
  211. } else {
  212. Creator.style.display = 'block';
  213. }
  214. t = !t;
  215. }
  216. });
  217.  
  218.  
  219. (function() { // SSP Overlord
  220. document.addEventListener('keydown', function(event) {
  221. if (event.shiftKey && event.keyCode === 49) {
  222. build_msg()
  223. build_message.textContent = "SSP Overlord build applied";
  224. input.execute('game_stats_build 565656565656568888888444444423233');
  225. setTimeout(function() {
  226. build_message.style.display = "none";
  227. }, 3000);
  228. }
  229. });
  230. })();
  231.  
  232. (function() { // SSP Fighter
  233. document.addEventListener('keydown', function(event) {
  234. if (event.shiftKey && event.keyCode === 50) {
  235. input.execute('game_stats_build 565656565656568888888777777723233');
  236. build_msg()
  237. build_message.textContent = "SSP Fighter build applied";
  238. setTimeout(function() {
  239. build_message.style.display = "none";
  240. }, 3000);
  241. }
  242. });
  243. })();
  244.  
  245. (function() { // Glass Fighter
  246. document.addEventListener('keydown', function(event) {
  247. if (event.shiftKey && event.keyCode === 51) {
  248. input.execute('game_stats_build 56565656565656888888877777774444444');
  249. build_msg()
  250. build_message.textContent = "Glass Fighter build applied";
  251. setTimeout(function() {
  252. build_message.style.display = "none";
  253. }, 3000);
  254. }
  255. });
  256. })();
  257.  
  258. (function() { // Destroyer
  259. document.addEventListener('keydown', function(event) {
  260. if (event.shiftKey && event.keyCode === 52) {
  261. input.execute('game_stats_build 565656565656888888844444447777777');
  262. build_msg()
  263. build_message.textContent = "Destroyer build applied";
  264. setTimeout(function() {
  265. build_message.style.display = "none";
  266. }, 3000);
  267. }
  268. });
  269. })();
  270.  
  271. (function() { // UI Toggle
  272.  
  273. document.addEventListener('keydown', function(event) {
  274. if (event.key === 'f' || event.key === 'F') {
  275. if(Ui_Toggle.textContent === "UI Toggle: F - Enabled") {
  276. if (renUI == renUI) {
  277. renUI = !renUI
  278. input.set_convar("ren_ui", renUI);
  279.  
  280. }
  281. }
  282. }
  283. });
  284. })();
  285.  
  286.  
  287.  
  288.  
  289. //patched fuck u (function() { // Auto Repel
  290. //patched fuck u document.addEventListener('keydown', function(event) {
  291. //patched fuck u if (event.keyCode === 90) { // Z key
  292. //patched fuck u if (t_2) {
  293. //patched fuck u input.key_Down('16');
  294. //patched fuck u } else {
  295. //patched fuck u input.key_Down('16'); //patched
  296. //patched fuck u }
  297. //patched fuck u t_2 = !t_2;
  298. //patched fucku }
  299. //patched fuck u });
  300. //patched fuck u })();
  301.  
  302. (function() { // Build Create
  303. document.addEventListener('keydown', function(event) {
  304. if (event.keyCode === 66) {
  305. var build_c = document.createElement("div")
  306. var build_assistText = document.createElement("div")
  307. var name = document.createElement("div")
  308. var nameTutorial = document.createElement("div")
  309.  
  310. build_c.textContent = "Create build"
  311. build_assistText.textContent = "Build your own build here<br> Press the number keys or the individual buttons to create your own build."
  312. name.textContent = "Name"
  313. nameTutorial.textContent = "Give your build a name"
  314.  
  315. document.body.appendChild(build_c)
  316. document.body.appendChild(build_assistText)
  317.  
  318. }
  319. });
  320. })();
  321.  
  322. })();