Advertisement
Guest User

QGlass 2.0

a guest
Sep 21st, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. QGlass=peripheral.wrap("right")
  2. function Update()
  3.     global time = textutils.formatTime(os.time(), false)
  4.     local a,command = os.pullEvent("chat_command")
  5.     QGlass.clear()
  6. end
  7. function CreateBox(x,y,sizex,sizey,color)
  8.     QGlass.addBox(sizex,sizey,x,y,color,0.2)
  9. end
  10.  
  11. function Write(x,y,text,color)
  12.     QGlass.addText(x,y,text,color)
  13. end
  14. local a,command = os.pullEvent("chat_command")
  15. while command  ~="Exit" do
  16. Update()
  17. CreateBox(1,1,5,0x000000)
  18. Write(2,1,time,0xFFFFFF)
  19. sleep(1)
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement