Sigmally Mod

Mod for Sigmally.com | by cursd#0126. Dark Mode, Long Nickname, Macros, Extanded Settings, Freeze Player; Mod Menu

当前为 2023-04-21 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Sigmally Mod
  3. // @version 2.1
  4. // @description Mod for Sigmally.com | by cursd#0126. Dark Mode, Long Nickname, Macros, Extanded Settings, Freeze Player; Mod Menu
  5. // @author Cursed
  6. // @match *://sigmally.com/*
  7. // @icon https://raw.githubusercontent.com/Sigmally/SigMod/main/images/SigmodV2-Circle.png
  8. // @run-at document-end
  9. // @license MIT
  10. // @namespace https://greasyfork.org/users/981958
  11. // ==/UserScript==
  12.  
  13. (function () {
  14. const rzModSettings = document.createElement("form");
  15.  
  16. const KEY_FEED = {
  17. key: "w",
  18. keyCode: 32,
  19. which: 32,
  20. };
  21. const KEY_SPLIT = {
  22. keyCode: 32,
  23. code: "Space",
  24. cancelable: true,
  25. composed: true,
  26. isTrusted: true,
  27. which: 32,
  28. };
  29.  
  30. let rxSettings = localStorage.getItem("rxSettings");
  31.  
  32. if (!rxSettings) {
  33. rxSettings = {
  34. keyBindingsRapidFeed: "q",
  35. keyBindingsdoubleSplit: "d",
  36. keyBindingsTripleSplit: "f",
  37. keyBindingsQuadSplit: "g",
  38. keyBindingsFreezePlayer: "s",
  39. darkMode: true,
  40. };
  41. } else {
  42. rxSettings = JSON.parse(rxSettings);
  43. }
  44.  
  45. rzModSettings.setAttribute("id", "rx-mod-settings");
  46. rzModSettings.classList.add("hidden");
  47. rzModSettings.onsubmit = (e) => {
  48. rzModSettings.classList.toggle("hidden");
  49. e.preventDefault();
  50.  
  51. let options = new FormData(rzModSettings);
  52.  
  53. for (var key of options.keys()) {
  54. rxSettings[key] = options.get(key);
  55. }
  56.  
  57. localStorage.setItem("rxSettings", JSON.stringify(rxSettings));
  58.  
  59. return false;
  60. };
  61. rzModSettings.innerHTML =
  62. '<div class="cztop">' +
  63. '<div class="cztopleft">' +
  64. '<img src="https://i.ibb.co/stQVx38/SigmodV2.png" draggable="false" class="titleImg">' +
  65. '<h4 class="SettingsTitle">Settings</h4>' +
  66. "</div>" +
  67. '<input type="submit" class="CloseBtn"; value="X"/>' +
  68. "</div>" +
  69. "<hr/>" +
  70. '<h5 class="Sett">Keybindings</h5>' +
  71. '<div class="left-modg">' +
  72. '<label class="flex">' +
  73. '<input type="text" name="keyBindingsRapidFeed" id="modinput1" class="keybinding" value="' +
  74. rxSettings.keyBindingsRapidFeed +
  75. '" maxlength="1" onfocus="this.select()">' +
  76. '<span class="Sett">Rapid Feed</span>' +
  77. "</label>" +
  78. '<label class="flex">' +
  79. '<input type="text" name="keyBindingsdoubleSplit" id="modinput2" class="keybinding" value="' +
  80. rxSettings.keyBindingsdoubleSplit +
  81. '" maxlength="1" onfocus="this.select()">' +
  82. '<span class="Sett">Double Split</span>' +
  83. "</label>" +
  84. '<label class="flex">' +
  85. '<input type="text" name="keyBindingsTripleSplit" id="modinput3" class="keybinding" value="' +
  86. rxSettings.keyBindingsTripleSplit +
  87. '" maxlength="1" onfocus="this.select()">' +
  88. '<span class="Sett">Triple Split</span>' +
  89. "</label>" +
  90. '<label class="flex">' +
  91. '<input type="text" name="keyBindingsQuadSplit" id="modinput4" class="keybinding" value="' +
  92. rxSettings.keyBindingsQuadSplit +
  93. '" maxlength="1" onfocus="this.select()">' +
  94. '<span class="Sett">Quad Split</span>' +
  95. "</label>" +
  96. "</label>" +
  97. '<label class="flex">' +
  98. '<input type="text" name="keyBindingsFreezePlayer" id="modinput5" class="keybinding" value="' +
  99. rxSettings.keyBindingsFreezePlayer +
  100. '" maxlength="1" onfocus="this.select()">' +
  101. '<span class="Sett">Freeze Player</span>' +
  102. "</label>" +
  103. "</div>" +
  104. '<div class="right-modg">' +
  105. "</div>" +
  106. "<hr/>" +
  107. '<h4 class="Sett">Discord</h4>' +
  108. '<div class="modContainer"><a href="https://discord.gg/gHmhpCaPfP" target="_blank" class="modButton" style="width: 100%;">Join Sigmally Modz Server</a></div>' +
  109. "<hr/>" +
  110. '<h4 class="Sett">Stylish Names</h4>' +
  111. '<div class="modContainer"><a href="https://www.stylishnamemaker.com" target="_blank" class="modButton">Stylish Name Maker</a><a href="https://nickfinder.com" target="_blank" class="modButton">Nickfinder</a></div>' +
  112. "<hr/>" +
  113. '<h4 class="Sett">Youtube</h4>' +
  114. '<div class="modContainer"><a href="https://www.youtube.com/@cursed9645/" target="_blank" class="modButton">Cursed</a><a href="https://www.youtube.com/channel/UCEn7a9rEtJNsw1WKgsAoyXQ" class="modButton" target="_blank">Sigmally Modz</a></div>';
  115.  
  116. const rzMods = [
  117. {
  118. modName: "Branding",
  119. modType: "automatic",
  120. modDescription: "Branding",
  121. modCode: () => {
  122. const gameTitle = document.getElementById("title");
  123. gameTitle.innerHTML = 'Sigmally<span style="display:block; font-size: 14px;">Mod by Cursed / Ringzer0</span>';
  124. },
  125. },
  126. {
  127. modName: "Game Settings",
  128. modType: "automatic",
  129. modDescription: "Extanded Game Settings",
  130. modCode: () => {
  131. const gameSettings = document.querySelector(".checkbox-grid");
  132. gameSettings.innerHTML += `
  133. <li>
  134. <div class="pretty p-svg p-round p-smooth">
  135. <input type="checkbox" id="showNames">
  136. <div class="state p-success">
  137. <svg class="svg svg-icon" viewBox="0 0 20 20">
  138. <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" style="stroke: white;fill:white;"></path>
  139. </svg>
  140. <label>Names</label>
  141. </div>
  142. </div>
  143. </li>
  144. <li>
  145. <div class="pretty p-svg p-round p-smooth">
  146. <input type="checkbox" id="showSkins">
  147. <div class="state p-success">
  148. <svg class="svg svg-icon" viewBox="0 0 20 20">
  149. <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" style="stroke: white;fill:white;"></path>
  150. </svg>
  151. <label>Skins</label>
  152. </div>
  153. </div>
  154. </li>
  155. <li>
  156. <div class="pretty p-svg p-round p-smooth">
  157. <input type="checkbox" id="longNick" checked>
  158. <div class="state p-success">
  159. <svg class="svg svg-icon" viewBox="0 0 20 20">
  160. <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" style="stroke: white;fill:white;"></path>
  161. </svg>
  162. <label>Long Nick</label>
  163. </div>
  164. </div>
  165. </li>
  166. <li>
  167. <div class="pretty p-svg p-round p-smooth">
  168. <input type="checkbox" id="darkMenu">
  169. <div class="state p-success">
  170. <svg class="svg svg-icon" viewBox="0 0 20 20">
  171. <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" style="stroke: white;fill:white;"></path>
  172. </svg>
  173. <label>Dark Menu</label>
  174. </div>
  175. </div>
  176. </li>`;
  177. },
  178. },
  179. {
  180. modName: "Rapid Feed (q)",
  181. modType: "automatic",
  182. modDescription: "You feed faster",
  183. modCode: () => {
  184. window.rxTimeouts = [];
  185. const amount = 10;
  186.  
  187. window.addEventListener("keyup", (e) => {
  188. if (e.key == rxSettings.keyBindingsRapidFeed) {
  189. for (var i = 0; i < rxTimeouts.length; i++) {
  190. clearTimeout(rxTimeouts[i]);
  191. }
  192. }
  193. });
  194. window.addEventListener("keydown", (e) => {
  195. let x = true;
  196. if (!x || document.activeElement.nodeName === "INPUT") {
  197. return;
  198. }
  199. if (e.key == "Tab") {
  200. e.preventDefault();
  201. }
  202.  
  203. if (e.key == rxSettings.keyBindingsFreezePlayer) {
  204. function center(sx, sy) {
  205. const mouseMoveEvent = new MouseEvent("mousemove", {clientX: sx, clientY: sy})
  206. const canvas = document.getElementById("canvas")
  207. canvas.dispatchEvent(mouseMoveEvent)
  208. }
  209.  
  210. const CX = window.innerWidth / 2;
  211. const CY = window.innerHeight / 2;
  212.  
  213. center(CX, CY)
  214. }
  215.  
  216. if (e.key == rxSettings.keyBindingsRapidFeed) {
  217. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED));
  218. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED));
  219. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED));
  220. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED));
  221. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED));
  222. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED));
  223. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED));
  224. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED));
  225. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED));
  226. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED));
  227. for (var i = 0; i < amount; ++i) {
  228. rxTimeouts.push(setTimeout(function() {
  229. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED));
  230. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED));
  231. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED));
  232. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED));
  233. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED));
  234. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED));
  235. }, i ));
  236. }
  237. return;
  238. }
  239.  
  240. if (e.key == rxSettings.keyBindingsdoubleSplit) {
  241. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  242. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  243. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  244. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  245. return;
  246. }
  247.  
  248. if (e.key == rxSettings.keyBindingsTripleSplit) {
  249. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  250. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  251. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  252. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  253. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  254. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  255. return;
  256. }
  257.  
  258. if (e.key == rxSettings.keyBindingsQuadSplit) {
  259. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  260. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  261. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  262. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  263. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  264. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  265. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  266. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  267. return;
  268. }
  269. });
  270. },
  271. },
  272. {
  273. modName: "Long Nicknames",
  274. modType: "automatic",
  275. modDescription: "Allows for longer nicknames.",
  276. modCode: () => {
  277. const nickName = document.getElementById("nick");
  278. let longNick = document.getElementById("longNick");
  279. nickName.maxLength = 50;
  280.  
  281. longNick.addEventListener("change", () => {
  282. if (nickName.maxLength == 50) {
  283. nickName.maxLength = 15;
  284. } else if (nickName.maxLength == 15) {
  285. nickName.maxLength = 50;
  286. }
  287. });
  288. },
  289. }, {
  290. modName: "Dark Menu",
  291. modType: "automatic",
  292. modDescription: "Changes the menu color to darker color.",
  293. modCode: () => {
  294. setTimeout(() => {
  295. const menu = document.getElementById("menu");
  296. const rightMenu = document.querySelector(".top-users__inner");
  297. const leftMenu = document.getElementById("left-menu");
  298. const linksMenu = document.querySelector(".menu-links");
  299. const deathScreen = document.querySelector(".menu--stats-mode");
  300. const skin_text = document.getElementById("js-skin-select-icon-text");
  301. let darkM = true;
  302. let darkMode_cb = document.getElementById("darkMenu");
  303. let b_inner = document.querySelector(".body__inner");
  304. let elements = b_inner.querySelectorAll(".body__inner > :not(.body__inner), #s-skin-select-icon-text");
  305. const darkColor = "#252525";
  306. const darkColor2 = "#222222";
  307. const lightColor = "#FFFFFF";
  308. darkMode_cb.addEventListener("change", () => {
  309. if (!darkM) {
  310. darkM = true;
  311. rxSettings.darkMode = true;
  312. localStorage.setItem("rxSettings", JSON.stringify(rxSettings));
  313. skin_text.style.color = lightColor;
  314.  
  315. menu.style.backgroundColor = darkColor;
  316. rightMenu.style.backgroundColor = darkColor;
  317. leftMenu.style.backgroundColor = darkColor;
  318. linksMenu.style.backgroundColor = darkColor;
  319. deathScreen.style.backgroundColor = darkColor;
  320.  
  321. elements.forEach((textElements) => {
  322. textElements.style.color = lightColor;
  323. });
  324. } else {
  325. darkM = false;
  326. rxSettings.darkMode = false;
  327. localStorage.setItem("rxSettings", JSON.stringify(rxSettings));
  328. skin_text.style.color = darkColor2;
  329. menu.style.backgroundColor = lightColor;
  330. rightMenu.style.backgroundColor = lightColor;
  331. leftMenu.style.backgroundColor = lightColor;
  332. linksMenu.style.backgroundColor = lightColor;
  333. deathScreen.style.backgroundColor = lightColor;
  334.  
  335. elements.forEach((textElements) => {
  336. textElements.style.color = darkColor2;
  337. });
  338. }
  339. });
  340. if (rxSettings.darkMode) {
  341. darkMode_cb.checked = true;
  342. darkM = true;
  343. skin_text.style.color = lightColor;
  344. menu.style.backgroundColor = darkColor;
  345. rightMenu.style.backgroundColor = darkColor;
  346. leftMenu.style.backgroundColor = darkColor;
  347. linksMenu.style.backgroundColor = darkColor;
  348. deathScreen.style.backgroundColor = darkColor;
  349.  
  350. elements.forEach((textElements) => {
  351. textElements.style.color = lightColor;
  352. });
  353. } else {
  354. darkM = false;
  355. darkMode_cb.checked = false;
  356. }
  357. }, 500);
  358. },
  359. },
  360. {
  361. modName: "",
  362. modType: "button",
  363. modDescription: "Mod Settings Button",
  364. modId: "SettingsButton",
  365. modCode: () => {
  366. rzModSettings.classList.toggle("hidden");
  367. },
  368. }, {
  369. modName: "input filter",
  370. modType: "automatic",
  371. modDescription: "filters invalid input",
  372. modCode: () => {
  373. setTimeout(() => {
  374. const kinputs = ["modinput1", "modinput2", "modinput3", "modinput4", "modinput5"];
  375. kinputs.forEach((modkey) => {
  376. const kinput = document.getElementById(modkey);
  377. kinput.addEventListener("input", () => {
  378. const lowercaseValue = kinput.value.toLowerCase();
  379. if (kinput !== lowercaseValue) {
  380. kinput.value = lowercaseValue;
  381. }
  382. if (kinput.value !== "") {
  383. if (kinputs.filter((item) => item === kinput.value).length > 1) {
  384. alert("This value already exists!");
  385. kinput.value = "";
  386. return;
  387. } else {
  388. kinputs.forEach((otherKey) => {
  389. const otherInput = document.getElementById(otherKey);
  390. if (otherInput !== kinput && otherInput.value === kinput.value) {
  391. alert("You can't have 2 keybindings at the same time.");
  392. kinput.value = "";
  393. return;
  394. }
  395. });
  396. }
  397. }
  398. });
  399. });
  400.  
  401. let fastfeedkey = document.getElementById(kinputs[0]);
  402.  
  403. fastfeedkey.addEventListener("input", () => {
  404. if (fastfeedkey.value === "w") {
  405. alert("Currently, you can't change the fastfeed key to W. Please wait for updates.");
  406. fastfeedkey.value = "";
  407. return;
  408. }
  409. });
  410.  
  411. }, 500)
  412. }
  413. }
  414. ];
  415.  
  416. rzMods.forEach((mod) => {
  417. let modElement = null;
  418.  
  419. switch (mod.modType) {
  420. case "automatic":
  421. mod.modCode.call();
  422.  
  423. break;
  424. case "button":
  425. modElement = document.createElement("button");
  426. modElement.innerText = mod.modName;
  427. modElement.onclick = mod.modCode;
  428. modElement.title = mod.modDescription;
  429. modElement.id = mod.modId;
  430. break;
  431. }
  432.  
  433. if (modElement) {
  434. document.body.append(modElement);
  435. }
  436. });
  437.  
  438. document.body.prepend(rzModSettings);
  439. let V2S = `
  440. *{
  441. outline: none;
  442. }
  443. .flex {
  444. display: flex;
  445. justify-content: center;
  446. }
  447. #rx-mod-settings {
  448. background: #333;
  449. padding: 30px;
  450. border-radius: 15px;
  451. width: 350px;
  452. min-height: 200px;
  453. top: 1em;
  454. left: 50%;
  455. margin-left: -175px;
  456. z-index: 99999;
  457. box-shadow: 0 0 40px #8D00FF;
  458. position: fixed;
  459. text-align: center;
  460. }
  461. #rx-mod-settings input.keybinding {
  462. max-width: 20px;
  463. border: 1px solid #ccc;
  464. padding: 0;
  465. text-align: center;
  466. margin-right: 5px;
  467. outline: none;
  468. color: #fff;
  469. background-color: transparent;
  470. border: 1px solid #fff;
  471. border-radius: 5px;
  472. font-weight: 500;
  473. }
  474. #rx-mod-settings.hidden {
  475. display: none;
  476. }
  477.  
  478. #text-block,#left_ad_block,#ad_bottom,.ad-block,.ad-block-left,.ad-block-right {
  479. display: none;
  480. }
  481. .cztop{
  482. display: flex;
  483. justify-content: space-between;
  484. align-items: center;
  485. }
  486. .SettingsTitle{
  487. font-size: 32px;
  488. color: #EEE;
  489. margin-left: 10px;
  490. }
  491. .CloseBtn{
  492. outline: none;
  493. background-color: transparent;
  494. padding: 10px;
  495. font-size: 16px;
  496. transition: all .3s;
  497. color: #fff;
  498. border-radius: 15px;
  499. border: 2px solid #4C2B8D;
  500. width: 48px;
  501. }
  502. .CloseBtn:hover{
  503. border: 2px solid #5600FF;
  504. }
  505. .Sett{
  506. color: #fff;
  507. user-select: none;
  508. font-weight: 500;
  509. }
  510. .cztopleft{
  511. display: flex;
  512. align-items: center;
  513. }
  514. .titleImg{
  515. width: 50px;
  516. height: 50px;
  517. border-radius: 20px;
  518. object-fit: cover;
  519. }
  520. .modContainer {
  521. display: flex;
  522. justify-content: space-between;
  523. }
  524. .modButton{
  525. background-color: transparent;
  526. border: 1px solid #fff;
  527. border-radius: 5px;
  528. color: #fff;
  529. transition: all .3s;
  530. outline: none;
  531. padding: 5px;
  532. width: 60%;
  533. margin: 0 5px;
  534. font-size: 13px;
  535. }
  536. .modButton:hover {
  537. background-color: #5865F2;
  538. }
  539. #SettingsButton{
  540. background-color: transparent;
  541. height: 30px;
  542. background-image: url('https://i.ibb.co/pJhSvHJ/icons8-zahnrad-30.png');
  543. width: 30px;
  544. background-size: cover;
  545. border: none;
  546. outline: none;
  547. position: fixed;
  548. top: 15%;
  549. z-index:99997;
  550. }
  551.  
  552. @media screen and (max-height: 800px) {
  553. #rx-mod-settings{
  554. top: 0
  555. }
  556. }
  557. `;
  558.  
  559. let s = document.createElement("style");
  560. s.type = "text/css";
  561. s.innerHTML = V2S;
  562. (document.head || document.documentElement).appendChild(s);
  563. })();