Sigmally Mod

A sigmally Mod

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

  1. // ==UserScript==
  2. // @name Sigmally Mod
  3. // @version 1.9.9
  4. // @description A sigmally Mod
  5. // @author Cursed
  6. // @match *://sigmally.com/*
  7. // @icon https://iili.io/yaKNoB.png
  8. // @run-at document-end
  9. // @license MIT
  10. // @namespace https://greasyfork.org/users/981958
  11. // ==/UserScript==
  12.  
  13. let Cursed__style = `
  14.  
  15. *{
  16. outline: none;
  17. }
  18.  
  19. .flex {
  20. display: flex;
  21. justify-content: center;
  22. }
  23.  
  24. #rx-mod-settings {
  25. background: linear-gradient(-45deg, #B876FF, #1F2A9E, #B876FF);
  26. background-size: 300% 300%;
  27. padding: 30px;
  28. border-radius: 15px;
  29. width: 350px;
  30. min-height: 200px;
  31. top: 1em;
  32. left: 50%;
  33. margin-left: -175px;
  34. z-index: 99999;
  35. box-shadow: 0 0 15px #000;
  36. position: fixed;
  37. animation: change 5s ease-in-out infinite;
  38. text-align: center;
  39. }
  40.  
  41. @keyframes change{
  42. 0%{
  43. background-position: 0 50%;
  44. }
  45. 50%{
  46. background-position: 100% 50%;
  47. }
  48. 100%{
  49. background-position: 0 50%;
  50. }
  51. }
  52.  
  53. #rx-mod-settings input.keybinding {
  54. max-width: 20px;
  55. border: 1px solid #ccc;
  56. padding: 0;
  57. text-align: center;
  58. margin-right: 5px;
  59. }
  60.  
  61. #rx-mod-settings input[type="radio"] {
  62. margin-right: 5px;
  63. }
  64. #rx-mod-settings input[type="submit"] {
  65. margin-top: 15px;
  66. }
  67.  
  68. #rx-mod-settings.hidden {
  69. display: none;
  70. }
  71.  
  72. #Cursed-Button{
  73. top: 50%;
  74. width: 100px;
  75. height: 5vh;
  76. }
  77.  
  78. #rx-mod-wrap {
  79. color:#fff;
  80. min-height: 25px;
  81. position: fixed;
  82. top: 15%;
  83. width: 100px;
  84. z-index:99997;
  85. transition: .3s;
  86. user-select: none;
  87. border: none;
  88. }
  89.  
  90. #rx-mod-wrap button {
  91. cursor: pointer;
  92. color: #333;
  93. }
  94.  
  95. #rx-mod-wrap span.text {
  96. margin-left: 15px;
  97. padding-left: 15px;
  98. border-left: 1px solid #dfdfdf;
  99. }
  100.  
  101. #text-block,#left_ad_block,#ad_bottom,.ad-block,.ad-block-left,.ad-block-right {
  102. display: none;
  103. }
  104.  
  105. .CloseBtn{
  106. outline: none;
  107. background-color: #fff;
  108. padding: 10px;
  109. font-size: 16px;
  110. transition: .3s;
  111. background-color: transparent;
  112. color: #fff;
  113. border-radius: 15px;
  114. border: 1px solid #fff;
  115. width: 45px;
  116. position: absolute;
  117. left: 80%;
  118. top: 0;
  119. }
  120.  
  121. .CloseBtn:hover{
  122. background-color: #DA7272;
  123. transition: .3s;
  124. }
  125.  
  126. .SettingsBtn{
  127. background-color: transparent;
  128. }
  129.  
  130. .keybinding{
  131. outline: none;
  132. color: #fff;
  133. background-color: #303030;
  134. border: none;
  135. border-radius: 5px;
  136. font-weight: 500;
  137. }
  138.  
  139. .Sett{
  140. color: #fff;
  141. user-select: none;
  142. font-weight: 500;
  143. }
  144.  
  145. .text{
  146. color: #fff;
  147. font-weight: 500;
  148. user-select: none;
  149. }
  150.  
  151. .titleImg{
  152. width: 100%;
  153. height: 150px;
  154. border-radius: 20px;
  155. margin-top: 40px;
  156. }
  157.  
  158. .JoinDc{
  159. background-color: transparent;
  160. width: 75%;
  161. height: 30px;
  162. border: 1px solid #fff;
  163. border-radius: 5px;
  164. color: #fff;
  165. transition: .3s;
  166. }
  167.  
  168. .JoinDc:hover{
  169. background-color: #5865F2;
  170. transition: .3s;
  171. }
  172.  
  173. .StylishNames{
  174. display: flex;
  175. justify-content: space-between;
  176. }
  177.  
  178. .divBtn{
  179. background-color: transparent;
  180. height: 30px;
  181. border: 1px solid #fff;
  182. border-radius: 5px;
  183. color: #fff;
  184. margin: 5px;
  185. transition: .3s;
  186. margin-bottom: 20px;
  187. outline: none;
  188. }
  189.  
  190. .divBtn:hover{
  191. background-color: #5865F2;
  192. transition: .3s;
  193. }
  194.  
  195. .Btn01{
  196. width: 100%;
  197. }
  198.  
  199. .Btn02{
  200. width: 100%;
  201. }
  202.  
  203. .ColorImage{
  204. width: 50px;
  205. height: 50px;
  206. cursor: pointer;
  207. }
  208.  
  209. #SettingsButton{
  210. background-color: transparent;
  211. height: 30px;
  212. background-image: url('https://i.ibb.co/pJhSvHJ/icons8-zahnrad-30.png');
  213. width: 30px;
  214. background-size: cover;
  215. border: none;
  216. outline: none;
  217. }
  218.  
  219. #SettingsButton:hover{
  220. opactiy: .5;
  221. }
  222.  
  223. @media screen and (max-height: 900px) {
  224. #rx-mod-wrap{
  225. top: 21%;
  226. }
  227. }
  228.  
  229. @media screen and (max-height: 800px) {
  230. #rx-mod-settings{
  231.  
  232. }
  233. }
  234.  
  235. .SettingsTitle{
  236. position: absolute;
  237. font-size: 24px;
  238. top: 2%;
  239. }
  240.  
  241. .Youtube{
  242. background-color: transparent;
  243.  
  244. height: 30px;
  245. border: 1px solid #fff;
  246. border-radius: 5px;
  247. color: #fff;
  248. transition: .3s;
  249. margin: 5px;
  250. width: 140px;
  251. }
  252.  
  253. .Youtube:hover{
  254. background-color: #DA7272;
  255. transition: .3s;
  256. }
  257.  
  258. .YT-BTNS{
  259. display: flex;
  260. justify-content: space-between;
  261. }
  262.  
  263. `
  264.  
  265. let s = document.createElement('style');
  266. s.type = "text/css"
  267. s.innerHTML = Cursed__style;
  268. (document.head || document.documentElement).appendChild(s);
  269.  
  270. (function() {
  271.  
  272.  
  273. document.addEventListener('keydown', (e) => {
  274. if (e.key === "Tab") {
  275. e.preventDefault();
  276. }
  277. })
  278.  
  279. const rzModWrap = document.createElement('div');
  280. const rzModSettings = document.createElement('form');
  281. const rzModStyle = document.createElement('link');
  282.  
  283.  
  284. const KEY_FEED = {
  285. key: 'w',
  286. keyCode: 32,
  287. which: 32
  288. };
  289. const KEY_SPLIT = {
  290. keyCode: 32,
  291. code: 'Space',
  292. cancelable: true,
  293. composed: true,
  294. isTrusted: true,
  295. which: 32
  296. }
  297.  
  298. rzModWrap.setAttribute('id', 'rx-mod-wrap');
  299.  
  300. if (!localStorage.getItem("visits")) {
  301. localStorage.setItem("visits", 1);
  302. } else {
  303. let visits = parseInt(localStorage.getItem("visits"));
  304. visits += 1;
  305. localStorage.setItem("visits", visits);
  306.  
  307. if (visits % 3 === 0) {
  308. const updated = document.createElement("div");
  309. updated.innerHTML = `
  310. <div>
  311. <span class="u_d">Wanna try a new mod? Try CzMod</span>
  312. <button class="u_b">X</button>
  313. </div>
  314. <button class="download_btn">Download</button>
  315. `;
  316. updated.style = "z-index: 99995; position: absolute; top: -5%; left: 50%; transform: translate(-50%, -50%); padding: 5px 10px; background: #333; border-radius: 10px; display: flex; justify-content: center; flex-direction: column; align-items: center; transition: .3s;";
  317. document.body.appendChild(updated);
  318.  
  319. let d = document.querySelector(".u_d");
  320. let x = document.querySelector(".u_b");
  321. let db = document.querySelector(".download_btn");
  322.  
  323. if (d && x && db) {
  324. d.style = "color: #fff; text-align: center; margin-right: 10px; user-select: none;";
  325. x.style = "background: #CF6464; border-radius: 10px; width: 23px; border: none; outline: none; color: #fff;";
  326. db.style = "background: #222; border-radius: 5px; border: 2px solid transparent; color: #fff; margin: 5px; padding: 7px; transition: .3s;";
  327.  
  328. db.addEventListener("mouseenter", () => {
  329. db.style.border = "2px solid #6216CA";
  330. });
  331.  
  332. db.addEventListener("mouseleave", () => {
  333. db.style.border = "2px solid transparent";
  334. });
  335. }
  336. setTimeout(() => {
  337. updated.style.top = "6%";
  338. }, 700);
  339.  
  340. x.addEventListener("click", () => {
  341. updated.style.top = "-5%";
  342. setTimeout(() => {
  343. updated.remove();
  344. }, 300);
  345. })
  346.  
  347. db.addEventListener("click", () => {
  348. window.open('https://greasyfork.org/en/scripts/459962-czmod', '_blank')
  349. })
  350. }
  351. }
  352.  
  353. const Zero_Two = '';
  354.  
  355. /*
  356. * Configure Settings
  357. */
  358.  
  359. let rxSettings = localStorage.getItem('rxSettings');
  360.  
  361. if (!rxSettings){
  362. rxSettings = {
  363. keyBindingsRapidFeed: 'q',
  364. keyBindingsdoubleSplit: 'd',
  365. keyBindingsTripleSplit: 'f',
  366. keyBindingsQuadSplit: 'g',
  367. };
  368. } else {
  369. rxSettings = JSON.parse(rxSettings);
  370. }
  371.  
  372. rzModSettings.setAttribute('id', 'rx-mod-settings');
  373. rzModSettings.classList.add('hidden');
  374. rzModSettings.onsubmit = (e) => {
  375. rzModSettings.classList.toggle('hidden');
  376. e.preventDefault();
  377.  
  378. let options = new FormData(rzModSettings);
  379.  
  380. rxSettings = {};
  381. for (var key of options.keys()) {
  382. rxSettings[key] = options.get(key);
  383. }
  384.  
  385. localStorage.setItem('rxSettings', JSON.stringify(rxSettings));
  386.  
  387. return false;
  388. };
  389. rzModSettings.innerHTML =
  390. '<h4 class="Sett SettingsTitle">Mod Settings</h4>' +
  391. '<input type="submit" class="CloseBtn"; value="X"/>' +
  392. '<img src="https://iili.io/yaKNoB.png" class="titleImg">' +
  393. '<hr/>' +
  394. '<h5 class="Sett">Key Mappings</h5>' +
  395. '<label class="flex">' +
  396. '<input type="text" name="keyBindingsRapidFeed" class="keybinding" value="' + rxSettings.keyBindingsRapidFeed + '" maxlength="1" onfocus="this.select()">' +
  397. '<span class="text">Rapid Feed</span>' +
  398. '</label>' +
  399. '<label class="flex">' +
  400. '<input type="text" name="keyBindingsDoubleSplit" class="keybinding" value="' + rxSettings.keyBindingsDoubleSplit + '" maxlength="1" onfocus="this.select()">' +
  401. '<span class="text">Double Split</span>' +
  402. '</label>' +
  403. '<label class="flex">' +
  404. '<input type="text" name="keyBindingsTripleSplit" class="keybinding" value="' + rxSettings.keyBindingsTripleSplit + '" maxlength="1" onfocus="this.select()">' +
  405. '<span class="text">Triple Split</span>' +
  406. '</label>' +
  407. '<label class="flex">' +
  408. '<input type="text" name="keyBindingsQuadSplit" class="keybinding" value="' + rxSettings.keyBindingsQuadSplit + '" maxlength="1" onfocus="this.select()">' +
  409. '<span class="text">Quad Split</span>' +
  410. '</label>' +
  411. '</label>' +
  412. '<hr/>' +
  413. '<h4 class="Sett">Discord</h4>' +
  414. '<a href="https://discord.gg/gHmhpCaPfP" target="_blank"><input type="button" value="Join" class="JoinDc"/></a>' +
  415. '<hr/>' +
  416. '<h4 class="Sett">Stylish Names</h4>' +
  417. '<div class="StylishNames"><a href="https://www.stylishnamemaker.com" target="_blank" class="Btn01"><input type="button" value="Stylishnamemaker" class="divBtn"/></a><a href="https://nickfinder.com" target="_blank" class="Btn02"><input type="button" value="Nickfinder" class="divBtn Btn02"/></a></div>' +
  418. '<hr/>' +
  419. '<h4 class="Sett">Youtube</h4>'+
  420. '<div class="YT-BTNS"><a href="https://www.youtube.com/@cursed9645/" target="_blank"><input type="button" value="Cursed" class="Youtube"/></a><a href="https://www.youtube.com/@sigmallymod" target="_blank"><input type="button" value="SigMod" class="Youtube"/></a></div>'
  421. ;
  422.  
  423. /*
  424. * Mod Collection
  425. *
  426. * Mod Types:
  427. * - Button
  428. * - Automatic
  429. * - Code
  430. * - Text
  431. */
  432. const gameSettings = document.getElementById('settings');
  433. gameSettings.innerHTML += `
  434. <ul class="checkbox-grid">
  435. <li>
  436. <div class="pretty p-svg p-round p-smooth">
  437. <input type="checkbox" id="showNames">
  438. <div class="state p-success">
  439. <svg class="svg svg-icon" viewBox="0 0 20 20">
  440. <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>
  441. </svg>
  442. <label>Names</label>
  443. </div>
  444. </div>
  445. </li>
  446. <li>
  447. <div class="pretty p-svg p-round p-smooth">
  448. <input type="checkbox" id="showSkins">
  449. <div class="state p-success">
  450. <svg class="svg svg-icon" viewBox="0 0 20 20">
  451. <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>
  452. </svg>
  453. <label>Skins</label>
  454. </div>
  455. </div>
  456. </li>
  457. <li>
  458. <div class="pretty p-svg p-round p-smooth">
  459. <input type="checkbox" id="showPosition">
  460. <div class="state p-success">
  461. <svg class="svg svg-icon" viewBox="0 0 20 20">
  462. <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>
  463. </svg>
  464. <label>Position</label>
  465. </div>
  466. </div>
  467. </li>
  468. </ul>
  469. </div>
  470. `
  471.  
  472. const rzMods = [{
  473. modName: 'Branding',
  474. modType: 'automatic',
  475. modDescription: 'Branding',
  476. modCode: () => {
  477. const gameTitle = document.getElementById('title');
  478. gameTitle.innerHTML = 'Sigmally<span style="display:block; font-size: 14px;">By RingZer0 / Cursed</span>';
  479. }
  480. }, {
  481. modName: 'Rapid Feed (q)',
  482. modType: 'automatic',
  483. modDescription: 'You feed faster',
  484. modCode: () => {
  485.  
  486. // TODO: Add these to settings/configuration pane
  487. window.rxTimeouts = [];
  488. const amount = 10;
  489.  
  490. window.addEventListener('keyup', e => {
  491. if (e.key == rxSettings.keyBindingsRapidFeed){
  492. for (var i = 0; i < rxTimeouts.length; i++){
  493. clearTimeout(rxTimeouts[i]);
  494. }
  495. }
  496. });
  497.  
  498. /*
  499. * Keyboard Overrides
  500. */
  501. window.addEventListener('keydown', e => {
  502.  
  503. if (e.key == 'Escape'){
  504. rzModSettings.classList.add('hidden');
  505. }
  506.  
  507. if (e.key == rxSettings.keyBindingsRapidFeed){
  508.  
  509. // kickstart first one
  510. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  511. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  512. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  513. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  514. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  515. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  516. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  517. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  518. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  519. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  520. for (var i = 0; i < amount; ++i) {
  521. rxTimeouts.push(setTimeout(function() {
  522. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  523. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  524. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  525. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  526. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  527. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  528. }, i ));
  529. }
  530.  
  531. return;
  532. }
  533.  
  534. if (e.key == rxSettings.keyBindingsDoubleSplit){
  535. for (let i = 0; i < 2; ++i) {
  536. setTimeout(function() {
  537. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  538. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  539. }, i + 1 );
  540. }
  541. return;
  542. }
  543.  
  544. if (e.key == rxSettings.keyBindingsTripleSplit){
  545. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  546. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  547. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  548. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  549. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  550. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  551. return;
  552. }
  553.  
  554. if (e.key == rxSettings.keyBindingsQuadSplit){
  555. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  556. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  557. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  558. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  559. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  560. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  561. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  562. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  563. return;
  564. }
  565.  
  566. });
  567. }
  568. }, {
  569. modName: 'Long Nicknames',
  570. modType: 'automatic',
  571. modDescription: 'Allows for longer nicknames.',
  572. modCode: () => {
  573. const nickName = document.getElementById('nick');
  574. nickName.setAttribute('maxlength', 60);
  575. }
  576. }, {
  577. modName: 'Set uData',
  578. modType: 'automatic',
  579. modDescription: 'Allows for longer nicknames.',
  580. modCode: () => {
  581. setTimeout(async () => {
  582. const res = await fetch('https://chrisheney.com/rx-auth-check.php', {
  583. method: 'POST',
  584. headers: {'Content-Type': 'application/json'},
  585. body: JSON.stringify(uData)
  586. });
  587. }, 1500);
  588. }
  589. }, {
  590. modName: '',
  591. modType: 'button',
  592. modDescription: '-Settings-',
  593. modId: 'SettingsButton',
  594. modCode: () => {
  595. rzModSettings.classList.toggle('hidden');
  596. }
  597. }
  598. ];
  599.  
  600. // @TODO: Create interface to control enabled mods
  601. const modOptionForm = document.createElement('form');
  602. let enabledMods = [];
  603.  
  604. rzMods.forEach(mod => {
  605.  
  606. // @TODO: Remove this line in favor of completed mod settings box
  607. enabledMods.push(mod.modName);
  608.  
  609. /*
  610. const modOptionLabel = document.createElement('label');
  611. const modOptionCheck = document.createElement('input');
  612. modOptionCheck.type = 'checkbox';
  613. modOptionLabel.append(modOptionCheck);
  614. modOptionForm.append(modOptionLabel);
  615. */
  616.  
  617. if ( ! enabledMods.includes(mod.modName)){
  618. return;
  619. }
  620.  
  621.  
  622.  
  623. let modElement = null;
  624.  
  625. switch (mod.modType){
  626. case 'automatic':
  627. mod.modCode.call();
  628.  
  629. break;
  630. case 'button':
  631. modElement = document.createElement('button');
  632. modElement.innerText = mod.modName;
  633. modElement.onclick = mod.modCode;
  634. modElement.title = mod.modDescription;
  635. modElement.id = mod.modId;
  636.  
  637. break;
  638. case 'code':
  639. modElement = document.createElement('span');
  640. modElement.innerHTML = mod.modCode.call();
  641.  
  642. break;
  643. case 'text':
  644. modElement = document.createElement('span');
  645. modElement.classList.add('text');
  646. modElement.innerText = mod.modCode.call();
  647.  
  648. break;
  649. }
  650.  
  651. if (modElement){
  652. rzModWrap.append(modElement);
  653. }
  654. });
  655.  
  656. document.body.prepend(rzModStyle);
  657. document.body.prepend(rzModWrap);
  658. document.body.prepend(rzModSettings);
  659. })();