xXm0dzXx

Fancy Shutdown

Nov 11th, 2012
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. print("Goodbye.")
  2. sleep(0.5)
  3. local pixels = {}
  4. local x,y = term.getSize()
  5.  
  6. term.setBackgroundColour( colors.white )
  7. while true do
  8. for i=1,50 do
  9. local curX = math.random(x)
  10. local curY = math.random(y)
  11. local maxPixels = x*y
  12. if #pixels < maxPixels then
  13. term.setCursorPos( curX, curY )
  14. write(" ")
  15. pixels[x.. "/" ..y] = true
  16. else
  17. os.shutdown()
  18. end
  19. end
  20. sleep(0)
  21. end
Advertisement
Add Comment
Please, Sign In to add comment