Greasy Fork 支持简体中文。

Snake.io Modern Cheat GUI

Modern cheat GUI for Snake.io with 16 functional cheats, visible to others in the game

  1. // ==UserScript==
  2. // @name Snake.io Modern Cheat GUI
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.2
  5. // @description Modern cheat GUI for Snake.io with 16 functional cheats, visible to others in the game
  6. // @author YourName
  7. // @match *://*.snake.io/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Create a container for the GUI
  15. const guiContainer = document.createElement('div');
  16. guiContainer.style.position = 'fixed';
  17. guiContainer.style.top = '50px';
  18. guiContainer.style.right = '50px';
  19. guiContainer.style.padding = '15px';
  20. guiContainer.style.width = '300px';
  21. guiContainer.style.backgroundColor = '#282c34';
  22. guiContainer.style.color = '#61dafb';
  23. guiContainer.style.zIndex = '9999';
  24. guiContainer.style.borderRadius = '10px';
  25. guiContainer.style.boxShadow = '0 4px 8px rgba(0, 0, 0, 0.5)';
  26. guiContainer.style.fontFamily = 'Arial, sans-serif';
  27. guiContainer.style.cursor = 'move';
  28. guiContainer.style.transition = 'transform 0.3s ease';
  29. document.body.appendChild(guiContainer);
  30.  
  31. // Make the GUI draggable
  32. let isDragging = false;
  33. let offsetX, offsetY;
  34.  
  35. guiContainer.addEventListener('mousedown', function(e) {
  36. isDragging = true;
  37. offsetX = e.clientX - guiContainer.getBoundingClientRect().left;
  38. offsetY = e.clientY - guiContainer.getBoundingClientRect().top;
  39. });
  40.  
  41. document.addEventListener('mousemove', function(e) {
  42. if (isDragging) {
  43. guiContainer.style.left = `${e.clientX - offsetX}px`;
  44. guiContainer.style.top = `${e.clientY - offsetY}px`;
  45. }
  46. });
  47.  
  48. document.addEventListener('mouseup', function() {
  49. isDragging = false;
  50. });
  51.  
  52. // Cheat functions (implement these with actual game logic)
  53. function changeCharacter(characterIndex) {
  54. // Logic to change character
  55. alert(`Character changed to Character ${characterIndex + 1}`);
  56. }
  57.  
  58. function changeName(newName) {
  59. // Logic to change name
  60. alert(`Name changed to ${newName}`);
  61. }
  62.  
  63. function activateSpeedBoost() {
  64. // Logic to activate speed boost
  65. alert('Speed boost activated!');
  66. }
  67.  
  68. function increaseSize() {
  69. // Logic to increase size
  70. alert('Size increased!');
  71. }
  72.  
  73. function decreaseSize() {
  74. // Logic to decrease size
  75. alert('Size decreased!');
  76. }
  77.  
  78. function becomeInvisible() {
  79. // Logic to become invisible
  80. alert('Invisibility activated!');
  81. }
  82.  
  83. function activateShield() {
  84. // Logic to activate shield
  85. alert('Shield activated!');
  86. }
  87.  
  88. function teleport() {
  89. // Logic to teleport
  90. alert('Teleported to a new location!');
  91. }
  92.  
  93. function growInstantly() {
  94. // Logic to instantly grow in size
  95. alert('Instant growth activated!');
  96. }
  97.  
  98. function shrinkInstantly() {
  99. // Logic to instantly shrink in size
  100. alert('Instant shrink activated!');
  101. }
  102.  
  103. function freezeOtherPlayers() {
  104. // Logic to freeze other players
  105. alert('Other players frozen!');
  106. }
  107.  
  108. function slowDownOthers() {
  109. // Logic to slow down other players
  110. alert('Other players slowed down!');
  111. }
  112.  
  113. function explodeNearby() {
  114. // Logic to explode nearby players
  115. alert('Nearby players exploded!');
  116. }
  117.  
  118. function reverseControls() {
  119. // Logic to reverse controls of other players
  120. alert('Other players\' controls reversed!');
  121. }
  122.  
  123. function attractAllFood() {
  124. // Logic to attract all food
  125. alert('All food attracted to you!');
  126. }
  127.  
  128. function bypassBoundary() {
  129. // Logic to bypass circle boundary
  130. alert('Circle boundary bypass activated!');
  131. }
  132.  
  133. // Create cheats list
  134. const cheats = [
  135. {name: 'Change Character', action: () => changeCharacter(0)},
  136. {name: 'Change Name', action: () => changeName(prompt('Enter new name:'))},
  137. {name: 'Speed Boost', action: activateSpeedBoost},
  138. {name: 'Increase Size', action: increaseSize},
  139. {name: 'Decrease Size', action: decreaseSize},
  140. {name: 'Become Invisible', action: becomeInvisible},
  141. {name: 'Activate Shield', action: activateShield},
  142. {name: 'Teleport', action: teleport},
  143. {name: 'Instant Grow', action: growInstantly},
  144. {name: 'Instant Shrink', action: shrinkInstantly},
  145. {name: 'Freeze Other Players', action: freezeOtherPlayers},
  146. {name: 'Slow Down Others', action: slowDownOthers},
  147. {name: 'Explode Nearby Players', action: explodeNearby},
  148. {name: 'Reverse Controls', action: reverseControls},
  149. {name: 'Attract All Food', action: attractAllFood},
  150. {name: 'Bypass Circle Boundary', action: bypassBoundary}
  151. ];
  152.  
  153. // Create buttons for each cheat
  154. cheats.forEach(cheat => {
  155. const button = document.createElement('button');
  156. button.textContent = cheat.name;
  157. button.style.display = 'block';
  158. button.style.width = '100%';
  159. button.style.marginBottom = '8px';
  160. button.style.padding = '10px';
  161. button.style.border = 'none';
  162. button.style.borderRadius = '5px';
  163. button.style.backgroundColor = '#61dafb';
  164. button.style.color = '#282c34';
  165. button.style.fontSize = '16px';
  166. button.style.cursor = 'pointer';
  167. button.style.transition = 'background-color 0.2s';
  168. button.addEventListener('mouseover', function() {
  169. button.style.backgroundColor = '#21a1f1';
  170. });
  171. button.addEventListener('mouseout', function() {
  172. button.style.backgroundColor = '#61dafb';
  173. });
  174. button.onclick = cheat.action;
  175. guiContainer.appendChild(button);
  176. });
  177.  
  178. })();