Advertisement
Lladnar45

Room Signs

Mar 5th, 2022 (edited)
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. local monitor = peripheral.wrap("monitor_##")
  2.  
  3. local i = 0
  4.  
  5. function getRandColour()
  6.     if i == 0 then
  7.         i = 1
  8.         return colours.red
  9.     elseif i == 1 then
  10.         i = 2
  11.         return colours.blue
  12.     elseif i == 2 then
  13.         i = 3
  14.         return colours.yellow
  15.     else
  16.         i = 0
  17.         return colours.grey
  18.     end
  19. end
  20.  
  21. while (true) do
  22.    
  23. monitor.clear()
  24.    
  25. monitor.setCursorPos(1,1)
  26.    
  27. monitor.setTextScale(1.7)
  28.    
  29. monitor.setTextColor(getRandColour())
  30.    
  31. monitor.write("MESSAGE HERE")
  32.    
  33. monitor.setCursorPos(1,2)
  34.    
  35. monitor.write("Access Level #")
  36.    
  37. os.sleep(1)
  38.  
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement