Diep.io Custom Points Upgrader. Beta

NEW! custom upgrade builds update! Your upgrade builds will save now! This is still in beta!

Versão de: 30/01/2025. Veja: a última versão.

  1. // ==UserScript==
  2. // @name Diep.io Custom Points Upgrader. Beta
  3. // @namespace http://tampermonkey.net/
  4. // @version 9.8
  5. // @homepage https://greatest.deepsurf.us/scripts/416440
  6. // @description NEW! custom upgrade builds update! Your upgrade builds will save now! This is still in beta!
  7. // @author -{Abyss⌬}-ora
  8. // @match https://diep.io/*
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function () {
  14. "use strict";
  15.  
  16. const hoverMenu = document.createElement("div");
  17. hoverMenu.id = "myhover";
  18. hoverMenu.className = "hover";
  19.  
  20. const modMenu = document.createElement("a");
  21. modMenu.id = "modtab";
  22.  
  23. const menuHeader = document.createElement("h1");
  24. menuHeader.textContent = "-{Abyss⌬}-ora's Mod Menu beta";
  25. modMenu.appendChild(menuHeader);
  26.  
  27. const topRightButton = document.createElement("button");
  28. topRightButton.id = "topRightButton";
  29. topRightButton.textContent = "↻";
  30.  
  31. const style = document.createElement("style");
  32. style.type = "text/css";
  33. style.textContent = `
  34. #myhover a {
  35. z-index: 999;
  36. position: absolute;
  37. top: 300px;
  38. right: -260px;
  39. transition: 0.3s;
  40. width: 250px;
  41. padding: 15px;
  42. background-image: url("https://media.tenor.com/images/f3f5354b7c304bc61882dbb1183885e7/tenor.gif");
  43. background-color: #555;
  44. text-decoration: none;
  45. font-size: 10px;
  46. font-family: 'Monoton', cursive;
  47. text-shadow: 1px 1px #000, 2px 2px #555;
  48. color: white;
  49. border: double thick white;
  50. border-radius: 20px;
  51. }
  52. #myhover a:hover {
  53. right: 0;
  54. }
  55. .button {
  56. display: block;
  57. margin: 5px auto;
  58. width: 90%;
  59. text-align: center;
  60. font-size: 18px;
  61. font-family: 'Jersey 10', sans-serif;
  62. color: black;
  63. background-color: white;
  64. border-radius: 5px;
  65. transition: 0.4s;
  66. cursor: pointer;
  67. }
  68. .button:hover {
  69. transform: translateX(-10px);
  70. }
  71. #userInput {
  72. margin: 5px auto;
  73. width: 90%;
  74. padding: 8px;
  75. font-family: 'Monoton', cursive;
  76. text-align: center;
  77. }
  78. #specialButton {
  79. display: block;
  80. margin: 5px auto;
  81. width: 90%;
  82. text-align: center;
  83. font-size: 18px;
  84. font-family: 'Jersey 10', sans-serif;
  85. color: white;
  86. background-color: black;
  87. border-radius: 5px;
  88. border-color: white;
  89. transition: 0.4s;
  90. cursor: pointer;
  91. opacity: 0.8;
  92. }
  93. #specialButton:hover {
  94. color: black;
  95. background-color: darkgray;
  96. transform: translateX(-10px);
  97. }
  98. .popup {
  99. position: fixed;
  100. top: 50%;
  101. left: 50%;
  102. transform: translate(-50%, -50%);
  103. width: 300px;
  104. background-image: url("https://media.tenor.com/images/f3f5354b7c304bc61882dbb1183885e7/tenor.gif");
  105. background-color: white;
  106. border: double thick white;
  107. border-radius: 10px;
  108. padding: 20px;
  109. z-index: 1000;
  110. text-shadow: 1px 1px #000, 2px 2px #555;
  111. }
  112. .attribute {
  113. display: flex;
  114. align-items: center;
  115. margin-bottom: 10px;
  116. }
  117. .attribute div {
  118. width: 30px;
  119. height: 30px;
  120. border: 1px solid #000;
  121. margin: 0;
  122. }
  123. .attribute button {
  124. background-color: gray;
  125. border: none;
  126. color: white;
  127. font-size: 20px;
  128. cursor: pointer;
  129. width: 30px;
  130. height: 30px;
  131. margin: 0;
  132. }
  133. #pointsCounter {
  134. text-align: center;
  135. font-size: 16px;
  136. margin-bottom: 10px;
  137. }
  138. #createBuildButton {
  139. display: block;
  140. margin: 20px auto 0 auto;
  141. width: 80%;
  142. text-align: center;
  143. font-size: 18px;
  144. font-family: 'Jersey 10', sans-serif;
  145. color: black;
  146. background-color: white;
  147. border-radius: 5px;
  148. border: 2px solid black;
  149. cursor: pointer;
  150. padding: 10px;
  151. }
  152. #createBuildButton:hover {
  153. background-color: gray;
  154. color: white;
  155. }
  156. #codeString {
  157. text-align: center;
  158. font-size: 18px;
  159. margin: 10px 0;
  160. }
  161. .remove-button {
  162. background-color: gray;
  163. border: none;
  164. color: white;
  165. font-size: 18px;
  166. cursor: pointer;
  167. width: 30px;
  168. height: 30px;
  169. margin-right: 5px;
  170. transition: background-color 0.3s;
  171. }
  172. .remove-button:hover {
  173. background-color: red;
  174. }
  175. .close-btn {
  176. position: absolute;
  177. top: 5px;
  178. right: 5px;
  179. width: 30px;
  180. height: 30px;
  181. background-color: black;
  182. color: white;
  183. border: none;
  184. border-radius: 10%;
  185. cursor: pointer;
  186. font-size: 18px;
  187. line-height: 30px;
  188. text-align: center;
  189. transition: background-color 0.3s;
  190. opacity: 0.8;
  191. }
  192. .close-btn:hover {
  193. background-color: red;
  194. }
  195. #topRightButton {
  196. position: absolute;
  197. top: 10px;
  198. right: 10px;
  199. width: 30px;
  200. height: 30px;
  201. background-color: black;
  202. color: white;
  203. border: none;
  204. border-radius: 10%;
  205. cursor: pointer;
  206. font-size: 18px;
  207. display: flex;
  208. justify-content: center;
  209. align-items: center;
  210. transition: background-color 0.3s;
  211. z-index: 1001;
  212. opacity: 0.8;
  213. }
  214. #topRightButton:hover {
  215. color: red;
  216. }
  217. #buildButtonsContainer {
  218. max-height: 400px;
  219. overflow-y: scroll;
  220. margin-left: 5px;
  221. }
  222. #buildButtonsContainer {
  223. -ms-overflow-style: none;
  224. scrollbar-width: none;
  225. }
  226. ::-webkit-scrollbar {
  227. width: 10px;
  228. }
  229. ::-webkit-scrollbar-track {
  230. background: #f1f1f1;
  231. border-radius: 10px;
  232. }
  233. ::-webkit-scrollbar-thumb {
  234. background: #888;
  235. border-radius: 10px;
  236. }
  237. ::-webkit-scrollbar-thumb:hover {
  238. background: #555;
  239. }
  240. `;
  241. document.head.appendChild(style);
  242.  
  243. const userInput = document.createElement("input");
  244. userInput.id = "userInput";
  245. userInput.type = "text";
  246. userInput.placeholder = "Enter Username For Quick Spawn";
  247. userInput.value = localStorage.getItem("quickSpawnUsername") || "";
  248. modMenu.appendChild(userInput);
  249.  
  250. userInput.addEventListener("input", (event) => {
  251. localStorage.setItem("quickSpawnUsername", event.target.value);
  252. });
  253.  
  254. const buttons = [];
  255.  
  256. buttons.forEach((buttonData) => {
  257. const buttonContainer = document.createElement("div");
  258. buttonContainer.style.display = "flex";
  259. buttonContainer.style.alignItems = "center";
  260. buttonContainer.style.justifyContent = "center";
  261.  
  262. const removeButton = document.createElement("button");
  263. removeButton.className = "remove-button";
  264. removeButton.textContent = "[-]";
  265. removeButton.onclick = () => {
  266. buttonContainer.remove();
  267. const updatedButtons = JSON.parse(localStorage.getItem("savedButtons")).filter(b => b.name !== buttonData.name);
  268. localStorage.setItem("savedButtons", JSON.stringify(updatedButtons));
  269.  
  270. const updatedRemovedDefaults = JSON.parse(localStorage.getItem("removedDefaults")) || [];
  271. updatedRemovedDefaults = updatedRemovedDefaults.filter(b => b !== buttonData.name);
  272. localStorage.setItem("removedDefaults", JSON.stringify(updatedRemovedDefaults));
  273. };
  274. buttonContainer.appendChild(removeButton);
  275.  
  276. const button = document.createElement("button");
  277. button.className = "button";
  278. button.textContent = buttonData.name;
  279. button.style.backgroundColor = buttonData.color;
  280. button.onclick = () => {
  281. const spawnName = userInput.value.trim();
  282. window.input.execute(`game_spawn ${spawnName}`);
  283. window.input.execute(`game_stats_build ${buttonData.cmd}`);
  284. const hoverMenu = document.getElementById("myhover");
  285. if (hoverMenu) {
  286. hoverMenu.style.display = hoverMenu.style.display === "none" ? "block" : "none";
  287. }
  288. };
  289. buttonContainer.appendChild(button);
  290.  
  291. modMenu.appendChild(buttonContainer);
  292. });
  293.  
  294. const specialButton = document.createElement("button");
  295. specialButton.id = "specialButton";
  296. specialButton.textContent = "[+]";
  297.  
  298. specialButton.onclick = () => {
  299. const popup = document.createElement("div");
  300. popup.className = "popup";
  301.  
  302. const closeButton = document.createElement("button");
  303. closeButton.className = "close-btn";
  304. closeButton.textContent = "X";
  305. closeButton.onclick = () => {
  306. document.body.removeChild(popup);
  307. };
  308. popup.appendChild(closeButton);
  309.  
  310. const buildNameInput = document.createElement("input");
  311. buildNameInput.type = "text";
  312. buildNameInput.placeholder = "Build Name";
  313. buildNameInput.style.display = "block";
  314. buildNameInput.style.width = "80%";
  315. buildNameInput.style.margin = "0 auto 10px auto";
  316. popup.appendChild(buildNameInput);
  317.  
  318. const pointsCounter = document.createElement("div");
  319. pointsCounter.id = "pointsCounter";
  320. pointsCounter.textContent = "Points: 33";
  321. popup.appendChild(pointsCounter);
  322.  
  323. const codeString = document.createElement("div");
  324. codeString.id = "codeString";
  325. codeString.textContent = "Code: 0";
  326. popup.appendChild(codeString);
  327.  
  328. let totalPoints = 33;
  329. let code = "";
  330.  
  331. const attributes = [
  332. { name: "Health Regen", color: "rgb(232, 188, 157)" },
  333. { name: "Max Health", color: "rgb(230, 128, 234)" },
  334. { name: "Body Damage", color: "rgb(165, 128, 234)" },
  335. { name: "Bullet Speed", color: "rgb(128, 162, 234)" },
  336. { name: "Bullet Penetration", color: "rgb(234, 215, 128)" },
  337. { name: "Bullet Damage", color: "rgb(234, 128, 128)" },
  338. { name: "Reload", color: "rgb(164, 234, 128)" },
  339. { name: "Movement Speed", color: "rgb(128, 234, 230)" },
  340. ];
  341.  
  342. attributes.forEach((attribute, index) => {
  343. const attributeRow = document.createElement("div");
  344. attributeRow.className = "attribute";
  345.  
  346. const minusButton = document.createElement("button");
  347. minusButton.textContent = "-";
  348. minusButton.onclick = () => {
  349. const coloredSquares = Array.from(attributeRow.children).filter(child => child.style.backgroundColor === attribute.color);
  350. if (coloredSquares.length > 0 && totalPoints < 33) {
  351. coloredSquares[coloredSquares.length - 1].style.backgroundColor = "gray";
  352. totalPoints++;
  353. pointsCounter.textContent = `Points: ${totalPoints}`;
  354. code = code.slice(0, -1);
  355. codeString.textContent = `Code: ${code}`;
  356. }
  357. };
  358. attributeRow.appendChild(minusButton);
  359.  
  360. for (let i = 0; i < 7; i++) {
  361. const colorDiv = document.createElement("div");
  362. colorDiv.style.backgroundColor = "gray";
  363. attributeRow.appendChild(colorDiv);
  364. }
  365.  
  366. const plusButton = document.createElement("button");
  367. plusButton.textContent = "+";
  368. plusButton.onclick = () => {
  369. const graySquares = Array.from(attributeRow.children).filter(child => child.style.backgroundColor === "gray");
  370. if (graySquares.length > 0 && totalPoints > 0) {
  371. graySquares[0].style.backgroundColor = attribute.color;
  372. totalPoints--;
  373. pointsCounter.textContent = `Points: ${totalPoints}`;
  374. code += (index + 1).toString();
  375. codeString.textContent = `Code: ${code}`;
  376. }
  377. };
  378. attributeRow.appendChild(plusButton);
  379.  
  380. popup.appendChild(attributeRow);
  381. });
  382.  
  383. const createBuildButton = document.createElement("button");
  384. createBuildButton.id = "createBuildButton";
  385. createBuildButton.textContent = "Create Build";
  386. createBuildButton.onclick = () => {
  387. const buildName = buildNameInput.value.trim();
  388. if (buildName === "") {
  389. alert("Please enter a build name.");
  390. return;
  391. }
  392.  
  393. let savedButtons = JSON.parse(localStorage.getItem("savedButtons")) || [];
  394. savedButtons.push({ name: buildName, color: "#C0C0C0", cmd: code });
  395. localStorage.setItem("savedButtons", JSON.stringify(savedButtons));
  396.  
  397. const buttonContainer = document.createElement("div");
  398. buttonContainer.style.display = "flex";
  399. buttonContainer.style.alignItems = "center";
  400. buttonContainer.style.justifyContent = "center";
  401.  
  402. const removeButton = document.createElement("button");
  403. removeButton.className = "remove-button";
  404. removeButton.textContent = "[-]";
  405. removeButton.onclick = () => {
  406. buttonContainer.remove();
  407. const updatedButtons = JSON.parse(localStorage.getItem("savedButtons")) || [];
  408. let newSavedButtons = updatedButtons.filter(b => b.name !== buildName);
  409. localStorage.setItem("savedButtons", JSON.stringify(newSavedButtons));
  410.  
  411. let updatedRemovedDefaults = JSON.parse(localStorage.getItem("removedDefaults")) || [];
  412. updatedRemovedDefaults = updatedRemovedDefaults.filter(b => b !== buildName);
  413. localStorage.setItem("removedDefaults", JSON.stringify(updatedRemovedDefaults));
  414. };
  415. buttonContainer.appendChild(removeButton);
  416.  
  417. const newButton = document.createElement("button");
  418. newButton.className = "button";
  419. newButton.textContent = buildName;
  420. newButton.style.backgroundColor = "#C0C0C0";
  421. newButton.onclick = () => {
  422. const spawnName = userInput.value.trim();
  423. window.input.execute(`game_spawn ${spawnName}`);
  424. window.input.execute(`game_stats_build ${code}`);
  425. const hoverMenu = document.getElementById("myhover");
  426. if (hoverMenu) {
  427. hoverMenu.style.display = hoverMenu.style.display === "none" ? "block" : "none";
  428. }
  429. };
  430. buttonContainer.appendChild(newButton);
  431.  
  432. buildButtonsContainer.appendChild(buttonContainer);
  433.  
  434. document.body.removeChild(popup);
  435. };
  436. popup.appendChild(createBuildButton);
  437.  
  438. document.body.appendChild(popup);
  439. };
  440.  
  441. modMenu.appendChild(specialButton);
  442. modMenu.appendChild(topRightButton);
  443. hoverMenu.appendChild(modMenu);
  444. document.body.appendChild(hoverMenu);
  445.  
  446. document.addEventListener("keydown", (event) => {
  447. if (event.key === "r" || event.key === "R") {
  448. const hoverMenu = document.getElementById("myhover");
  449. if (hoverMenu) {
  450. hoverMenu.style.display = hoverMenu.style.display === "none" ? "block" : "none";
  451. }
  452. }
  453. });
  454.  
  455. window.onload = () => {
  456. const userInput = document.getElementById("userInput");
  457. const specialButton = document.getElementById("specialButton");
  458. const modMenu = document.getElementById("modtab");
  459. const topRightButton = document.getElementById("topRightButton");
  460.  
  461. const savedButtons = JSON.parse(localStorage.getItem("savedButtons")) || [];
  462. const removedDefaults = JSON.parse(localStorage.getItem("removedDefaults")) || [];
  463.  
  464. const defaultButtons = [
  465. { "name": "L3mon", "color": "#FFFFFF", "cmd": "656565656565654848748487484874877" },
  466. { "name": "Factory", "color": "#FFFFFF", "cmd": "567456745678567456745678567488888" },
  467. { "name": "OverLord2.0", "color": "#FFFFFF", "cmd": "456745674567456745674567456788888" },
  468. { "name": "OverLord", "color": "#FFFFFF", "cmd": "555666555566664444444888888822111" },
  469. { "name": "Juggernaut", "color": "#FFFFFF", "cmd": "213121312138238238883288327777777" },
  470. { "name": "SmasherPacifist", "color": "#FFFFFF", "cmd": "7654765476547654765476547654128128128312812812812831281281283" },
  471. { "name": "SmasherAttacker", "color": "#FFFFFF", "cmd": "7654765476547654765476547654111823823823823823823823823823823" },
  472. { "name": "SturdyDestroyer", "color": "#FFFFFF", "cmd": "456456456456456456456123123123123" },
  473. { "name": "Aggressor", "color": "#FFFFFF", "cmd": "456745674567456745674567456722111" },
  474. { "name": "SturdyAggressor", "color": "#FFFFFF", "cmd": "567856785678567856785678567822111" },
  475. { "name": "SturdyTriangle", "color": "#FFFFFF", "cmd": "567567567567567567567123123123123" },
  476. { "name": "Sniper", "color": "#FFFFFF", "cmd": "564456445644564815681568156818188" },
  477. { "name": "Trapper", "color": "#FFFFFF", "cmd": "567567485675674856756748567484848" },
  478. { "name": "Semi/Ram/Booster", "color": "#FFFFFF", "cmd": "567823567823148148567823567882314" },
  479. { "name": "anti-ram", "color": "#FFFFFF", "cmd": "234234562345623456234562345623456" },
  480. { "name": "pentrat/anti-ram", "color": "#FFFFFF", "cmd": "345345263452634526345263452634526" },
  481. { "name": "Anni/hybrid", "color": "#FFFFFF", "cmd": "456845684568456845678456782345678" },
  482. { "name": "OL/overseer", "color": "#FFFFFF", "cmd": "456845684568456845683456782345678" }
  483. ];
  484.  
  485. const allButtons = [...defaultButtons, ...savedButtons.filter(saved => !defaultButtons.some(defaultButton => defaultButton.name === saved.name))];
  486. const finalButtons = allButtons.filter(buttonData => !removedDefaults.includes(buttonData.name));
  487.  
  488. const buildButtonsContainer = document.createElement("div");
  489. buildButtonsContainer.id = "buildButtonsContainer";
  490. buildButtonsContainer.style.maxHeight = "400px";
  491. buildButtonsContainer.style.overflowY = "scroll";
  492. buildButtonsContainer.style.color = "black";
  493. modMenu.insertBefore(buildButtonsContainer, specialButton);
  494.  
  495. function createButton(buttonData) {
  496. const buttonContainer = document.createElement("div");
  497. buttonContainer.style.display = "flex";
  498. buttonContainer.style.alignItems = "center";
  499. buttonContainer.style.justifyContent = "center";
  500.  
  501. const removeButton = document.createElement("button");
  502. removeButton.className = "remove-button";
  503. removeButton.textContent = "[-]";
  504. removeButton.onclick = () => {
  505. buttonContainer.remove();
  506.  
  507. let updatedButtons = JSON.parse(localStorage.getItem("savedButtons")) || [];
  508. let newSavedButtons = updatedButtons.filter(b => b.name !== buttonData.name);
  509. localStorage.setItem("savedButtons", JSON.stringify(newSavedButtons));
  510.  
  511. let updatedRemovedDefaults = JSON.parse(localStorage.getItem("removedDefaults")) || [];
  512. updatedRemovedDefaults.push(buttonData.name);
  513. localStorage.setItem("removedDefaults", JSON.stringify(updatedRemovedDefaults));
  514. };
  515. buttonContainer.appendChild(removeButton);
  516.  
  517. const button = document.createElement("button");
  518. button.className = "button";
  519. button.textContent = buttonData.name;
  520. button.style.backgroundColor = buttonData.color;
  521. button.onclick = () => {
  522. const spawnName = userInput.value.trim();
  523. window.input.execute(`game_spawn ${spawnName}`);
  524. window.input.execute(`game_stats_build ${buttonData.cmd}`);
  525. const hoverMenu = document.getElementById("myhover");
  526. if (hoverMenu) {
  527. hoverMenu.style.display = hoverMenu.style.display === "none" ? "block" : "none";
  528. }
  529. };
  530. buttonContainer.appendChild(button);
  531.  
  532. buildButtonsContainer.appendChild(buttonContainer);
  533. }
  534.  
  535. finalButtons.forEach(buttonData => createButton(buttonData));
  536.  
  537. const createBuildButton = document.getElementById("createBuildButton");
  538. createBuildButton.onclick = () => {
  539. const buildNameInput = document.getElementById("buildNameInput");
  540. const buildName = buildNameInput.value.trim();
  541. if (buildName === "") {
  542. alert("Please enter a build name.");
  543. return;
  544. }
  545.  
  546. const code = "some_code_here";
  547.  
  548. let savedButtons = JSON.parse(localStorage.getItem("savedButtons")) || [];
  549. savedButtons.push({ name: buildName, color: "#C0C0C0", cmd: code });
  550. localStorage.setItem("savedButtons", JSON.stringify(savedButtons));
  551.  
  552. createButton({ name: buildName, color: "#C0C0C0", cmd: code });
  553.  
  554. const popup = document.getElementById("popup");
  555. document.body.removeChild(popup);
  556. };
  557. };
  558.  
  559. document.getElementById("userInput").addEventListener("input", (event) => {
  560. localStorage.setItem("quickSpawnUsername", event.target.value);
  561. });
  562.  
  563. topRightButton.addEventListener("click", () => {
  564. const resetPopup = document.createElement("div");
  565. resetPopup.className = "popup";
  566.  
  567. const closeButton = document.createElement("button");
  568. closeButton.className = "close-btn";
  569. closeButton.textContent = "X";
  570. closeButton.onclick = () => {
  571. document.body.removeChild(resetPopup);
  572. };
  573. resetPopup.appendChild(closeButton);
  574.  
  575. const confirmationMessage = document.createElement("div");
  576. confirmationMessage.textContent = "Do you really want to reset to default builds?";
  577. confirmationMessage.style.textAlign = "center";
  578. confirmationMessage.style.marginBottom = "20px";
  579. resetPopup.appendChild(confirmationMessage);
  580.  
  581. const buttonsContainer = document.createElement("div");
  582. buttonsContainer.style.display = "flex";
  583. buttonsContainer.style.justifyContent = "space-between";
  584.  
  585. const noButton = document.createElement("button");
  586. noButton.className = "button";
  587. noButton.textContent = "NO";
  588. noButton.onclick = () => {
  589. document.body.removeChild(resetPopup);
  590. };
  591. buttonsContainer.appendChild(noButton);
  592.  
  593. const yesButton = document.createElement("button");
  594. yesButton.className = "button";
  595. yesButton.textContent = "YES";
  596. yesButton.onclick = () => {
  597. localStorage.removeItem("savedButtons");
  598. localStorage.removeItem("removedDefaults");
  599. location.reload();
  600. };
  601. buttonsContainer.appendChild(yesButton);
  602.  
  603. resetPopup.appendChild(buttonsContainer);
  604. document.body.appendChild(resetPopup);
  605. });
  606.  
  607. })();