Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("right")
- m.clear()
- m.setCursorPos(1,1)
- 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
- y2 = 1
- while true do
- if pos = 10 then
- pos = 1
- end
- m.clear()
- m.setCursorPos(1, y2)
- m.setTextColor(colors.yellow)
- centerText("Welcome to TheSommer's Base!")
- m.setCursorPos(1, y2 + 1)
- centerText("If you need anything, you're welcome to borrow.")
- m.setCursorPos(1, y2 + 3)
- m.setTextColor(colors.lightBlue)
- centerText("youtube.com/TheSommersMC")
- m.setCursorPos(1, y2 + 5)
- m.setTextColor(colors.lime)
- centerText("<3 Sommer")
- y2 = y2 + 1
- os.sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement