EvoWorld.io Esp Mod Menu

Adds transparency, max-range enemy show with danger alerts, sees players in safe zones to EvoWorld.io, and toggleable menu with Tab.

  1. // ==UserScript==
  2. // @name EvoWorld.io Esp Mod Menu
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.1
  5. // @description Adds transparency, max-range enemy show with danger alerts, sees players in safe zones to EvoWorld.io, and toggleable menu with Tab.
  6. // @author Ice_Mod
  7. // @match https://evoworld.io/
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11. //Enable ESP In English - C
  12.  
  13. //sorry script test
  14. (function() {
  15. alert("Beta Script By t.me/Ice_Mod");
  16. 'use strict';
  17.  
  18. function waitForGameLoad() {
  19. if (typeof game !== 'undefined' && game.canvas) {
  20. initScript();
  21. } else {
  22. setTimeout(waitForGameLoad, 500);
  23. }
  24. }
  25.  
  26. function initScript() {
  27. console.log("Game loaded, initializing script...");
  28.  
  29. // --- Feature Toggles ---
  30. let showEnemyLines = true;
  31. let emoteSpamEnabled = false;
  32.  
  33. // --- Enemy Line Color ---
  34. let enemyLineColor = 'yellow';
  35.  
  36. // --- Menu Container Creation ---
  37. const menuContainer = document.createElement('div');
  38. menuContainer.style.position = 'absolute';
  39. menuContainer.style.top = '10px';
  40. menuContainer.style.right = '10px';
  41. menuContainer.style.zIndex = '1000';
  42. menuContainer.style.backgroundColor = '#fff';
  43. menuContainer.style.padding = '10px';
  44. menuContainer.style.border = '1px solid #ccc';
  45.  
  46. // --- Menu Toggle ---
  47. let menuOpen = true; // Start with menu open by default
  48. menuContainer.style.display = 'block';
  49. document.addEventListener("keyup", function (event) {
  50. if (event.key === "C" || event.key === "c") {
  51. showEnemyLines = !showEnemyLines;
  52. }
  53. });
  54.  
  55. document.addEventListener('keydown', (event) => {
  56. if (event.key === 'Tab') {
  57. event.preventDefault();
  58. menuOpen = !menuOpen;
  59. menuContainer.style.display = menuOpen ? 'block' : 'none';
  60. }
  61. });
  62.  
  63. // --- Menu Items ---
  64. const cloudSlider = createSlider('Cloud Transparency', 0, 1, 0.5);
  65. const swampSlider = createSlider('Swamp Transparency', 0, 1, 1);
  66. const bushSlider = createSlider('Bush Transparency', 0, 1, 1);
  67. const enemyLinesCheckbox = createCheckbox('Enemy Show', true);
  68. const emoteSpamCheckbox = createCheckbox('Emote Spam Beta', false);
  69. const colorPicker = createColorPicker('Enemy Line Color', enemyLineColor);
  70.  
  71. menuContainer.appendChild(cloudSlider);
  72. menuContainer.appendChild(swampSlider);
  73. menuContainer.appendChild(bushSlider);
  74. menuContainer.appendChild(enemyLinesCheckbox);
  75. menuContainer.appendChild(emoteSpamCheckbox);
  76. menuContainer.appendChild(colorPicker);
  77. document.body.appendChild(menuContainer);
  78.  
  79. // Helper functions to create menu elements
  80. function createSlider(label, min, max, defaultValue, step = 0.01) {
  81. const container = document.createElement('div');
  82. container.style.marginBottom = '5px';
  83.  
  84. const labelElement = document.createElement('label');
  85. labelElement.textContent = label;
  86. container.appendChild(labelElement);
  87.  
  88. const slider = document.createElement('input');
  89. slider.type = 'range';
  90. slider.min = min;
  91. slider.max = max;
  92. slider.step = step;
  93. slider.value = defaultValue;
  94. container.appendChild(slider);
  95.  
  96. return container;
  97. }
  98.  
  99. function createCheckbox(label, checked) {
  100. const container = document.createElement('div');
  101. container.style.marginBottom = '5px';
  102.  
  103. const checkbox = document.createElement('input');
  104. checkbox.type = 'checkbox';
  105. checkbox.checked = checked;
  106. container.appendChild(checkbox);
  107.  
  108. const labelElement = document.createElement('label');
  109. labelElement.textContent = label;
  110. container.appendChild(labelElement);
  111.  
  112. return container;
  113. }
  114.  
  115. function createColorPicker(label, defaultValue) {
  116. const container = document.createElement('div');
  117. container.style.marginBottom = '5px';
  118.  
  119. const labelElement = document.createElement('label');
  120. labelElement.textContent = label;
  121. container.appendChild(labelElement);
  122.  
  123. const picker = document.createElement('input');
  124. picker.type = 'color';
  125. picker.value = defaultValue;
  126. container.appendChild(picker);
  127.  
  128. return container;
  129. }
  130.  
  131. // Apply transparency
  132. function applyTransparency() {
  133. const cloudAlpha = parseFloat(cloudSlider.querySelector('input').value);
  134. const swampAlpha = parseFloat(swampSlider.querySelector('input').value);
  135. const bushAlpha = parseFloat(bushSlider.querySelector('input').value);
  136.  
  137. Object.values(game.gameObjects).forEach(obj => {
  138. if (obj.name.includes('cloud')) {
  139. obj.opacity = cloudAlpha;
  140. } else if (obj.name === 'swamp') {
  141. obj.opacity = swampAlpha;
  142. } else if (obj.name.includes('bush')) {
  143. obj.opacity = bushAlpha;
  144. }
  145. });
  146. }
  147.  
  148. // --- Override game.isVisible to make players in safe zones visible ---
  149. const originalIsVisible = game.isVisible;
  150. game.isVisible = function(camera, obj, originalWidth, originalHeight) {
  151. if (obj.type === objectType.PLAYER && obj.inSafeZone) {
  152. // Use your desired logic to make them visible, for example:
  153. return true; // Always visible
  154. // Or calculate a custom visibility based on safe zone location
  155. }
  156. return originalIsVisible.call(this, camera, obj, originalWidth, originalHeight);
  157. }
  158.  
  159. // Draw enemy lines, distances, boxes, and danger labels
  160. function drawEnemyLines() {
  161. if (showEnemyLines) {
  162. const ctx = game.dynamicContext;
  163. ctx.strokeStyle = enemyLineColor;
  164. ctx.lineWidth = 2;
  165. ctx.font = '14px Arial';
  166.  
  167. const extendedRenderDistance = game.worldWidth;
  168.  
  169. Object.values(game.gameObjects).forEach(obj => {
  170. if (obj.type === objectType.PLAYER && obj !== game.me &&
  171. game.isVisible(game.camera, obj, extendedRenderDistance, extendedRenderDistance)) {
  172. const myPos = game.getRenderPosition(game.me.position.x + game.me.width / 2, game.me.position.y + game.me.height / 2);
  173. const enemyPos = game.getRenderPosition(obj.position.x + obj.width / 2, obj.position.y + obj.height / 2);
  174. const distance = Math.round(getDistance(game.me.position.x, game.me.position.y, obj.position.x, obj.position.y));
  175.  
  176. // Draw line
  177. drawDangerLine(ctx, myPos, enemyPos, obj);
  178.  
  179. // Draw distance
  180. ctx.fillStyle = 'white';
  181. ctx.fillText(`${distance}m`, (myPos.x + enemyPos.x) / 2, (myPos.y + enemyPos.y) / 2);
  182.  
  183. // Draw glowing box
  184. ctx.shadowColor = 'cyan';
  185. ctx.shadowBlur = 10;
  186. const boxSize = 40;
  187. ctx.strokeRect(enemyPos.x - boxSize / 2, enemyPos.y - boxSize / 2, boxSize, boxSize);
  188. ctx.shadowBlur = 0;
  189.  
  190. // Draw danger label
  191. drawDangerLabel(ctx, enemyPos, obj);
  192. }
  193. });
  194. }
  195. }
  196.  
  197. // Draw line with danger indicator
  198. function drawDangerLine(ctx, myPos, enemyPos, enemy) {
  199. ctx.beginPath();
  200. ctx.moveTo(myPos.x, myPos.y);
  201. ctx.lineTo(enemyPos.x, enemyPos.y);
  202.  
  203. // Set line color based on danger
  204. if (canEat(enemy, game.me)) {
  205. ctx.strokeStyle = 'red'; // Dangerous enemy
  206. } else {
  207. ctx.strokeStyle = enemyLineColor; // Safe enemy
  208. }
  209. ctx.stroke();
  210. }
  211.  
  212. // Draw Danger/Safe label above enemy
  213. function drawDangerLabel(ctx, enemyPos, enemy) {
  214. ctx.fillStyle = canEat(enemy, game.me) ? 'red' : 'green';
  215. ctx.font = 'bold 16px Arial';
  216. let label = canEat(enemy, game.me) ? 'Danger' : 'Safe';
  217. let textWidth = ctx.measureText(label).width;
  218. ctx.fillText(label, enemyPos.x - textWidth / 2, enemyPos.y - 55); // Moved label higher
  219. }
  220.  
  221. // --- Dynamic Transparency for Clouds/Bushes/Swamp ---
  222. const originalDrawObject = game.drawObject;
  223. game.drawObject = function (obj, staticCanvas) {
  224. if ((obj.name.includes('cloud') || obj.name === 'swamp' || obj.name.includes('bush')) && game.isVisible(game.camera, obj)) {
  225. obj.opacity = parseFloat(cloudSlider.querySelector('input').value);
  226. staticCanvas = false;
  227. }
  228. originalDrawObject.call(this, obj, staticCanvas);
  229. };
  230.  
  231. // --- Emote Spam ---
  232. emoteSpamCheckbox.addEventListener('change', () => {
  233. emoteSpamEnabled = emoteSpamCheckbox.querySelector('input').checked;
  234. if (emoteSpamEnabled) {
  235. startEmoteSpam();
  236. } else {
  237. stopEmoteSpam();
  238. }
  239. });
  240.  
  241. let emoteSpamInterval;
  242. function startEmoteSpam() {
  243. emoteSpamInterval = setInterval(() => {
  244. if (typeof gameServer !== 'undefined' && !imDead && joinedGame) {
  245. const randomEmoteId = Math.floor(Math.random() * 13) + 1;
  246. sendEmote(randomEmoteId);
  247. }
  248. }, 1000);
  249. }
  250.  
  251. function stopEmoteSpam() {
  252. clearInterval(emoteSpamInterval);
  253. }
  254.  
  255. // Event listeners for menu changes
  256. cloudSlider.addEventListener('input', applyTransparency);
  257. swampSlider.addEventListener('input', applyTransparency);
  258. bushSlider.addEventListener('input', applyTransparency);
  259. enemyLinesCheckbox.addEventListener('change', () => showEnemyLines = enemyLinesCheckbox.querySelector('input').checked);
  260. colorPicker.addEventListener('change', () => enemyLineColor = colorPicker.querySelector('input').value);
  261.  
  262. // Add enemy lines to the game loop
  263. const originalBeforeDrawAllObjects = game.beforeDrawAllObjects;
  264. game.beforeDrawAllObjects = function () {
  265. originalBeforeDrawAllObjects.apply(this, arguments);
  266. drawEnemyLines();
  267. };
  268.  
  269. // Set initial transparency
  270. applyTransparency();
  271. }
  272.  
  273. // --- Helper Functions ---
  274. function getDistance(x1, y1, x2, y2) {
  275. let dx = x2 - x1;
  276. let dy = y2 - y1;
  277. return Math.sqrt(dx * dx + dy * dy);
  278. }
  279.  
  280. // --- Food Eating Logic ---
  281. function canEat(eater, food) {
  282. if (foodChain[eater.name] && foodChain[eater.name].eats[food.name]) {
  283. return true;
  284. }
  285. return false;
  286. }
  287.  
  288. waitForGameLoad();
  289. })();