Advertisement
natie3

Wave

Aug 10th, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.39 KB | None | 0 0
  1. x = 0
  2. y = 1
  3. while true do
  4.   for i = 1, 20 do
  5.     x = x + 1
  6.     if x == 20 then
  7.       x = 2
  8.     end
  9.     y = x
  10.     if x > 10 then
  11.       y = 20 - x
  12.     end    
  13.     for j = 1, y do
  14.       if j ~= y then
  15.         write("#")
  16.       else
  17.         write(">")
  18.       end
  19.     end
  20.     if i ~= 20 then
  21.       print(" ")
  22.     end
  23.   end
  24.   os.sleep(0.15)
  25.   term.clear()
  26.   term.setCursorPos(1,1)
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement