Greasy Fork is available in English.

Custom Mods for Kirka

3/3/2025, 8:54:35 PM

  1. // ==UserScript==
  2. // @name Custom Mods for Kirka
  3. // @namespace Violentmonkey Scripts
  4. // @match https://kirka.io/*
  5. // @grant none
  6. // @version 1.0
  7. // @author Dami
  8. // @description 3/3/2025, 8:54:35 PM
  9. // ==/UserScript==
  10. // ==UserScript==
  11. // @name Mods for Kirka
  12. // @namespace http://tampermonkey.net/
  13. // @version 1.0
  14. // @description Click X/x to toggle fire rate, B/b to toggle AutoDodge, K/k to toggle AutoWalk, G/g to toggle AutoJump, N/n to toggle KillAura/AutoShoot, L/l to toggle AutoCrouch, M/m to toggle AutoSwitch
  15. // @author Cqmbo__
  16. // @match https://kirka.io/
  17. // @match https://kirka.io/games
  18. // @icon https://yt3.ggpht.com/ofXbHpiwGc4bYnwwljjZJo53E7JRODr-SG32NPV1W6QiUnGUtVAYDwTP2NMz2pUPGnt99Juh5w=s88-c-k-c0x00ffffff-no-rj
  19. // @license MIT
  20. // @grant none
  21. // ==/UserScript==
  22.  
  23. let fireRateEnabled = false;
  24. let autoDodgeEnabled = false;
  25. let autoDodgeInterval;
  26. let isAutoWalking = false;
  27. let isAutoDashing = false;
  28. let isKillauaActive = false;
  29. let autoJumpEnabled = false;
  30. let autoJumpInterval;
  31. let isAutoCrouching = false;
  32. let autoCrouchInterval;
  33. let autoSwitchEnabled = false;
  34. let autoSwitchInterval;
  35. let fireRateValue = 2123;
  36. let autoJumpIntervalValue = 100;
  37. let autoDashInterval;
  38. let autoSwitchIntervalValue = 50;
  39.  
  40. // Store original Date.now and performance.now functions
  41. const originalDateNow = Date.now;
  42. const originalPerformanceNow = performance.now;
  43.  
  44. // Automatically enable the speed hack
  45. performance.now = () => originalPerformanceNow.call(performance) * 1.25;
  46. console.log("Speed increase enabled");
  47.  
  48. function toggleFireRate() {
  49. fireRateEnabled = !fireRateEnabled;
  50. if (fireRateEnabled) {
  51. // Increase the Date.now function rate
  52. Date.now = () => originalDateNow() * (fireRateValue);
  53. console.log("Gun fire rate increase enabled");
  54. } else {
  55. // Restore original Date.now function
  56. Date.now = originalDateNow;
  57. console.log("Gun fire rate increase disabled");
  58. }
  59. updateInfoDisplay();
  60. }
  61.  
  62. function toggleAutoDodge() {
  63. autoDodgeEnabled = !autoDodgeEnabled;
  64. if (autoDodgeEnabled) {
  65. autoDodgeInterval = setInterval(() => {
  66. simulateKeydown('a');
  67. setTimeout(() => {
  68. simulateKeyup('a');
  69. simulateKeydown('d');
  70. setTimeout(() => {
  71. simulateKeyup('d');
  72. }, 10);
  73. }, 10);
  74. }, 50);
  75. console.log("AutoDodge enabled");
  76. } else {
  77. clearInterval(autoDodgeInterval);
  78. console.log("AutoDodge disabled");
  79. }
  80. updateInfoDisplay();
  81. }
  82.  
  83. function toggleAutoJump() {
  84. autoJumpEnabled = !autoJumpEnabled;
  85. if (autoJumpEnabled) {
  86. autoJumpInterval = setInterval(() => {
  87. simulateKeydown(' ');
  88. setTimeout(() => {
  89. simulateKeyup(' ');
  90. }, 10);
  91. }, autoJumpIntervalValue);
  92. console.log("AutoJump enabled");
  93. } else {
  94. clearInterval(autoJumpInterval);
  95. console.log("AutoJump disabled");
  96. }
  97. updateInfoDisplay();
  98. }
  99.  
  100. function toggleAutoSwitch() {
  101. autoSwitchEnabled = !autoSwitchEnabled;
  102. if (autoSwitchEnabled) {
  103. autoSwitchInterval = setInterval(() => {
  104. simulateKeydown('1');
  105. setTimeout(() => {
  106. simulateKeyup('1');
  107. setTimeout(() => {
  108. simulateKeydown('2');
  109. setTimeout(() => {
  110. simulateKeyup('2');
  111. setTimeout(() => {
  112. simulateKeydown('3');
  113. setTimeout(() => {
  114. simulateKeyup('3');
  115. }, 10);
  116. }, autoSwitchIntervalValue);
  117. }, 10);
  118. }, autoSwitchIntervalValue);
  119. }, 10);
  120. }, 170);
  121. console.log("AutoSwitch enabled");
  122. } else {
  123. clearInterval(autoSwitchInterval);
  124. console.log("AutoSwitch disabled");
  125. }
  126. updateInfoDisplay();
  127. }
  128.  
  129. function simulateKeydown(key) {
  130. const keyMap = {
  131. 'a': { key: 'a', code: 'KeyA', keyCode: 65, which: 65 },
  132. 'd': { key: 'd', code: 'KeyD', keyCode: 68, which: 68 },
  133. 'w': { key: 'w', code: 'KeyW', keyCode: 87, which: 87 },
  134. ' ': { key: ' ', code: 'Space', keyCode: 32, which: 32 },
  135. 'e': { key: 'e', code: 'KeyE', keyCode: 69, which: 69 },
  136. 'Shift': { key: 'Shift', code: 'ShiftLeft', keyCode: 16, which: 16 },
  137. '1': { key: '1', code: 'Digit1', keyCode: 49, which: 49 },
  138. '2': { key: '2', code: 'Digit2', keyCode: 50, which: 50 },
  139. '3': { key: '3', code: 'Digit3', keyCode: 51, which: 51 }
  140. };
  141.  
  142. const keydownEvent = new KeyboardEvent('keydown', {
  143. key: keyMap[key].key,
  144. code: keyMap[key].code,
  145. keyCode: keyMap[key].keyCode,
  146. which: keyMap[key].which,
  147. shiftKey: false,
  148. ctrlKey: false,
  149. altKey: false,
  150. metaKey: false,
  151. repeat: true,
  152. bubbles: true,
  153. cancelable: true
  154. });
  155. document.dispatchEvent(keydownEvent);
  156. }
  157.  
  158. function simulateKeyup(key) {
  159. const keyMap = {
  160. 'a': { key: 'a', code: 'KeyA', keyCode: 65, which: 65 },
  161. 'd': { key: 'd', code: 'KeyD', keyCode: 68, which: 68 },
  162. 'w': { key: 'w', code: 'KeyW', keyCode: 87, which: 87 },
  163. ' ': { key: ' ', code: 'Space', keyCode: 32, which: 32 },
  164. 'e': { key: 'e', code: 'KeyE', keyCode: 69, which: 69 },
  165. 'Shift': { key: 'Shift', code: 'ShiftLeft', keyCode: 16, which: 16 },
  166. '1': { key: '1', code: 'Digit1', keyCode: 49, which: 49 },
  167. '2': { key: '2', code: 'Digit2', keyCode: 50, which: 50 },
  168. '3': { key: '3', code: 'Digit3', keyCode: 51, which: 51 }
  169. };
  170.  
  171. const keyupEvent = new KeyboardEvent('keyup', {
  172. key: keyMap[key].key,
  173. code: keyMap[key].code,
  174. keyCode: keyMap[key].keyCode,
  175. which: keyMap[key].which,
  176. shiftKey: false,
  177. ctrlKey: false,
  178. altKey: false,
  179. metaKey: false,
  180. repeat: false,
  181. bubbles: true,
  182. cancelable: true
  183. });
  184. document.dispatchEvent(keyupEvent);
  185. }
  186.  
  187. function updateInfoDisplay() {
  188. const infoDisplay = document.getElementById("infoDisplay");
  189. infoDisplay.innerHTML = `
  190. Blatant: Fire Rate: ${fireRateEnabled ? 'Enabled (x)' : 'Disabled (x)'} | KillAura/AutoShoot: ${isKillauaActive ? 'Enabled (n)' : 'Disabled (n)'}
  191. <small>${isKillauaActive ? '(Right-click when KillAura is enabled to shoot)' : ''}</small><br>
  192. Movement: AutoDodge: ${autoDodgeEnabled ? 'Enabled (b)' : 'Disabled (b)'} | AutoWalk: ${isAutoWalking ? 'Enabled (k)' : 'Disabled (k)'} | AutoJump: ${autoJumpEnabled ? 'Enabled (g)' : 'Disabled (g)'} | AutoDash: ${isAutoDashing ? 'Enabled (h)' : 'Disabled (h)'} | AutoCrouch: ${isAutoCrouching ? 'Enabled (l)' : 'Disabled (l)'}<br>
  193. Fun: AutoSwitch: ${autoSwitchEnabled ? 'Enabled (m)' : 'Disabled (m)'}
  194. `;
  195. }
  196.  
  197. // Create toggle button for info display
  198. const toggleButton = document.createElement("button");
  199. toggleButton.innerText = "Toggle InfoDisplay (y)";
  200. toggleButton.style.position = "fixed";
  201. toggleButton.style.top = "10px";
  202. toggleButton.style.right = "10px";
  203. toggleButton.style.zIndex = "10000";
  204. document.body.appendChild(toggleButton);
  205.  
  206. const toggleButtonText = document.createElement("small");
  207. toggleButtonText.innerText = "Use button or click 'y' to toggle menu/InfoDisplay";
  208. toggleButtonText.style.position = "fixed";
  209. toggleButtonText.style.top = "35px";
  210. toggleButtonText.style.right = "10px";
  211. toggleButtonText.style.zIndex = "10000";
  212. toggleButtonText.style.color = "lime";
  213. document.body.appendChild(toggleButtonText);
  214.  
  215. toggleButton.addEventListener("click", function() {
  216. const infoDisplay = document.getElementById("infoDisplay");
  217. infoDisplay.style.display = infoDisplay.style.display === "none" ? "block" : "none";
  218. });
  219.  
  220. document.addEventListener("keydown", function(event) {
  221. if (event.key.toLowerCase() === "y") {
  222. const infoDisplay = document.getElementById("infoDisplay");
  223. infoDisplay.style.display = infoDisplay.style.display === "none" ? "block" : "none";
  224. }
  225. });
  226.  
  227.  
  228. // Toggle functions when pressing keys
  229. document.addEventListener('keydown', function(event) {
  230. if (event.key.toLowerCase() === 'x') {
  231. toggleFireRate();
  232. } else if (event.key.toLowerCase() === 'b') {
  233. toggleAutoDodge();
  234. } else if (event.key.toLowerCase() === 'k') {
  235. toggleAutoWalk();
  236. } else if (event.key.toLowerCase() === 'g') {
  237. toggleAutoJump();
  238. } else if (event.key.toLowerCase() === 'h') {
  239. toggleAutoDash();
  240. } else if (event.key.toLowerCase() === 'n') {
  241. toggleKillaura();
  242. } else if (event.key.toLowerCase() === 'l') {
  243. toggleAutoCrouch();
  244. } else if (event.key.toLowerCase() === 'm') {
  245. toggleAutoSwitch();
  246. }
  247. updateInfoDisplay();
  248. });
  249.  
  250. // Create info display
  251. const infoDisplay = document.createElement("div");
  252. infoDisplay.id = "infoDisplay";
  253. infoDisplay.style.position = "fixed";
  254. infoDisplay.style.top = "10px";
  255. infoDisplay.style.left = "10px";
  256. infoDisplay.style.color = "#ffffff";
  257. infoDisplay.style.zIndex = "9999";
  258. infoDisplay.style.backgroundColor = "rgba(0, 0, 0, 0.5)";
  259. infoDisplay.style.padding = "5px";
  260. infoDisplay.style.borderRadius = "5px";
  261. document.body.appendChild(infoDisplay);
  262.  
  263. updateInfoDisplay();
  264.  
  265. // Create sliders container
  266. const slidersContainer = document.createElement('div');
  267. slidersContainer.id = 'kirka-sliders';
  268. slidersContainer.style.position = 'fixed';
  269. slidersContainer.style.top = '350px'; // Adjust the position as needed
  270. slidersContainer.style.right = '10px';
  271. slidersContainer.style.zIndex = '10000';
  272. slidersContainer.style.color = 'white';
  273. slidersContainer.innerHTML =
  274. `
  275. <h2>Kirka Settings</h2>
  276. <div>
  277. <label for="fireRateSlider">Fire Rate (2-3000 ms):</label>
  278. <input type="range" id="fireRateSlider" min="2" max="3000" value="${fireRateValue}">
  279. <output id="fireRateValue">${fireRateValue}</output>
  280. </div>
  281. <div>
  282. <label for="autoJumpSlider">AutoJump Interval (10-1500 ms):</label>
  283. <input type="range" id="autoJumpSlider" min="10" max="1500" value="${autoJumpIntervalValue}">
  284. <output id="autoJumpValue">${autoJumpIntervalValue}</output>
  285. </div>
  286. <div>
  287. <label for="autoSwitchSlider">AutoSwitch Interval (50-1000 ms):</label>
  288. <input type="range" id="autoSwitchSlider" min="50" max="1000" value="${autoSwitchIntervalValue}">
  289. <output id="autoSwitchValue">${autoSwitchIntervalValue}</output>
  290. </div>
  291. `
  292. ;
  293. document.body.appendChild(slidersContainer);
  294.  
  295. // Function to update the slider output value
  296. function updateSliderOutput(sliderId, outputId) {
  297. const slider = document.getElementById(sliderId);
  298. const output = document.getElementById(outputId);
  299. slider.addEventListener('input', () => {
  300. output.value = slider.value;
  301. });
  302. }
  303.  
  304. // Update the slider output values on input
  305. updateSliderOutput('fireRateSlider', 'fireRateValue');
  306. updateSliderOutput('autoJumpSlider', 'autoJumpValue');
  307. updateSliderOutput('autoSwitchSlider', 'autoSwitchValue');
  308.  
  309. // Add event listeners to update the values
  310. document.getElementById('fireRateSlider').addEventListener('input', function() {
  311. fireRateValue = parseInt(this.value);
  312. });
  313. document.getElementById('autoJumpSlider').addEventListener('input', function() {
  314. autoJumpIntervalValue = parseInt(this.value);
  315. });
  316. document.getElementById('autoSwitchSlider').addEventListener('input', function() {
  317. autoSwitchIntervalValue = parseInt(this.value);
  318. });
  319.  
  320. function toggleAutoWalk() {
  321. isAutoWalking = !isAutoWalking;
  322. if (isAutoWalking) {
  323. simulateKeydown('w');
  324. console.log("AutoWalk enabled");
  325. } else {
  326. simulateKeyup('w');
  327. console.log("AutoWalk disabled");
  328. }
  329. updateInfoDisplay();
  330. }
  331.  
  332. function toggleKillaura() {
  333. isKillauaActive = !isKillauaActive;
  334. if (isKillauaActive) {
  335. document.addEventListener('mousedown', onMouseDownHandler);
  336. document.addEventListener('mouseup', onMouseUpHandler);
  337. console.log("KillAura/AutoShoot enabled");
  338. } else {
  339. document.removeEventListener('mousedown', onMouseDownHandler);
  340. document.removeEventListener('mouseup', onMouseUpHandler);
  341. console.log("KillAura/AutoShoot disabled");
  342. }
  343. updateInfoDisplay();
  344. }
  345.  
  346. function onMouseDownHandler(event) {
  347. if (event.target.tagName === 'CANVAS') {
  348. simulateMouseDown();
  349. }
  350. }
  351.  
  352. function onMouseUpHandler(event) {
  353. if (event.target.tagName === 'CANVAS') {
  354. simulateMouseUp();
  355. }
  356. }
  357.  
  358. function simulateMouseDown() {
  359. const canvas = document.querySelector('canvas');
  360. const mouseDownEvent = new MouseEvent('mousedown', {
  361. bubbles: true,
  362. cancelable: true,
  363. view: window,
  364. button: 0,
  365. clientX: canvas.width / 2,
  366. clientY: canvas.height / 2
  367. });
  368. canvas.dispatchEvent(mouseDownEvent);
  369. }
  370.  
  371. function simulateMouseUp() {
  372. const canvas = document.querySelector('canvas');
  373. const mouseUpEvent = new MouseEvent('mouseup', {
  374. bubbles: true,
  375. cancelable: true,
  376. view: window,
  377. button: 0,
  378. clientX: canvas.width / 2,
  379. clientY: canvas.height / 2
  380. });
  381. canvas.dispatchEvent(mouseUpEvent);
  382. }
  383.  
  384. function toggleAutoDash() {
  385. isAutoDashing = !isAutoDashing;
  386. if (isAutoDashing) {
  387. autoDashInterval = setInterval(() => {
  388. simulateKeydown('e');
  389. setTimeout(() => {
  390. simulateKeyup('e');
  391. }, 10);
  392. }, 1500);
  393. console.log("AutoDash enabled");
  394. } else {
  395. clearInterval(autoDashInterval);
  396. console.log("AutoDash disabled");
  397. }
  398. updateInfoDisplay();
  399. }
  400.  
  401. function toggleAutoCrouch() {
  402. isAutoCrouching = !isAutoCrouching;
  403. if (isAutoCrouching) {
  404. autoCrouchInterval = setInterval(() => {
  405. simulateKeydown('Shift');
  406. setTimeout(() => {
  407. simulateKeyup('Shift');
  408. }, 10);
  409. }, 500);
  410. console.log("AutoCrouch enabled");
  411. } else {
  412. clearInterval(autoCrouchInterval);
  413. console.log("AutoCrouch disabled");
  414. }
  415. updateInfoDisplay();
  416. }
  417.  
  418. // Prevent the 'left mouse button' from stopping KillAura when clicked
  419. document.addEventListener('mousedown', function(event) {
  420. if (event.button === 0 && isKillauaActive) {
  421. event.preventDefault(); // Prevent default behavior of the left mouse button
  422. }
  423. });