Advertisement
Guest User

Untitled

a guest
Jan 8th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. local gpu = require("component").gpu
  2. local thread = require("thread")
  3. local term = require("term")
  4.  
  5. term.clear()
  6. local maxx, maxy = gpu.getResolution()
  7. local table = {"▖", "▌", "▛","█", n=4}
  8.  
  9. local function change(x, y, table)
  10.   place = 0
  11.   for place = 1, table.n do
  12.     gpu.set(x, y, table[place])
  13.     os.sleep(0.2)
  14.   end
  15. end
  16.  
  17. t = {}
  18. tablept = 1
  19.  
  20. for x = 1, maxx do
  21.   for y = 1, maxy do
  22.     t[tablept] = thread.create(function(x, y, table)
  23.       change(x, y, table)
  24.     end, x, y, table)
  25.     os.sleep(0.001)
  26.     tablept = tablept+1
  27.   end
  28. end
  29.  
  30. thread.waitForAll(t)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement