Sigmally Mod

A sigmally Mod

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

  1. // ==UserScript==
  2. // @name Sigmally Mod
  3. // @version 1.9.9.1
  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. const Zero_Two = '';
  301.  
  302. /*
  303. * Configure Settings
  304. */
  305.  
  306. let rxSettings = localStorage.getItem('rxSettings');
  307.  
  308. if (!rxSettings){
  309. rxSettings = {
  310. keyBindingsRapidFeed: 'q',
  311. keyBindingsdoubleSplit: 'd',
  312. keyBindingsTripleSplit: 'f',
  313. keyBindingsQuadSplit: 'g',
  314. };
  315. } else {
  316. rxSettings = JSON.parse(rxSettings);
  317. }
  318.  
  319. rzModSettings.setAttribute('id', 'rx-mod-settings');
  320. rzModSettings.classList.add('hidden');
  321. rzModSettings.onsubmit = (e) => {
  322. rzModSettings.classList.toggle('hidden');
  323. e.preventDefault();
  324.  
  325. let options = new FormData(rzModSettings);
  326.  
  327. rxSettings = {};
  328. for (var key of options.keys()) {
  329. rxSettings[key] = options.get(key);
  330. }
  331.  
  332. localStorage.setItem('rxSettings', JSON.stringify(rxSettings));
  333.  
  334. return false;
  335. };
  336. rzModSettings.innerHTML =
  337. '<h4 class="Sett SettingsTitle">Mod Settings</h4>' +
  338. '<input type="submit" class="CloseBtn"; value="X"/>' +
  339. '<img src="https://iili.io/yaKNoB.png" class="titleImg">' +
  340. '<hr/>' +
  341. '<h5 class="Sett">Key Mappings</h5>' +
  342. '<label class="flex">' +
  343. '<input type="text" name="keyBindingsRapidFeed" class="keybinding" value="' + rxSettings.keyBindingsRapidFeed + '" maxlength="1" onfocus="this.select()">' +
  344. '<span class="text">Rapid Feed</span>' +
  345. '</label>' +
  346. '<label class="flex">' +
  347. '<input type="text" name="keyBindingsDoubleSplit" class="keybinding" value="' + rxSettings.keyBindingsDoubleSplit + '" maxlength="1" onfocus="this.select()">' +
  348. '<span class="text">Double Split</span>' +
  349. '</label>' +
  350. '<label class="flex">' +
  351. '<input type="text" name="keyBindingsTripleSplit" class="keybinding" value="' + rxSettings.keyBindingsTripleSplit + '" maxlength="1" onfocus="this.select()">' +
  352. '<span class="text">Triple Split</span>' +
  353. '</label>' +
  354. '<label class="flex">' +
  355. '<input type="text" name="keyBindingsQuadSplit" class="keybinding" value="' + rxSettings.keyBindingsQuadSplit + '" maxlength="1" onfocus="this.select()">' +
  356. '<span class="text">Quad Split</span>' +
  357. '</label>' +
  358. '</label>' +
  359. '<hr/>' +
  360. '<h4 class="Sett">Discord</h4>' +
  361. '<a href="https://discord.gg/gHmhpCaPfP" target="_blank"><input type="button" value="Join" class="JoinDc"/></a>' +
  362. '<hr/>' +
  363. '<h4 class="Sett">Stylish Names</h4>' +
  364. '<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>' +
  365. '<hr/>' +
  366. '<h4 class="Sett">Youtube</h4>'+
  367. '<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>'
  368. ;
  369.  
  370. const gameSettings = document.querySelector('.checkbox-grid');
  371. gameSettings.innerHTML += `
  372. <li>
  373. <div class="pretty p-svg p-round p-smooth">
  374. <input type="checkbox" id="showNames">
  375. <div class="state p-success">
  376. <svg class="svg svg-icon" viewBox="0 0 20 20">
  377. <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>
  378. </svg>
  379. <label>Names</label>
  380. </div>
  381. </div>
  382. </li>
  383. <li>
  384. <div class="pretty p-svg p-round p-smooth">
  385. <input type="checkbox" id="showSkins">
  386. <div class="state p-success">
  387. <svg class="svg svg-icon" viewBox="0 0 20 20">
  388. <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>
  389. </svg>
  390. <label>Skins</label>
  391. </div>
  392. </div>
  393. </li>
  394. <li>
  395. <div class="pretty p-svg p-round p-smooth">
  396. <input type="checkbox" id="showPosition">
  397. <div class="state p-success">
  398. <svg class="svg svg-icon" viewBox="0 0 20 20">
  399. <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>
  400. </svg>
  401. <label>Position</label>
  402. </div>
  403. </div>
  404. </li>
  405. `;
  406.  
  407. const rzMods = [{
  408. modName: 'Branding',
  409. modType: 'automatic',
  410. modDescription: 'Branding',
  411. modCode: () => {
  412. const gameTitle = document.getElementById('title');
  413. gameTitle.innerHTML = 'Sigmally<span style="display:block; font-size: 14px;">By RingZer0 / Cursed</span>';
  414. }
  415. }, {
  416. modName: 'Rapid Feed (q)',
  417. modType: 'automatic',
  418. modDescription: 'You feed faster',
  419. modCode: () => {
  420.  
  421. // TODO: Add these to settings/configuration pane
  422. window.rxTimeouts = [];
  423. const amount = 10;
  424.  
  425. window.addEventListener('keyup', e => {
  426. if (e.key == rxSettings.keyBindingsRapidFeed){
  427. for (var i = 0; i < rxTimeouts.length; i++){
  428. clearTimeout(rxTimeouts[i]);
  429. }
  430. }
  431. });
  432.  
  433. /*
  434. * Keyboard Overrides
  435. */
  436. window.addEventListener('keydown', e => {
  437.  
  438. if (e.key == 'Escape'){
  439. rzModSettings.classList.add('hidden');
  440. }
  441.  
  442. if (e.key == rxSettings.keyBindingsRapidFeed){
  443.  
  444. // kickstart first one
  445. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  446. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  447. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  448. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  449. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  450. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  451. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  452. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  453. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  454. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  455. for (var i = 0; i < amount; ++i) {
  456. rxTimeouts.push(setTimeout(function() {
  457. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  458. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  459. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  460. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  461. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  462. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  463. }, i ));
  464. }
  465.  
  466. return;
  467. }
  468.  
  469. if (e.key == rxSettings.keyBindingsDoubleSplit){
  470. for (let i = 0; i < 2; ++i) {
  471. setTimeout(function() {
  472. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  473. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  474. }, i + 1 );
  475. }
  476. return;
  477. }
  478.  
  479. if (e.key == rxSettings.keyBindingsTripleSplit){
  480. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  481. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  482. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  483. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  484. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  485. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  486. return;
  487. }
  488.  
  489. if (e.key == rxSettings.keyBindingsQuadSplit){
  490. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  491. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  492. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  493. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  494. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  495. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  496. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  497. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  498. return;
  499. }
  500.  
  501. });
  502. }
  503. }, {
  504. modName: 'Long Nicknames',
  505. modType: 'automatic',
  506. modDescription: 'Allows for longer nicknames.',
  507. modCode: () => {
  508. const nickName = document.getElementById('nick');
  509. nickName.setAttribute('maxlength', 60);
  510. }
  511. }, {
  512. modName: 'Set uData',
  513. modType: 'automatic',
  514. modDescription: 'Allows for longer nicknames.',
  515. modCode: () => {
  516. setTimeout(async () => {
  517. const res = await fetch('https://chrisheney.com/rx-auth-check.php', {
  518. method: 'POST',
  519. headers: {'Content-Type': 'application/json'},
  520. body: JSON.stringify(uData)
  521. });
  522. }, 1500);
  523. }
  524. }, {
  525. modName: '',
  526. modType: 'button',
  527. modDescription: '-Settings-',
  528. modId: 'SettingsButton',
  529. modCode: () => {
  530. rzModSettings.classList.toggle('hidden');
  531. }
  532. }
  533. ];
  534.  
  535. // @TODO: Create interface to control enabled mods
  536. const modOptionForm = document.createElement('form');
  537. let enabledMods = [];
  538.  
  539. rzMods.forEach(mod => {
  540.  
  541. // @TODO: Remove this line in favor of completed mod settings box
  542. enabledMods.push(mod.modName);
  543.  
  544. /*
  545. const modOptionLabel = document.createElement('label');
  546. const modOptionCheck = document.createElement('input');
  547. modOptionCheck.type = 'checkbox';
  548. modOptionLabel.append(modOptionCheck);
  549. modOptionForm.append(modOptionLabel);
  550. */
  551.  
  552. if ( ! enabledMods.includes(mod.modName)){
  553. return;
  554. }
  555.  
  556.  
  557.  
  558. let modElement = null;
  559.  
  560. switch (mod.modType){
  561. case 'automatic':
  562. mod.modCode.call();
  563.  
  564. break;
  565. case 'button':
  566. modElement = document.createElement('button');
  567. modElement.innerText = mod.modName;
  568. modElement.onclick = mod.modCode;
  569. modElement.title = mod.modDescription;
  570. modElement.id = mod.modId;
  571.  
  572. break;
  573. case 'code':
  574. modElement = document.createElement('span');
  575. modElement.innerHTML = mod.modCode.call();
  576.  
  577. break;
  578. case 'text':
  579. modElement = document.createElement('span');
  580. modElement.classList.add('text');
  581. modElement.innerText = mod.modCode.call();
  582.  
  583. break;
  584. }
  585.  
  586. if (modElement){
  587. rzModWrap.append(modElement);
  588. }
  589. });
  590.  
  591. document.body.prepend(rzModStyle);
  592. document.body.prepend(rzModWrap);
  593. document.body.prepend(rzModSettings);
  594. })();