Heart Clicker Game Cheats

Cheat GUI for Heart Clicker Game with Functional Cheats and Modern Design

  1. // ==UserScript==
  2. // @name Heart Clicker Game Cheats
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.2
  5. // @description Cheat GUI for Heart Clicker Game with Functional Cheats and Modern Design
  6. // @match https://heart-io.github.io/Heart/
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. (function() {
  11. 'use strict';
  12.  
  13. // Create the cheat GUI container
  14. const cheatMenu = document.createElement('div');
  15. cheatMenu.id = 'cheat-menu';
  16. cheatMenu.style.position = 'fixed';
  17. cheatMenu.style.top = '10px';
  18. cheatMenu.style.right = '10px';
  19. cheatMenu.style.backgroundColor = '#ffffff';
  20. cheatMenu.style.border = '2px solid #ddd';
  21. cheatMenu.style.borderRadius = '10px';
  22. cheatMenu.style.boxShadow = '0 4px 8px rgba(0, 0, 0, 0.1)';
  23. cheatMenu.style.padding = '20px';
  24. cheatMenu.style.zIndex = '10000';
  25. cheatMenu.style.display = 'none';
  26. cheatMenu.style.width = '300px';
  27. cheatMenu.style.fontFamily = 'Arial, sans-serif';
  28. cheatMenu.style.cursor = 'move'; // Set cursor to indicate draggable
  29. document.body.appendChild(cheatMenu);
  30.  
  31. // Make the cheat menu draggable
  32. let isDragging = false;
  33. let offsetX, offsetY;
  34.  
  35. cheatMenu.addEventListener('mousedown', (e) => {
  36. isDragging = true;
  37. offsetX = e.clientX - cheatMenu.getBoundingClientRect().left;
  38. offsetY = e.clientY - cheatMenu.getBoundingClientRect().top;
  39. document.addEventListener('mousemove', onMouseMove);
  40. document.addEventListener('mouseup', onMouseUp);
  41. });
  42.  
  43. function onMouseMove(e) {
  44. if (isDragging) {
  45. cheatMenu.style.left = `${e.clientX - offsetX}px`;
  46. cheatMenu.style.top = `${e.clientY - offsetY}px`;
  47. }
  48. }
  49.  
  50. function onMouseUp() {
  51. isDragging = false;
  52. document.removeEventListener('mousemove', onMouseMove);
  53. document.removeEventListener('mouseup', onMouseUp);
  54. }
  55.  
  56. // Add close button
  57. const closeButton = document.createElement('button');
  58. closeButton.innerText = 'Close';
  59. closeButton.style.backgroundColor = '#e74c3c';
  60. closeButton.style.color = '#fff';
  61. closeButton.style.border = 'none';
  62. closeButton.style.padding = '10px 20px';
  63. closeButton.style.borderRadius = '5px';
  64. closeButton.style.cursor = 'pointer';
  65. closeButton.style.marginBottom = '10px';
  66. closeButton.onclick = () => {
  67. cheatMenu.style.display = 'none';
  68. };
  69. cheatMenu.appendChild(closeButton);
  70.  
  71. // Add Set Hearts
  72. const setHeartsContainer = document.createElement('div');
  73. setHeartsContainer.style.marginBottom = '10px';
  74. setHeartsContainer.innerHTML = `
  75. <label for="set-heart-count">Set Hearts:</label>
  76. <input type="number" id="set-heart-count" min="0" style="width: 100%; padding: 5px;">
  77. <button id="set-heart-btn" style="width: 100%; padding: 10px; background-color: #3498db; color: #fff; border: none; border-radius: 5px; cursor: pointer;">Set Hearts</button>
  78. `;
  79. cheatMenu.appendChild(setHeartsContainer);
  80.  
  81. // Add Change Character
  82. const changeCharacterContainer = document.createElement('div');
  83. changeCharacterContainer.style.marginBottom = '10px';
  84. changeCharacterContainer.innerHTML = `
  85. <label for="character-select">Select Heart Character:</label>
  86. <select id="character-select" style="width: 100%; padding: 5px;">
  87. <option value="❤️">❤️</option>
  88. <option value="💛">💛</option>
  89. <option value="💚">💚</option>
  90. <option value="💙">💙</option>
  91. <option value="💜">💜</option>
  92. <option value="🖤">🖤</option>
  93. <!-- Add more heart characters here -->
  94. </select>
  95. <button id="change-character-btn" style="width: 100%; padding: 10px; background-color: #3498db; color: #fff; border: none; border-radius: 5px; cursor: pointer;">Change Character</button>
  96. `;
  97. cheatMenu.appendChild(changeCharacterContainer);
  98.  
  99. // Add Buy Upgrade
  100. const buyUpgradeContainer = document.createElement('div');
  101. buyUpgradeContainer.style.marginBottom = '10px';
  102. buyUpgradeContainer.innerHTML = `
  103. <label for="upgrade-select">Select Upgrade:</label>
  104. <select id="upgrade-select" style="width: 100%; padding: 5px;">
  105. <option value="auto-clicker">Auto-Clicker</option>
  106. <option value="double-hearts">Double Hearts</option>
  107. <option value="heart-multiplier">Heart Multiplier</option>
  108. <!-- Add more upgrades here -->
  109. </select>
  110. <button id="buy-upgrade-btn" style="width: 100%; padding: 10px; background-color: #3498db; color: #fff; border: none; border-radius: 5px; cursor: pointer;">Buy Upgrade</button>
  111. `;
  112. cheatMenu.appendChild(buyUpgradeContainer);
  113.  
  114. // Add Additional Cheats
  115. const cheats = [
  116. { id: 'cheat1', text: 'Unlock All Upgrades', action: () => unlockAllUpgrades() },
  117. { id: 'cheat2', text: 'Add 10,000 Hearts', action: () => { window.heartCount += 10000; alert('Added 10,000 hearts!'); } },
  118. { id: 'cheat3', text: 'Set Hearts to Max', action: () => { window.heartCount = Number.MAX_SAFE_INTEGER; alert('Hearts set to maximum!'); } },
  119. { id: 'cheat4', text: 'Enable Double Clicks', action: () => { window.doubleClicksEnabled = true; alert('Double clicks enabled!'); } },
  120. { id: 'cheat5', text: 'Disable Click Limit', action: () => { window.clickLimitDisabled = true; alert('Click limit disabled!'); } },
  121. { id: 'cheat6', text: 'Reset Game Progress', action: () => { window.heartCount = 0; alert('Game progress reset!'); } },
  122. { id: 'cheat7', text: 'Add 1 Million Hearts', action: () => { window.heartCount += 1000000; alert('Added 1 million hearts!'); } },
  123. { id: 'cheat8', text: 'Grant All Achievements', action: () => grantAllAchievements() },
  124. { id: 'cheat9', text: 'Set Heart Multiplier to 10x', action: () => { window.heartMultiplier = 10; alert('Heart multiplier set to 10x!'); } },
  125. { id: 'cheat10', text: 'Unlock VIP Heart Character', action: () => unlockVIPHeart() },
  126. { id: 'cheat11', text: 'Instant Auto-Clicker', action: () => { window.autoClickerEnabled = true; alert('Auto-clicker activated!'); } },
  127. { id: 'cheat12', text: 'Double Upgrade Speed', action: () => { window.upgradeSpeed *= 2; alert('Upgrade speed doubled!'); } },
  128. { id: 'cheat13', text: 'Set All Upgrades to Max Level', action: () => setAllUpgradesToMax() },
  129. { id: 'cheat14', text: 'Change Background Color', action: () => document.body.style.backgroundColor = '#f0f0f0' },
  130. { id: 'cheat15', text: 'Enable Infinite Hearts', action: () => { window.infiniteHearts = true; alert('Infinite hearts enabled!'); } },
  131. { id: 'cheat16', text: 'Grant Extra Lives', action: () => { window.lives += 5; alert('Granted extra 5 lives!'); } },
  132. { id: 'cheat17', text: 'Unlock All Characters', action: () => unlockAllCharacters() },
  133. { id: 'cheat18', text: 'Set Game Speed to Fast', action: () => { window.gameSpeed = 2; alert('Game speed set to fast!'); } },
  134. { id: 'cheat19', text: 'Apply Random Upgrade', action: () => applyRandomUpgrade() },
  135. { id: 'cheat20', text: 'Reset to Default Settings', action: () => resetToDefaultSettings() }
  136. ];
  137.  
  138. cheats.forEach((cheat) => {
  139. const cheatButton = document.createElement('button');
  140. cheatButton.id = cheat.id;
  141. cheatButton.innerText = cheat.text;
  142. cheatButton.style.width = '100%';
  143. cheatButton.style.padding = '10px';
  144. cheatButton.style.backgroundColor = '#3498db';
  145. cheatButton.style.color = '#fff';
  146. cheatButton.style.border = 'none';
  147. cheatButton.style.borderRadius = '5px';
  148. cheatButton.style.cursor = 'pointer';
  149. cheatButton.style.marginBottom = '10px';
  150. cheatButton.onclick = cheat.action;
  151. cheatMenu.appendChild(cheatButton);
  152. });
  153.  
  154. // Add the cheat menu toggle button
  155. const toggleCheatButton = document.createElement('button');
  156. toggleCheatButton.innerText = 'Open Cheats';
  157. toggleCheatButton.style.position = 'fixed';
  158. toggleCheatButton.style.bottom = '10px';
  159. toggleCheatButton.style.right = '10px';
  160. toggleCheatButton.style.backgroundColor = '#e74c3c';
  161. toggleCheatButton.style.color = '#fff';
  162. toggleCheatButton.style.border = 'none';
  163. toggleCheatButton.style.padding = '10px 20px';
  164. toggleCheatButton.style.borderRadius = '5px';
  165. toggleCheatButton.style.cursor = 'pointer';
  166. toggleCheatButton.onclick = () => {
  167. cheatMenu.style.display = (cheatMenu.style.display === 'none') ? 'block' : 'none';
  168. };
  169. document.body.appendChild(toggleCheatButton);
  170.  
  171. // Example implementations of cheat actions
  172. function unlockAllUpgrades() {
  173. // Implement logic to unlock all upgrades
  174. alert('All upgrades unlocked!');
  175. }
  176.  
  177. function grantAllAchievements() {
  178. // Implement logic to grant all achievements
  179. alert('All achievements granted!');
  180. }
  181.  
  182. function unlockVIPHeart() {
  183. // Implement logic to unlock VIP Heart Character
  184. alert('VIP Heart Character unlocked!');
  185. }
  186.  
  187. function setAllUpgradesToMax() {
  188. // Implement logic to set all upgrades to max level
  189. alert('All upgrades set to max level!');
  190. }
  191.  
  192. function unlockAllCharacters() {
  193. // Implement logic to unlock all characters
  194. alert('All characters unlocked!');
  195. }
  196.  
  197. function applyRandomUpgrade() {
  198. // Implement logic to apply a random upgrade
  199. alert('Random upgrade applied!');
  200. }
  201.  
  202. function resetToDefaultSettings() {
  203. // Implement logic to reset game to default settings
  204. alert('Game settings reset to default!');
  205. }
  206.  
  207. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址