Advertisement
FriedToes

Untitled

Jan 7th, 2023 (edited)
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. -- inital start
  2. currentBackgroundColor = "colors.gray"
  3.  
  4. function mainProcess()
  5. while true do
  6. if not fs.exists("fileData") then
  7. currentBackgroundColor = "colors.lime"
  8. term.setBackgroundColor(currentBackgroundColor)
  9. end
  10. end
  11. end
  12.  
  13. function delData()
  14. while true do
  15. repeat
  16. local _, key = os.pullEvent("key")
  17. until key == keys.d
  18. term.setBackgroundColor("colors.red")
  19. os.sleep(.1)
  20. term.setBackgroundColor(currentBackgroundColor)
  21. end
  22. end
  23.  
  24. parallel.waitForAll(mainProcess, delData)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement