Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p=peripheral.wrap("top")
- args={...}
- file=args[1]
- color={}
- color[" "]=14
- color["0"]=14
- color["1"]=15
- color["2"]=16
- color["3"]=17
- color["4"]=18
- color["5"]=19
- color["6"]=20
- color["7"]=21
- color["8"]=22
- color["9"]=23
- color["a"]=24
- color["b"]=25
- color["c"]=26
- color["d"]=27
- color["e"]=28
- color["f"]=29
- fp=fs.open(file,"r")
- img=fp.readAll()
- i=1
- for x=0,63 do
- for z=0,63 do
- tint=color[string.sub(img,i,i)]
- if tint~=nil then
- p.setPoint(x,z,1,254-x,tint)
- p.setPoint(x,z,0,255-x,tint)
- else
- p.setPoint(x,z,1,255,tint)
- end
- i=i+1
- end
- end
Add Comment
Please, Sign In to add comment