Slither.io Fake Ban Simulation

Simulate a server-side fake ban in Slither.io

  1. // ==UserScript==
  2. // @name Slither.io Fake Ban Simulation
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.5
  5. // @description Simulate a server-side fake ban in Slither.io
  6. // @author You
  7. // @match *://slither.io/*
  8. // @grant none
  9. // @run-at document-end
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. // Create the GUI elements
  16. const createBanGUI = () => {
  17. const container = document.createElement('div');
  18. container.style.position = 'fixed';
  19. container.style.top = '10px';
  20. container.style.right = '10px';
  21. container.style.backgroundColor = '#111';
  22. container.style.color = '#0ff';
  23. container.style.padding = '20px';
  24. container.style.borderRadius = '12px';
  25. container.style.zIndex = '1000';
  26. container.style.cursor = 'move';
  27. container.style.boxShadow = '0 0 15px rgba(0, 255, 255, 0.5)';
  28. container.style.transition = 'all 0.3s ease';
  29.  
  30. const title = document.createElement('h3');
  31. title.textContent = 'Fake Ban GUI';
  32. title.style.textShadow = '0 0 10px rgba(0, 255, 255, 0.7)';
  33. container.appendChild(title);
  34.  
  35. const usernameInput = document.createElement('input');
  36. usernameInput.type = 'text';
  37. usernameInput.placeholder = 'Enter username';
  38. usernameInput.style.marginBottom = '10px';
  39. usernameInput.style.padding = '10px';
  40. usernameInput.style.border = '2px solid #0ff';
  41. usernameInput.style.backgroundColor = '#222';
  42. usernameInput.style.color = '#0ff';
  43. usernameInput.style.borderRadius = '8px';
  44. usernameInput.style.transition = 'all 0.3s ease';
  45. usernameInput.onfocus = () => usernameInput.style.borderColor = '#0ff';
  46. usernameInput.onblur = () => usernameInput.style.borderColor = '#0ff';
  47. container.appendChild(usernameInput);
  48.  
  49. const timeInput = document.createElement('input');
  50. timeInput.type = 'text';
  51. timeInput.placeholder = 'Enter ban time (mm:ss)';
  52. timeInput.style.marginBottom = '10px';
  53. timeInput.style.padding = '10px';
  54. timeInput.style.border = '2px solid #0ff';
  55. timeInput.style.backgroundColor = '#222';
  56. timeInput.style.color = '#0ff';
  57. timeInput.style.borderRadius = '8px';
  58. timeInput.style.transition = 'all 0.3s ease';
  59. timeInput.onfocus = () => timeInput.style.borderColor = '#0ff';
  60. timeInput.onblur = () => timeInput.style.borderColor = '#0ff';
  61. container.appendChild(timeInput);
  62.  
  63. const button = document.createElement('button');
  64. button.textContent = 'Ban';
  65. button.style.padding = '10px 20px';
  66. button.style.border = 'none';
  67. button.style.backgroundColor = '#0ff';
  68. button.style.color = '#111';
  69. button.style.fontSize = '16px';
  70. button.style.borderRadius = '8px';
  71. button.style.cursor = 'pointer';
  72. button.style.boxShadow = '0 0 10px rgba(0, 255, 255, 0.5)';
  73. button.style.transition = 'all 0.3s ease';
  74. button.onmouseover = () => button.style.backgroundColor = '#0cc';
  75. button.onmouseout = () => button.style.backgroundColor = '#0ff';
  76. button.onclick = () => {
  77. const username = usernameInput.value.trim();
  78. const [minutes, seconds] = timeInput.value.split(':').map(num => parseInt(num, 10));
  79. if (!username || isNaN(minutes) || isNaN(seconds)) {
  80. alert('Please enter a valid username and time in mm:ss format.');
  81. return;
  82. }
  83. const banTime = (minutes * 60 + seconds) * 1000; // Convert to milliseconds
  84.  
  85. // Send ban request to the proxy server
  86. fetch('http://your-proxy-server/ban', {
  87. method: 'POST',
  88. headers: {
  89. 'Content-Type': 'application/json'
  90. },
  91. body: JSON.stringify({ username, banTime })
  92. })
  93. .then(response => response.json())
  94. .then(data => {
  95. showBanPopup(username, banTime);
  96. })
  97. .catch(error => {
  98. console.error('Error:', error);
  99. });
  100. };
  101. container.appendChild(button);
  102.  
  103. document.body.appendChild(container);
  104.  
  105. // Make the GUI draggable
  106. let isDragging = false;
  107. let offsetX, offsetY;
  108.  
  109. container.onmousedown = (e) => {
  110. isDragging = true;
  111. offsetX = e.clientX - container.getBoundingClientRect().left;
  112. offsetY = e.clientY - container.getBoundingClientRect().top;
  113. };
  114.  
  115. document.onmousemove = (e) => {
  116. if (isDragging) {
  117. container.style.left = (e.clientX - offsetX) + 'px';
  118. container.style.top = (e.clientY - offsetY) + 'px';
  119. }
  120. };
  121.  
  122. document.onmouseup = () => {
  123. isDragging = false;
  124. };
  125. };
  126.  
  127. const showBanPopup = (username, banTime) => {
  128. const popup = document.createElement('div');
  129. popup.style.position = 'fixed';
  130. popup.style.top = '50%';
  131. popup.style.left = '50%';
  132. popup.style.transform = 'translate(-50%, -50%)';
  133. popup.style.backgroundColor = '#111';
  134. popup.style.color = '#0ff';
  135. popup.style.padding = '30px';
  136. popup.style.borderRadius = '12px';
  137. popup.style.zIndex = '1000';
  138. popup.style.textAlign = 'center';
  139. popup.style.fontSize = '20px';
  140. popup.style.fontWeight = 'bold';
  141. popup.style.boxShadow = '0 0 25px rgba(0, 255, 255, 0.7)';
  142. popup.style.transition = 'opacity 0.5s ease';
  143. popup.style.opacity = '0';
  144. popup.style.animation = 'popup-fade 0.5s forwards';
  145.  
  146. const message = document.createElement('div');
  147. message.textContent = `${username}, you are banned for ${Math.floor(banTime / 60000)} minutes and ${Math.floor((banTime % 60000) / 1000)} seconds.`;
  148. popup.appendChild(message);
  149.  
  150. document.body.appendChild(popup);
  151.  
  152. // Disable game interaction
  153. document.body.style.pointerEvents = 'none';
  154. };
  155.  
  156. const checkBanStatus = () => {
  157. fetch('http://your-proxy-server/status', {
  158. method: 'GET'
  159. })
  160. .then(response => response.json())
  161. .then(data => {
  162. if (data.isBanned && Date.now() < data.banEndTime) {
  163. showBanPopup(data.username, data.banEndTime - Date.now());
  164. } else if (data.isBanned && Date.now() >= data.banEndTime) {
  165. document.body.style.pointerEvents = 'auto'; // Re-enable interaction
  166. }
  167. })
  168. .catch(error => {
  169. console.error('Error:', error);
  170. });
  171. };
  172.  
  173. // Add keyframes for popup animation
  174. const style = document.createElement('style');
  175. style.textContent = `
  176. @keyframes popup-fade {
  177. from { opacity: 0; }
  178. to { opacity: 1; }
  179. }
  180. `;
  181. document.head.appendChild(style);
  182.  
  183. // Initialize the GUI and check ban status
  184. createBanGUI();
  185. checkBanStatus();
  186. })();

QingJ © 2025

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