Advertisement
Guest User

startup

a guest
Jan 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. rs.setOutput("right", true)
  2. os.loadAPI("GIF")
  3.  
  4. local mon = peripheral.find("monitor")
  5.  
  6. local gifs = fs.find("*.gif")  -- Note: fs.find() is case-sensitive, even if your file system isn't.
  7.  
  8. mon.setTextScale(0.5)
  9. local x, y = mon.getSize()
  10.  
  11. while true do for i = 1, #gifs do
  12.         local image = GIF.loadGIF(gifs[i])
  13.         mon.setBackgroundColour(image[1].transparentCol or image.backgroundCol)
  14.         mon.clear()
  15.        
  16.         parallel.waitForAny(
  17.                 function()
  18.                         GIF.animateGIF(image, math.floor((x - image.width) / 2) + 1, math.floor((y - image.height) / 2) + 1, mon)
  19.                 end,
  20.                
  21.                 function()
  22.                         sleep(10)
  23.                 end
  24.         )
  25. end end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement