computercraft pastebin local indexes = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "b", "c", "d", "e", "f"} local palette = {} local monitor = peripheral.wrap("right") local w, h = monitor.getSize() local buffer = window.create(monitor, 1, 1, w, h, true) function makePalette() local colorNum = 1 local monitor = peripheral.wrap("right") for colorName, colorId in pairs(colors) do if type(colorId)=="number" then computercraft pastebin PasteShr computercraft pastebin buffer.setPaletteColor(colors[colorName], colorNum/16, colorNum/16, colorNum/16) --buffer.setPaletteColor(colors[colorName], 0, 0, 0) palette[indexes[colorNum]] = colorId print(indexes[colorNum].." is now "..colorName.." with color "..colorNum*20) colorNum = colorNum+1 end end end function drawImage(file, width, height) computercraft pastebin PasteShr computercraft pastebin buffer.setVisible(false) for x = 1, width do for y = 1, height do paintutils.drawPixel(x, y, palette[file.read()]) end end buffer.setVisible(true) end function playMovie(path) computercraft pastebin How to dowload it? computercraft pastebin local file = fs.open(path, "r") local dimensions = "" local width, height while true do local char = file.read() dimensions = dimensions..char if char == ":" then break end end width = tonumber(dimensions:match("%d*[%x]")) height = tonumber(dimensions:match("([%x]%d*)[%:]")) computercraft pastebin How to get it? computercraft pastebin term.native().write(width.." "..height) while true do drawImage(file, width, height) sleep(0.1) end end term.redirect(buffer) monitor.setTextScale(0.5) makePalette() computercraft pastebin How to use it? computercraft pastebin playMovie("movie") computercraft pastebin