Advertisement
Sandgunslinger

Text Tunnel

Nov 22nd, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.80 KB | None | 0 0
  1. local spin = 50
  2. local cut = 9
  3. local left = ""
  4. local right = ""
  5. local direction = true
  6. local start = ""
  7. local finish
  8. for j = 1, cut - 3 do
  9.     start = start .. " "
  10. end
  11. print(start .. "start")
  12. for i = 1, 100 do
  13.     for j = 1, cut - 1 do
  14.         left = left .. "-"
  15.     end
  16.     for j = 1, spin - cut do
  17.         right = right .. "-"
  18.     end
  19.     print(left .. " " .. right)
  20.     left = ""
  21.     right = ""
  22.     if direction == true then
  23.         cut = cut + 1
  24.     elseif direction == false then
  25.         cut = cut - 1
  26.     end
  27.     if cut == spin - 1 and direction == true then
  28.         direction = false
  29.     elseif cut == 2 and direction == false then
  30.         direction = true
  31.     end
  32.     finish = ""
  33.     for j = 1, cut - 3 do
  34.         finish = finish .. " "
  35.     end
  36. end
  37. print(finish .. "finish")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement