Advertisement
Benn200022

Untitled

Aug 22nd, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. local m = peripheral.wrap("left")
  2.  
  3. local myTimer = os.startTimer(1)
  4. local perc = 0
  5. while true do
  6. local event, timerID = os.pullEvent("timer")
  7. if timerID == myTimer then
  8. perc = perc + 10
  9.  
  10. m.clear()
  11. m.setTextScale(1)
  12. m.setCursorPos(1,1)
  13. m.setTextColour(512)
  14. m.setBackgroundColor(colors.lime)
  15. for i=1, perc do
  16. m.write(" ")
  17. end
  18. m.setBackgroundColor(colors.black)
  19. myTimer = os.startTimer(1)
  20. end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement