smoothretro1982

walledit console script

Jun 6th, 2026 (edited)
136
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. const sel = new RegionSelection
  2. sel.onSelection(function(sx, sy, ex, ey) {
  3. const d = Date.now()
  4. let s = 0
  5. let c = 0
  6. for (let y = sy; y <= ey; y++) {
  7. for (let x = sx; x <= ex; x++) {
  8. if (getCharInfoXY(x, y).char !== " ") {
  9. s = writeCharAt(" ", 0, x, y)
  10. if (s !== 0) {
  11. c += 1
  12. }
  13. }
  14. }
  15. }
  16. w.showToast(`Region voided: ${sx}, ${-sy} to ${ex}, ${-ey}
  17. Time taken: ${(Date.now()-d)/1000} seconds
  18. Chars successfully cleared: ${c}/${(ex-sx+1)*(ey-sy+1)}`, 1500)
  19. })
  20. sel.startSelection()
  21.  
Tags: tw.2s4.me
Advertisement
Comments
Add Comment
Please, Sign In to add comment