Sigmally Mod

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

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

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