Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.wrap("left")
- if not monitor then
- error("No monitor...!")
- end
- function clear(y)
- monitor.setBackgroundColor(colours.black)
- monitor.clear()
- monitor.setCursorPos(1, y or 1)
- end
- local size = monitor.setTextScale
- local cwrite = function(txt,y)
- local sx,sy = (monitor or term).getSize()
- local cx,cy = (monitor or term).getCursorPos()
- monitor.setCursorPos((sx/2)-math.floor(#txt/2), y or cy)
- return (monitor or term).write(txt)
- end
- local fadeCwrite = function(txt,y,delay,noFadeOut)
- delay = delay or 3
- local pCol = monitor.getTextColor()
- local cols = {
- colors.black,
- colors.gray,
- colors.lightGray,
- colors.white,
- }
- for a = 1, #cols do
- monitor.setTextColor(cols[a])
- cwrite(txt,y)
- sleep(0.1)
- end
- if not noFadeOut then
- sleep(delay)
- for a = #cols, 1, -1 do
- monitor.setTextColor(cols[a])
- cwrite(txt,y)
- sleep(0.1)
- end
- end
- monitor.setTextColor(pCol)
- end
- term.clear()
- term.setCursorPos(1,1)
- print("Displaying sign.")
- clear()
- while true do
- -- clear(1)
- sleep(0.1)
- -- size(2)
- -- cwrite("Storage",1)
- -- cwrite("House",2)
- fadeCwrite("Storage House",1,3,false)
- -- sleep(2)
- -- clear(2)
- sleep(0.1)
- -- size(2)
- -- cwrite("Rent your own",1)
- -- cwrite("Storage Room",2)
- -- sleep(3)
- fadeCwrite("Rent your own",1,0.5,true)
- fadeCwrite(" storage room",2,3,false)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement