MRaura

Click the video element with a stylish GUI and a start button

  1. // ==UserScript==
  2. // @name MRaura
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description Click the video element with a stylish GUI and a start button
  6. // @author MRaura
  7. // @match https://jerkmate.com/jerkmate-ranked
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. let clicksPerformed = 0;
  15. let maxClicks = 100000;
  16. let clickInterval = 100;
  17. let clicking = false;
  18. let intervalID;
  19.  
  20. // Create GUI container
  21. const gui = document.createElement('div');
  22. gui.id = 'radiantGui';
  23. gui.innerHTML = `
  24. <h3>MRaura</h3>
  25. <p>Total Clicks: <span id="totalClicks">0</span></p>
  26. <p>Max Clicks: <input type="number" id="maxClicks" value="${maxClicks}" min="1"></p>
  27. <p>Click Interval (ms): <input type="number" id="clickInterval" value="${clickInterval}" min="1"></p>
  28. <button id="startStopBtn">Start</button>
  29. <button id="resetBtn">Reset</button>
  30. `;
  31. document.body.appendChild(gui);
  32.  
  33. // Add Styles
  34. const style = document.createElement('style');
  35. style.innerHTML = `
  36. @keyframes gradientAnimation {
  37. 0% { background-position: 0% 50%; }
  38. 50% { background-position: 100% 50%; }
  39. 100% { background-position: 0% 50%; }
  40. }
  41.  
  42. #radiantGui {
  43. position: fixed;
  44. top: 10px;
  45. right: 10px;
  46. background: linear-gradient(45deg, #1e1e1e, #333, #111);
  47. background-size: 200% 200%;
  48. animation: gradientAnimation 5s ease infinite;
  49. color: white;
  50. padding: 20px;
  51. border-radius: 10px;
  52. z-index: 9999;
  53. width: 300px;
  54. box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
  55. cursor: move;
  56. font-family: Arial, sans-serif;
  57. text-align: center;
  58. }
  59.  
  60. #radiantGui input {
  61. width: 80%;
  62. padding: 5px;
  63. background: #222;
  64. border: 1px solid #444;
  65. color: white;
  66. margin: 5px 0;
  67. border-radius: 5px;
  68. }
  69.  
  70. #radiantGui button {
  71. width: 45%;
  72. padding: 10px;
  73. margin: 5px;
  74. border: none;
  75. cursor: pointer;
  76. border-radius: 5px;
  77. transition: 0.3s;
  78. }
  79.  
  80. #startStopBtn {
  81. background: #28a745;
  82. color: white;
  83. }
  84.  
  85. #startStopBtn:hover {
  86. background: #218838;
  87. }
  88.  
  89. #resetBtn {
  90. background: #dc3545;
  91. color: white;
  92. }
  93.  
  94. #resetBtn:hover {
  95. background: #c82333;
  96. }
  97. `;
  98. document.head.appendChild(style);
  99.  
  100. // Draggable GUI
  101. let isDragging = false;
  102. let offsetX, offsetY;
  103.  
  104. gui.addEventListener('mousedown', (e) => {
  105. isDragging = true;
  106. offsetX = e.clientX - gui.getBoundingClientRect().left;
  107. offsetY = e.clientY - gui.getBoundingClientRect().top;
  108. gui.style.cursor = 'grabbing';
  109. });
  110.  
  111. document.addEventListener('mousemove', (e) => {
  112. if (isDragging) {
  113. gui.style.top = `${e.clientY - offsetY}px`;
  114. gui.style.left = `${e.clientX - offsetX}px`;
  115. }
  116. });
  117.  
  118. document.addEventListener('mouseup', () => {
  119. isDragging = false;
  120. gui.style.cursor = 'move';
  121. });
  122.  
  123. // Button Listeners
  124. document.getElementById('startStopBtn').addEventListener('click', () => {
  125. clicking ? stopClicking() : startClicking();
  126. });
  127.  
  128. document.getElementById('resetBtn').addEventListener('click', () => {
  129. clicksPerformed = 0;
  130. updateClicksDisplay();
  131. });
  132.  
  133. document.getElementById('maxClicks').addEventListener('input', (event) => {
  134. maxClicks = parseInt(event.target.value, 10);
  135. });
  136.  
  137. document.getElementById('clickInterval').addEventListener('input', (event) => {
  138. clickInterval = parseInt(event.target.value, 10);
  139. if (clicking) {
  140. stopClicking();
  141. startClicking();
  142. }
  143. });
  144.  
  145. // Clicking Logic
  146. function clickVideoElement() {
  147. const videoElement = document.querySelector('video[poster="/ui-contents/idleposter.jpg"]');
  148. if (videoElement) {
  149. videoElement.click();
  150. clicksPerformed++;
  151. if (clicksPerformed % 8 === 0) clickBuyButton();
  152. updateClicksDisplay();
  153. }
  154. }
  155.  
  156. function clickBuyButton() {
  157. const buyButton = document.querySelector('button.buttonBuy');
  158. if (buyButton) buyButton.click();
  159. }
  160.  
  161. function updateClicksDisplay() {
  162. document.getElementById('totalClicks').textContent = clicksPerformed;
  163. }
  164.  
  165. function startClicking() {
  166. clicking = true;
  167. document.getElementById('startStopBtn').textContent = 'Stop';
  168. intervalID = setInterval(clickVideoElement, clickInterval);
  169. }
  170.  
  171. function stopClicking() {
  172. clicking = false;
  173. document.getElementById('startStopBtn').textContent = 'Start';
  174. clearInterval(intervalID);
  175. }
  176. })();