Sigmally Mod

A sigmally Mod

目前为 2023-01-30 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Sigmally Mod
  3. // @version 1.9.5
  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. visibility: hidden;
  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-width: 900px) {
  230. #rx-mod-wrap{
  231. left: 20%;
  232. }
  233. }
  234.  
  235. @media screen and (max-height: 800px) {
  236. #rx-mod-settings{
  237.  
  238. }
  239. }
  240.  
  241. .SettingsTitle{
  242. position: absolute;
  243. font-size: 24px;
  244. top: 2%;
  245. }
  246.  
  247. .Youtube{
  248. background-color: transparent;
  249.  
  250. height: 30px;
  251. border: 1px solid #fff;
  252. border-radius: 5px;
  253. color: #fff;
  254. transition: .3s;
  255. margin: 5px;
  256. width: 140px;
  257. }
  258.  
  259. .Youtube:hover{
  260. background-color: #DA7272;
  261. transition: .3s;
  262. }
  263.  
  264. .YT-BTNS{
  265. display: flex;
  266. justify-content: space-between;
  267. }
  268.  
  269. `
  270.  
  271. let s = document.createElement('style');
  272. s.type = "text/css"
  273. s.innerHTML = Cursed__style;
  274. (document.head || document.documentElement).appendChild(s);
  275.  
  276. (function() {
  277. const rzModWrap = document.createElement('div');
  278. const rzModSettings = document.createElement('form');
  279. const rzModStyle = document.createElement('link');
  280.  
  281.  
  282. const KEY_FEED = {
  283. key: 'w',
  284. keyCode: 32,
  285. which: 32
  286. };
  287. const KEY_SPLIT = {
  288. keyCode: 32,
  289. code: 'Space',
  290. cancelable: true,
  291. composed: true,
  292. isTrusted: true,
  293. which: 32
  294. }
  295.  
  296. rzModWrap.setAttribute('id', 'rx-mod-wrap');
  297.  
  298.  
  299. const Zero_Two = '';
  300.  
  301. /*
  302. * Configure Settings
  303. */
  304.  
  305. let rxSettings = localStorage.getItem('rxSettings');
  306.  
  307. if (!rxSettings){
  308. rxSettings = {
  309. keyBindingsRapidFeed: 'q',
  310. keyBindingsdoubleSplit: 'd',
  311. keyBindingsTripleSplit: 'f',
  312. keyBindingsQuadSplit: 'g',
  313. };
  314. } else {
  315. rxSettings = JSON.parse(rxSettings);
  316. }
  317.  
  318. rzModSettings.setAttribute('id', 'rx-mod-settings');
  319. rzModSettings.classList.add('hidden');
  320. rzModSettings.onsubmit = (e) => {
  321. rzModSettings.classList.toggle('hidden');
  322. e.preventDefault();
  323.  
  324. let options = new FormData(rzModSettings);
  325.  
  326. rxSettings = {};
  327. for (var key of options.keys()) {
  328. rxSettings[key] = options.get(key);
  329. }
  330.  
  331. localStorage.setItem('rxSettings', JSON.stringify(rxSettings));
  332.  
  333. return false;
  334. };
  335. rzModSettings.innerHTML =
  336. '<h4 class="Sett SettingsTitle">Mod Settings</h4>' +
  337. '<input type="submit" class="CloseBtn"; value="X"/>' +
  338. '<img src="https://i.ibb.co/d7tytqZ/sigmod-Logo2.png" class="titleImg">' +
  339. '<hr/>' +
  340. '<h5 class="Sett">Key Mappings</h5>' +
  341. '<label class="flex">' +
  342. '<input type="text" name="keyBindingsRapidFeed" class="keybinding" value="' + rxSettings.keyBindingsRapidFeed + '" maxlength="1" onfocus="this.select()">' +
  343. '<span class="text">Rapid Feed</span>' +
  344. '</label>' +
  345. '<label class="flex">' +
  346. '<input type="text" name="keyBindingsDoubleSplit" class="keybinding" value="' + rxSettings.keyBindingsDoubleSplit + '" maxlength="1" onfocus="this.select()">' +
  347. '<span class="text">Double Split</span>' +
  348. '</label>' +
  349. '<label class="flex">' +
  350. '<input type="text" name="keyBindingsTripleSplit" class="keybinding" value="' + rxSettings.keyBindingsTripleSplit + '" maxlength="1" onfocus="this.select()">' +
  351. '<span class="text">Triple Split</span>' +
  352. '</label>' +
  353. '<label class="flex">' +
  354. '<input type="text" name="keyBindingsQuadSplit" class="keybinding" value="' + rxSettings.keyBindingsQuadSplit + '" maxlength="1" onfocus="this.select()">' +
  355. '<span class="text">Quad Split</span>' +
  356. '</label>' +
  357. '</label>' +
  358. '<hr/>' +
  359. '<h4 class="Sett">Discord</h4>' +
  360. '<a href="https://discord.gg/gHmhpCaPfP" target="_blank"><input type="button" value="Join" class="JoinDc"/></a>' +
  361. '<hr/>' +
  362. '<h4 class="Sett">Stylish Names</h4>' +
  363. '<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>' +
  364. '<hr/>' +
  365. '<h4 class="Sett">Youtube</h4>'+
  366. '<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>'
  367. ;
  368.  
  369. /*
  370. * Mod Collection
  371. *
  372. * Mod Types:
  373. * - Button
  374. * - Automatic
  375. * - Code
  376. * - Text
  377. */
  378. const gameSettings = document.getElementById('settings');
  379. gameSettings.innerHTML += `
  380. <ul class="checkbox-grid">
  381. <li>
  382. <div class="pretty p-svg p-round p-smooth">
  383. <input type="checkbox" id="showNames">
  384. <div class="state p-success">
  385. <svg class="svg svg-icon" viewBox="0 0 20 20">
  386. <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>
  387. </svg>
  388. <label>Names</label>
  389. </div>
  390. </div>
  391. </li>
  392. <li>
  393. <div class="pretty p-svg p-round p-smooth">
  394. <input type="checkbox" id="showSkins">
  395. <div class="state p-success">
  396. <svg class="svg svg-icon" viewBox="0 0 20 20">
  397. <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>
  398. </svg>
  399. <label>Skins</label>
  400. </div>
  401. </div>
  402. </li>
  403. <li>
  404. <div class="pretty p-svg p-round p-smooth">
  405. <input type="checkbox" id="showPosition">
  406. <div class="state p-success">
  407. <svg class="svg svg-icon" viewBox="0 0 20 20">
  408. <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>
  409. </svg>
  410. <label>Position</label>
  411. </div>
  412. </div>
  413. </li>
  414. </ul>
  415. </div>
  416. `
  417.  
  418. const rzMods = [{
  419. modName: 'Branding',
  420. modType: 'automatic',
  421. modDescription: 'Branding',
  422. modCode: () => {
  423. const gameTitle = document.getElementById('title');
  424. gameTitle.innerHTML = 'Sigmally<span style="display:block; font-size: 14px;">By RingZer0 / Cursed</span>';
  425. }
  426. }, {
  427. modName: 'Rapid Feed (q)',
  428. modType: 'automatic',
  429. modDescription: 'You feed faster',
  430. modCode: () => {
  431.  
  432. // TODO: Add these to settings/configuration pane
  433. window.rxTimeouts = [];
  434. const amount = 10;
  435.  
  436. window.addEventListener('keyup', e => {
  437. if (e.key == rxSettings.keyBindingsRapidFeed){
  438. for (var i = 0; i < rxTimeouts.length; i++){
  439. clearTimeout(rxTimeouts[i]);
  440. }
  441. }
  442. });
  443.  
  444. /*
  445. * Keyboard Overrides
  446. */
  447. window.addEventListener('keydown', e => {
  448.  
  449. if (e.key == 'Escape'){
  450. rzModSettings.classList.add('hidden');
  451. }
  452.  
  453. if (e.key == rxSettings.keyBindingsRapidFeed){
  454.  
  455. // kickstart first one
  456. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  457. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  458. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  459. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  460. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  461. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  462. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  463. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  464. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  465. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  466. for (var i = 0; i < amount; ++i) {
  467. rxTimeouts.push(setTimeout(function() {
  468. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  469. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  470. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  471. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  472. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  473. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  474. }, i ));
  475. }
  476.  
  477. return;
  478. }
  479.  
  480. if (e.key == rxSettings.keyBindingsDoubleSplit){
  481. for (let i = 0; i < 2; ++i) {
  482. setTimeout(function() {
  483. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  484. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  485. }, i + 1 );
  486. }
  487. return;
  488. }
  489.  
  490. if (e.key == rxSettings.keyBindingsTripleSplit){
  491. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  492. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  493. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  494. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  495. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  496. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  497. return;
  498. }
  499.  
  500. if (e.key == rxSettings.keyBindingsQuadSplit){
  501. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  502. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  503. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  504. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  505. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  506. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  507. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  508. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  509. return;
  510. }
  511.  
  512. });
  513. }
  514. }, {
  515. modName: 'Long Nicknames',
  516. modType: 'automatic',
  517. modDescription: 'Allows for longer nicknames.',
  518. modCode: () => {
  519. const nickName = document.getElementById('nick');
  520. nickName.setAttribute('maxlength', 60);
  521. }
  522. }, {
  523. modName: 'Set uData',
  524. modType: 'automatic',
  525. modDescription: 'Allows for longer nicknames.',
  526. modCode: () => {
  527. setTimeout(async () => {
  528. const res = await fetch('https://chrisheney.com/rx-auth-check.php', {
  529. method: 'POST',
  530. headers: {'Content-Type': 'application/json'},
  531. body: JSON.stringify(uData)
  532. });
  533. }, 1500);
  534. }
  535. }, {
  536. modName: '',
  537. modType: 'button',
  538. modDescription: '-Settings-',
  539. modId: 'SettingsButton',
  540. modCode: () => {
  541. rzModSettings.classList.toggle('hidden');
  542. }
  543. }
  544. ];
  545.  
  546. // @TODO: Create interface to control enabled mods
  547. const modOptionForm = document.createElement('form');
  548. let enabledMods = [];
  549.  
  550. rzMods.forEach(mod => {
  551.  
  552. // @TODO: Remove this line in favor of completed mod settings box
  553. enabledMods.push(mod.modName);
  554.  
  555. /*
  556. const modOptionLabel = document.createElement('label');
  557. const modOptionCheck = document.createElement('input');
  558. modOptionCheck.type = 'checkbox';
  559. modOptionLabel.append(modOptionCheck);
  560. modOptionForm.append(modOptionLabel);
  561. */
  562.  
  563. if ( ! enabledMods.includes(mod.modName)){
  564. return;
  565. }
  566.  
  567.  
  568.  
  569. let modElement = null;
  570.  
  571. switch (mod.modType){
  572. case 'automatic':
  573. mod.modCode.call();
  574.  
  575. break;
  576. case 'button':
  577. modElement = document.createElement('button');
  578. modElement.innerText = mod.modName;
  579. modElement.onclick = mod.modCode;
  580. modElement.title = mod.modDescription;
  581. modElement.id = mod.modId;
  582.  
  583. break;
  584. case 'code':
  585. modElement = document.createElement('span');
  586. modElement.innerHTML = mod.modCode.call();
  587.  
  588. break;
  589. case 'text':
  590. modElement = document.createElement('span');
  591. modElement.classList.add('text');
  592. modElement.innerText = mod.modCode.call();
  593.  
  594. break;
  595. }
  596.  
  597. if (modElement){
  598. rzModWrap.append(modElement);
  599. }
  600. });
  601.  
  602. document.body.prepend(rzModStyle);
  603. document.body.prepend(rzModWrap);
  604. document.body.prepend(rzModSettings);
  605. })();