StarletHolo

Fake Spiral "Virus" for computercraft Version 0.1

Mar 30th, 2025
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | Gaming | 0 0
  1.  
  2. term.setBackgroundColor(colors.black)
  3. term.clear()
  4.  
  5. local width, height = term.getSize()
  6. local chars = {"@", "#", "$", "%", "&", "*", "=", "?", "!", "/", "\\", "|"}
  7. local messages = {
  8. "YOU CANNOT ESCAPE.",
  9. "I SEE YOU.",
  10. "THERE IS NO HOPE.",
  11. "IT'S TOO LATE.",
  12. "DON'T BOTHER FIGHTING.",
  13. "YOUR FATE IS SEALED."
  14. }
  15.  
  16. -- Function to flicker ASCII on the screen
  17. local function flicker()
  18. while true do
  19. for _ = 1, math.random(10, 50) do
  20. local x = math.random(1, width)
  21. local y = math.random(1, height)
  22. local char = chars[math.random(1, #chars)]
  23. term.setCursorPos(x, y)
  24. term.setTextColor(colors.white)
  25. term.write(char)
  26. end
  27. sleep(0.1)
  28. term.clear()
  29. end
  30. end
  31.  
  32. -- Block user input with persistent scary messages
  33. local function blockInput()
  34. while true do
  35. local event, key = os.pullEvent("key")
  36. term.setCursorPos(1, height)
  37. term.setTextColor(colors.red)
  38. term.write(messages[math.random(1, #messages)])
  39. sleep(1)
  40. end
  41. end
  42.  
  43. -- Check for floppy to restore access
  44. local function checkFloppy()
  45. while true do
  46. local event, side = os.pullEvent("disk")
  47. if disk.isPresent(side) and fs.exists("disk/startup") then
  48. term.setBackgroundColor(colors.black)
  49. term.clear()
  50. term.setCursorPos(1, 1)
  51. print("Floppy detected. Restoring access...")
  52. sleep(2)
  53. fs.delete("startup")
  54. fs.copy("disk/startup", "startup")
  55. os.reboot()
  56. end
  57. end
  58. end
  59.  
  60. -- Start everything in parallel
  61. parallel.waitForAny(flicker, blockInput, checkFloppy)
  62.  
  63.  
Advertisement
Add Comment
Please, Sign In to add comment