Advertisement
MrHG

bgc

Nov 29th, 2022
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. local args = { ... }
  2.  
  3. print(args[1])
  4.  
  5. if args[1] == "orange" then color = colors.orange
  6. elseif args[1] == "magenta" then color = colors.magenta
  7. elseif args[1] == "lightblue" then color = colors.lightBlue
  8. elseif args[1] == "yellow" then color = colors.yellow
  9. elseif args[1] == "lime" then color = colors.lime
  10. elseif args[1] == "pink" then color = colors.pink
  11. elseif args[1] == "gray" then color = colors.gray
  12. elseif args[1] == "lightgray" then color = colors.lightgray
  13. elseif args[1] == "cyan" then color = colors.cyan
  14. elseif args[1] == "purple" then color = colors.purple
  15. elseif args[1] == "blue" then color = colors.blue
  16. elseif args[1] == "brown" then color = colors.brown
  17. elseif args[1] == "green" then color = colors.green
  18. elseif args[1] == "red" then color = colors.red
  19. elseif args[1] == "black" then color = colors.black
  20. elseif args[1] == "white" then color = colors.white
  21. end
  22.  
  23. monitor = peripheral.wrap("monitor_1")
  24.  
  25. if monitor.isColor() then
  26. monitor.setBackgroundColor(color)
  27. monitor.clear()
  28. os.pullEvent("key")
  29. monitor.setBackgroundColor(colors.black)
  30. monitor.clear()
  31. end
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement