Advertisement
guitarplayer616

Untitled

Dec 5th, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. os.loadAPI("GIF")
  2. local image = GIF.loadGIF("new")
  3.  
  4. local mon = peripheral.find("monitor")
  5. mon.setTextScale(0.5)
  6. term.redirect(mon)
  7.  
  8. local x, y = term.getSize()
  9.  
  10. if x < image.width or y < image.height then
  11.         if x < math.floor(y / image.height * image.width) then
  12.                 image = GIF.resizeGIF(image, x)
  13.         else
  14.                 image = GIF.resizeGIF(image, nil, y)
  15.         end
  16. end
  17.  
  18. GIF.animateGIF(image)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement