RubixYT1

The great vaporizer-X (owot.me) v1.2.1

May 25th, 2026 (edited)
155
1
Never
4
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.08 KB | None | 1 0
  1. (function() {
  2. // Prevent creating multiple instances
  3. if (document.getElementById('wiper-beta-ui')) {
  4. document.getElementById('wiper-beta-ui').remove();
  5. }
  6. if (document.getElementById('wiper-warning-modal')) {
  7. document.getElementById('wiper-warning-modal').remove();
  8. }
  9.  
  10. let isFastMode = false;
  11.  
  12. // --- 1. CREATE THE UI ---
  13. const ui = document.createElement('div');
  14. ui.id = 'wiper-beta-ui';
  15. ui.style.position = 'fixed';
  16. ui.style.top = '20px';
  17. ui.style.left = '20px';
  18. // Dark red to dark orange gradient
  19. ui.style.background = 'linear-gradient(135deg, #8b0000, #ff8c00)';
  20. ui.style.color = '#fff';
  21. ui.style.border = '2px solid #4a0000';
  22. ui.style.padding = '15px';
  23. ui.style.zIndex = '999998';
  24. ui.style.fontFamily = 'monospace';
  25. ui.style.boxShadow = '0px 6px 15px rgba(0,0,0,0.6)';
  26. ui.style.width = '240px';
  27. ui.style.borderRadius = '8px';
  28.  
  29. // Title
  30. const title = document.createElement('h3');
  31. title.innerText = 'Wiper Beta v1.2.1';
  32. title.style.margin = '0 0 15px 0';
  33. title.style.fontSize = '18px';
  34. title.style.textAlign = 'center';
  35. title.style.borderBottom = '1px solid rgba(255, 255, 255, 0.3)';
  36. title.style.paddingBottom = '5px';
  37. title.style.textShadow = '1px 1px 2px #000';
  38. ui.appendChild(title);
  39.  
  40. // Minimize Button
  41. const minimizeBtn = document.createElement('div');
  42. minimizeBtn.innerText = '−';
  43. minimizeBtn.style.position = 'absolute';
  44. minimizeBtn.style.top = '5px';
  45. minimizeBtn.style.right = '30px';
  46. minimizeBtn.style.cursor = 'pointer';
  47. minimizeBtn.style.color = '#fff';
  48. minimizeBtn.style.fontWeight = 'bold';
  49. minimizeBtn.style.fontSize = '16px';
  50. minimizeBtn.style.textShadow = '1px 1px 2px #000';
  51. ui.appendChild(minimizeBtn);
  52.  
  53. // Close button
  54. const closeBtn = document.createElement('div');
  55. closeBtn.innerText = 'X';
  56. closeBtn.style.position = 'absolute';
  57. closeBtn.style.top = '6px';
  58. closeBtn.style.right = '10px';
  59. closeBtn.style.cursor = 'pointer';
  60. closeBtn.style.color = '#fff';
  61. closeBtn.style.fontWeight = 'bold';
  62. closeBtn.style.fontSize = '14px';
  63. closeBtn.style.textShadow = '1px 1px 2px #000';
  64. closeBtn.onclick = () => ui.remove();
  65. ui.appendChild(closeBtn);
  66.  
  67. // Content Wrapper (hides when minimized)
  68. const contentDiv = document.createElement('div');
  69. ui.appendChild(contentDiv);
  70.  
  71. minimizeBtn.onclick = () => {
  72. if (contentDiv.style.display === 'none') {
  73. contentDiv.style.display = 'block';
  74. minimizeBtn.innerText = '−';
  75. title.style.borderBottom = '1px solid rgba(255, 255, 255, 0.3)';
  76. title.style.margin = '0 0 15px 0';
  77. } else {
  78. contentDiv.style.display = 'none';
  79. minimizeBtn.innerText = '+';
  80. title.style.borderBottom = 'none';
  81. title.style.margin = '0';
  82. }
  83. };
  84.  
  85. // Helper function to create standard textboxes
  86. function createTextInput(labelText) {
  87. const wrapper = document.createElement('div');
  88. wrapper.style.marginBottom = '8px';
  89. wrapper.style.display = 'flex';
  90. wrapper.style.justifyContent = 'space-between';
  91. wrapper.style.alignItems = 'center';
  92.  
  93. const label = document.createElement('label');
  94. label.innerText = labelText + ': ';
  95. label.style.fontWeight = 'bold';
  96. label.style.textShadow = '1px 1px 2px #000';
  97.  
  98. const input = document.createElement('input');
  99. input.type = 'text'; // Strictly 'text'
  100. input.style.width = '120px';
  101. input.style.backgroundColor = 'rgba(0, 0, 0, 0.6)';
  102. input.style.color = '#fff';
  103. input.style.border = '1px solid #ffaa00';
  104. input.style.padding = '4px';
  105. input.style.borderRadius = '3px';
  106. input.style.outline = 'none';
  107.  
  108. wrapper.appendChild(label);
  109. wrapper.appendChild(input);
  110. contentDiv.appendChild(wrapper);
  111.  
  112. return input;
  113. }
  114.  
  115. // Create the 4 inputs
  116. const inputX1 = createTextInput('X1');
  117. const inputY1 = createTextInput('Y1');
  118. const inputX2 = createTextInput('X2');
  119. const inputY2 = createTextInput('Y2');
  120.  
  121. // --- CLEAR IN TILES TOGGLE ---
  122. const tileWrapper = document.createElement('div');
  123. tileWrapper.style.margin = '10px 0';
  124. tileWrapper.style.display = 'flex';
  125. tileWrapper.style.justifyContent = 'space-between';
  126. tileWrapper.style.alignItems = 'center';
  127.  
  128. const tileLabel = document.createElement('label');
  129. tileLabel.innerText = 'Clear in Tiles:';
  130. tileLabel.style.fontWeight = 'bold';
  131. tileLabel.style.textShadow = '1px 1px 2px #000';
  132. tileLabel.style.cursor = 'pointer';
  133.  
  134. const tileCheckbox = document.createElement('input');
  135. tileCheckbox.type = 'checkbox';
  136. tileCheckbox.style.cursor = 'pointer';
  137. tileCheckbox.style.width = '16px';
  138. tileCheckbox.style.height = '16px';
  139.  
  140. tileWrapper.appendChild(tileLabel);
  141. tileWrapper.appendChild(tileCheckbox);
  142. contentDiv.appendChild(tileWrapper);
  143.  
  144. // --- EASY MODE SECTION ---
  145. const easyModeContainer = document.createElement('div');
  146. easyModeContainer.style.margin = '10px 0';
  147. easyModeContainer.style.padding = '8px';
  148. easyModeContainer.style.border = '1px solid #00ffff';
  149. easyModeContainer.style.borderRadius = '4px';
  150. easyModeContainer.style.backgroundColor = 'rgba(0, 255, 255, 0.1)';
  151. easyModeContainer.style.textAlign = 'center';
  152.  
  153. const emLabel = document.createElement('div');
  154. emLabel.style.marginBottom = '5px';
  155. emLabel.style.fontWeight = 'bold';
  156. emLabel.style.color = '#00ffff';
  157. emLabel.style.textShadow = '1px 1px 2px #000';
  158. emLabel.style.fontSize = '12px';
  159. emLabel.style.display = 'none'; // Hidden initially
  160.  
  161. const emBtn = document.createElement('button');
  162. emBtn.innerText = 'Easy Mode';
  163. emBtn.style.width = '100%';
  164. emBtn.style.padding = '6px';
  165. emBtn.style.backgroundColor = '#00cccc';
  166. emBtn.style.color = 'black';
  167. emBtn.style.fontWeight = 'bold';
  168. emBtn.style.border = '1px solid #00ffff';
  169. emBtn.style.cursor = 'pointer';
  170. emBtn.style.borderRadius = '3px';
  171. emBtn.style.boxShadow = '0px 2px 4px rgba(0,0,0,0.5)';
  172.  
  173. emBtn.onmouseover = () => emBtn.style.backgroundColor = '#00ffff';
  174. emBtn.onmouseout = () => emBtn.style.backgroundColor = '#00cccc';
  175.  
  176. easyModeContainer.appendChild(emLabel);
  177. easyModeContainer.appendChild(emBtn);
  178. contentDiv.appendChild(easyModeContainer);
  179.  
  180. let easyModeStep = 0;
  181.  
  182. // Helper to get EXACT OWOT character/tile position
  183. function getPlayerCoords() {
  184. let coords = null;
  185. if (typeof cursorCoords !== "undefined" && cursorCoords !== null) {
  186. coords = [cursorCoords[0], cursorCoords[1]];
  187. } else if (typeof currentCol !== "undefined" && typeof currentRow !== "undefined") {
  188. coords = [currentCol, currentRow];
  189. }
  190.  
  191. if (!coords) {
  192. alert("Wiper Beta: Please click anywhere on the map first to place your typing cursor!");
  193. return null;
  194. }
  195.  
  196. if (tileCheckbox.checked) {
  197. return [Math.floor(coords[0] / 16), Math.floor(coords[1] / 16)];
  198. }
  199. return coords;
  200. }
  201.  
  202. emBtn.addEventListener('click', () => {
  203. if (easyModeStep === 0) {
  204. emLabel.style.display = 'block';
  205. emLabel.innerText = 'Input 1 (Place cursor, hit Select)';
  206. emBtn.innerText = 'Select';
  207. easyModeStep = 1;
  208. } else if (easyModeStep === 1) {
  209. let pos = getPlayerCoords();
  210. if (!pos) return;
  211.  
  212. inputX1.value = pos[0];
  213. inputY1.value = pos[1];
  214. emLabel.innerText = 'Input 2 (Place cursor, hit Select)';
  215. easyModeStep = 2;
  216. } else if (easyModeStep === 2) {
  217. let pos = getPlayerCoords();
  218. if (!pos) return;
  219.  
  220. inputX2.value = pos[0];
  221. inputY2.value = pos[1];
  222. emLabel.innerText = 'Easy Select done! have fun!';
  223. emBtn.style.display = 'none';
  224. easyModeStep = 3;
  225.  
  226. setTimeout(() => {
  227. emLabel.style.display = 'none';
  228. emBtn.style.display = 'block';
  229. emBtn.innerText = 'Easy Mode';
  230. easyModeStep = 0;
  231. }, 3000);
  232. }
  233. });
  234.  
  235. // --- FAST MODE SECTION ---
  236. const fmWrapper = document.createElement('div');
  237. fmWrapper.style.margin = '12px 0';
  238. fmWrapper.style.display = 'flex';
  239. fmWrapper.style.justifyContent = 'space-between';
  240. fmWrapper.style.alignItems = 'center';
  241. fmWrapper.style.borderTop = '1px solid rgba(255,255,255,0.2)';
  242. fmWrapper.style.paddingTop = '10px';
  243.  
  244. const fmLabel = document.createElement('label');
  245. fmLabel.innerText = 'Fast Mode (x5):';
  246. fmLabel.style.fontWeight = 'bold';
  247. fmLabel.style.textShadow = '1px 1px 2px #000';
  248. fmLabel.style.cursor = 'pointer';
  249.  
  250. const fmCheckbox = document.createElement('input');
  251. fmCheckbox.type = 'checkbox';
  252. fmCheckbox.style.cursor = 'pointer';
  253. fmCheckbox.style.width = '18px';
  254. fmCheckbox.style.height = '18px';
  255.  
  256. fmWrapper.appendChild(fmLabel);
  257. fmWrapper.appendChild(fmCheckbox);
  258. contentDiv.appendChild(fmWrapper);
  259.  
  260. fmCheckbox.addEventListener('click', (e) => {
  261. if (fmCheckbox.checked) {
  262. e.preventDefault();
  263. showWarningPopup();
  264. } else {
  265. isFastMode = false;
  266. }
  267. });
  268.  
  269. // --- SUBMIT SECTION ---
  270. const submitBtn = document.createElement('button');
  271. submitBtn.innerText = 'Submit';
  272. submitBtn.style.width = '100%';
  273. submitBtn.style.marginTop = '10px';
  274. submitBtn.style.padding = '10px';
  275. submitBtn.style.backgroundColor = '#222';
  276. submitBtn.style.color = 'white';
  277. submitBtn.style.border = '1px solid #ff8c00';
  278. submitBtn.style.cursor = 'pointer';
  279. submitBtn.style.fontWeight = 'bold';
  280. submitBtn.style.borderRadius = '4px';
  281. submitBtn.style.boxShadow = '0px 2px 5px rgba(0,0,0,0.4)';
  282.  
  283. submitBtn.onmouseover = () => { if(!submitBtn.disabled) submitBtn.style.backgroundColor = '#444'; };
  284. submitBtn.onmouseout = () => { if(!submitBtn.disabled) submitBtn.style.backgroundColor = '#222'; };
  285.  
  286. contentDiv.appendChild(submitBtn);
  287.  
  288. document.body.appendChild(ui);
  289.  
  290. // --- 2. CUSTOM WARNING POPUP ---
  291. function showWarningPopup() {
  292. const modalBg = document.createElement('div');
  293. modalBg.id = 'wiper-warning-modal';
  294. modalBg.style.position = 'fixed';
  295. modalBg.style.top = '0';
  296. modalBg.style.left = '0';
  297. modalBg.style.width = '100vw';
  298. modalBg.style.height = '100vh';
  299. modalBg.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
  300. modalBg.style.zIndex = '999999';
  301. modalBg.style.display = 'flex';
  302. modalBg.style.justifyContent = 'center';
  303. modalBg.style.alignItems = 'center';
  304.  
  305. const modalBox = document.createElement('div');
  306. modalBox.style.backgroundColor = '#1a1a1a';
  307. modalBox.style.border = '2px solid #ff3333';
  308. modalBox.style.padding = '20px';
  309. modalBox.style.borderRadius = '8px';
  310. modalBox.style.width = '300px';
  311. modalBox.style.textAlign = 'center';
  312. modalBox.style.color = '#fff';
  313. modalBox.style.fontFamily = 'monospace';
  314. modalBox.style.boxShadow = '0px 10px 30px rgba(0,0,0,0.8)';
  315.  
  316. const modalTitle = document.createElement('h2');
  317. modalTitle.innerText = 'Warning!';
  318. modalTitle.style.color = '#ff4444';
  319. modalTitle.style.margin = '0 0 10px 0';
  320.  
  321. const modalText = document.createElement('p');
  322. modalText.innerText = 'Please note that it might kick you out or lag you out.';
  323. modalText.style.margin = '0 0 20px 0';
  324. modalText.style.fontSize = '14px';
  325. modalText.style.color = '#ccc';
  326.  
  327. const btnContainer = document.createElement('div');
  328. btnContainer.style.display = 'flex';
  329. btnContainer.style.justifyContent = 'space-between';
  330.  
  331. const cancelBtn = document.createElement('button');
  332. cancelBtn.innerText = 'Cancel';
  333. cancelBtn.style.padding = '8px 15px';
  334. cancelBtn.style.backgroundColor = '#444';
  335. cancelBtn.style.color = '#fff';
  336. cancelBtn.style.border = 'none';
  337. cancelBtn.style.borderRadius = '4px';
  338. cancelBtn.style.cursor = 'pointer';
  339.  
  340. const proceedBtn = document.createElement('button');
  341. proceedBtn.innerText = 'Proceed';
  342. proceedBtn.style.padding = '8px 15px';
  343. proceedBtn.style.backgroundColor = '#cc0000';
  344. proceedBtn.style.color = '#fff';
  345. proceedBtn.style.border = 'none';
  346. proceedBtn.style.borderRadius = '4px';
  347. proceedBtn.style.cursor = 'pointer';
  348. proceedBtn.style.fontWeight = 'bold';
  349.  
  350. cancelBtn.onclick = () => {
  351. modalBg.remove();
  352. fmCheckbox.checked = false;
  353. };
  354.  
  355. proceedBtn.onclick = () => {
  356. modalBg.remove();
  357. fmCheckbox.checked = true;
  358. isFastMode = true;
  359. };
  360.  
  361. btnContainer.appendChild(cancelBtn);
  362. btnContainer.appendChild(proceedBtn);
  363. modalBox.appendChild(modalTitle);
  364. modalBox.appendChild(modalText);
  365. modalBox.appendChild(btnContainer);
  366. modalBg.appendChild(modalBox);
  367. document.body.appendChild(modalBg);
  368. }
  369.  
  370. // --- 3. LOGIC & EXECUTION ---
  371. submitBtn.addEventListener('click', function() {
  372. const x1 = parseInt(inputX1.value.trim(), 10);
  373. const y1 = parseInt(inputY1.value.trim(), 10);
  374. const x2 = parseInt(inputX2.value.trim(), 10);
  375. const y2 = parseInt(inputY2.value.trim(), 10);
  376.  
  377. if (isNaN(x1) || isNaN(y1) || isNaN(x2) || isNaN(y2)) {
  378. alert("Wiper Beta: Invalid input! Make sure all 4 fields contain valid numbers.");
  379. return;
  380. }
  381.  
  382. let minX = Math.min(x1, x2);
  383. let maxX = Math.max(x1, x2);
  384. let minY = Math.min(y1, y2);
  385. let maxY = Math.max(y1, y2);
  386.  
  387. // Convert Tile Chunks bounds to literal character bounds for wiping
  388. if (tileCheckbox.checked) {
  389. minX = minX * 16;
  390. maxX = (maxX * 16) + 15;
  391. minY = minY * 16;
  392. maxY = (maxY * 16) + 15;
  393. }
  394.  
  395. const totalArea = (maxX - minX + 1) * (maxY - minY + 1);
  396.  
  397. if (totalArea > 15000 && !isFastMode) {
  398. if (!confirm(`Warning: You are about to wipe ${totalArea} cells. Proceed?`)) return;
  399. }
  400.  
  401. submitBtn.disabled = true;
  402. submitBtn.style.backgroundColor = '#666';
  403.  
  404. // Optimized state-machine tracking (Prevents lag/browser-crashing on huge areas)
  405. let currentX = minX;
  406. let currentY = minY;
  407. let progress = 0;
  408. let workingSignatureIndex = -1;
  409.  
  410. function processChunk() {
  411. let batchSize = isFastMode ? 750 : 150;
  412. let networkUpdates = [];
  413.  
  414. for (let i = 0; i < batchSize && progress < totalArea; i++) {
  415. let x = currentX;
  416. let y = currentY;
  417.  
  418. let tileX = Math.floor(x / 16);
  419. let tileY = Math.floor(y / 16);
  420. let charX = x % 16;
  421. let charY = y % 16;
  422. if (charX < 0) charX += 16;
  423. if (charY < 0) charY += 16;
  424.  
  425. if (typeof writeCharTo !== "undefined") {
  426. let attempts = [
  427. () => writeCharTo(" ", 0, tileY, tileX, charY, charX),
  428. () => writeCharTo(" ", 0, tileX, tileY, charX, charY),
  429. () => writeCharTo(" ", 0, x, y),
  430. () => writeCharTo(x, y, " ", 0)
  431. ];
  432.  
  433. if (workingSignatureIndex !== -1) {
  434. try {
  435. attempts[workingSignatureIndex]();
  436. } catch (e) {}
  437. } else {
  438. for (let a = 0; a < attempts.length; a++) {
  439. try {
  440. attempts[a]();
  441. workingSignatureIndex = a;
  442. break;
  443. } catch (e) {}
  444. }
  445. }
  446. } else {
  447. // Pre-bundle network updates to prevent websocket lag
  448. networkUpdates.push([tileY, tileX, charY, charX, Date.now(), " ", 0]);
  449. }
  450.  
  451. // Move to next cell mathematically instead of massive arrays
  452. currentX++;
  453. if (currentX > maxX) {
  454. currentX = minX;
  455. currentY++;
  456. }
  457. progress++;
  458. }
  459.  
  460. // Send bundled updates in a single blast if using network fallback
  461. if (networkUpdates.length > 0 && window.network && window.network.sendUpdates) {
  462. window.network.sendUpdates(networkUpdates);
  463. }
  464.  
  465. if (progress < totalArea) {
  466. submitBtn.innerText = `Wiping... ${Math.round((progress / totalArea) * 100)}%`;
  467. // Faster tick speed (5ms vs 15ms) greatly reduces wipe time!
  468. setTimeout(processChunk, isFastMode ? 5 : 15);
  469. } else {
  470. submitBtn.innerText = 'Submit';
  471. submitBtn.disabled = false;
  472. submitBtn.style.backgroundColor = '#222';
  473. console.log(`%cWiper Beta v1.2.1: Successfully wiped ${totalArea} cells.`, 'color: #00ffff;');
  474. }
  475. }
  476.  
  477. processChunk();
  478. });
  479.  
  480. console.log("%cWiper Beta v1.2.1 loaded successfully.", "color: #00ffff; font-weight: bold; font-size: 14px;");
  481. console.log("%cP.S. this is powerful, use with caution!", "color: yellow; font-weight: bold; font-size: 14px;");
  482. })();
Advertisement
Comments
  • smoothretro1982
    66 days
    Comment was deleted
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment