Advertisement
asteroidsteam

LSD

Apr 1st, 2018
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.73 KB | None | 0 0
  1. local tx,ty = term.getSize()
  2. local tArgs = {...}
  3. function lsd()
  4.   for i=1,ty do
  5.     term.setCursorPos(1,i)
  6.     for x=1,tx do
  7.       term.setCursorPos(x,i)
  8.       local color = {
  9.       [1] = colors.red,
  10.       [2] = colors.blue,
  11.       [3] = colors.green,
  12.       [4] = colors.pink,
  13.       [5] = colors.orange,
  14.       [6] = colors.gray,
  15.       [7] = colors.yellow,
  16.       [8] = colors.purple
  17.       }
  18.       term.setBackgroundColor(color[math.random(1,8)])
  19.       write(" ")
  20.     end
  21.   end
  22. end
  23. for i=1,50 do
  24.   lsd()
  25.   os.sleep(0.01)
  26. end
  27. term.setBackgroundColor(colors.black)
  28. term.clear()
  29. term.setCursorPos(1,1)
  30. cmd = ""
  31. if #tArgs == 0 then
  32.  
  33. else
  34.   for i=1,#tArgs do
  35.     cmd = cmd.." "..tArgs[i]
  36.   end
  37.   shell.run(cmd)
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement