Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- Name = (args[1])
- local pos = 10
- mon = peripheral.wrap("left") -- Replace side with the side that the monitor is on
- mon.clear()
- color = 1
- mon.setBackgroundColor(color)
- mon.setTextColor(32768) -- This makes the text black the full list is on the CC wiki
- mon.setTextScale(5) -- This is the largest text scale you can make
- while true do
- if pos==-10 then
- pos = 10
- end
- mon.clear()
- mon.setCursorPos(pos,1)
- mon.write(Name)
- pos = pos-1
- os.sleep(0.15) -- Replace 0.15 with any number you want (In seconds)
- if (color < 16000) then
- color = color + color
- else
- color = 1
- end
- mon.setBackgroundColor(color)
- end
- local function centerText(text)
- x,y = m.getSize()
- x1,y1 = m.getCursorPos()
- m.setCursorPos((math.floor(x/2) - (math.floor(#text/2))), y1)
- m.write(text)
- end
- --Call function "centerText("")" to set text
- --Use m.setCursorPos(1,y) to choose placement on screen
- m.setTextColor(colors.yellow)
- centerText("APPLY")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement