Snake.io Cheat GUI with Backend

Adds cheats and custom audio to Snake.io with server-side interaction.

目前为 2024-08-24 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Snake.io Cheat GUI with Backend
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Adds cheats and custom audio to Snake.io with server-side interaction.
  6. // @author Your Name
  7. // @match *://snake.io/*
  8. // @grant GM_xmlhttpRequest
  9. // @connect your-backend-server.com
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. // Create GUI
  16. const gui = document.createElement('div');
  17. gui.style.position = 'fixed';
  18. gui.style.top = '10px';
  19. gui.style.left = '10px';
  20. gui.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
  21. gui.style.color = 'white';
  22. gui.style.padding = '10px';
  23. gui.style.zIndex = '1000';
  24. gui.style.borderRadius = '5px';
  25. gui.style.fontFamily = 'Arial, sans-serif';
  26. gui.innerHTML = `
  27. <h3>Snake.io Cheats</h3>
  28. <button id="barrierBypass">Barrier Bypass</button><br><br>
  29. <button id="speedBoost">Speed Boost</button><br><br>
  30. <button id="characterChanger">Change Character</button><br><br>
  31. <input type="text" id="nameChanger" placeholder="Enter New Name"><br><br>
  32. <button id="applyNameChange">Change Name</button><br><br>
  33. <input type="text" id="audioURL" placeholder="Enter YouTube Audio URL"><br><br>
  34. <button id="applyAudioChange">Change Audio</button><br><br>
  35. `;
  36. document.body.appendChild(gui);
  37.  
  38. // Helper function for server communication
  39. function sendToBackend(action, data) {
  40. GM_xmlhttpRequest({
  41. method: 'POST',
  42. url: 'https://your-backend-server.com/api/cheats',
  43. headers: { 'Content-Type': 'application/json' },
  44. data: JSON.stringify({ action, data }),
  45. onload: function(response) {
  46. console.log('Server response:', response.responseText);
  47. },
  48. onerror: function(error) {
  49. console.error('Error communicating with the server:', error);
  50. }
  51. });
  52. }
  53.  
  54. // Cheat Functions
  55. function barrierBypass() { sendToBackend('barrierBypass'); }
  56. function speedBoost() { sendToBackend('speedBoost'); }
  57. function changeCharacter() { sendToBackend('changeCharacter'); }
  58. function changeName(newName) { sendToBackend('changeName', newName); }
  59. function startCustomAudio(url) { sendToBackend('customAudio', url); }
  60.  
  61. // Event Listeners for GUI buttons
  62. document.getElementById('barrierBypass').addEventListener('click', barrierBypass);
  63. document.getElementById('speedBoost').addEventListener('click', speedBoost);
  64. document.getElementById('characterChanger').addEventListener('click', changeCharacter);
  65. document.getElementById('applyNameChange').addEventListener('click', () => {
  66. const newName = document.getElementById('nameChanger').value;
  67. if (newName) { changeName(newName); }
  68. });
  69. document.getElementById('applyAudioChange').addEventListener('click', () => {
  70. const audioURL = document.getElementById('audioURL').value;
  71. if (audioURL) { startCustomAudio(audioURL); }
  72. });
  73.  
  74. })();

QingJ © 2025

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