Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- monitor = peripheral.wrap("left")
- term.redirect(monitor)
- local function PrintCenter(msg)
- local msgLen = string.len(msg)
- local screenWidth,_ = term.getSize()
- local xCoords = tonumber(math.ceil((screenWidth / 2) - (msgLen / 2)))
- local yCoords = 10
- term.setCursorPos(xCoords,yCoords)
- end
- function touch()
- if os.pullEvent("monitor_touch")
- then shell.run("rom/programs/secret/alongtimeago")
- end
- end
- function text()
- monitor.setTextScale(1)
- PrintCenter("[Play]")
- print("[Play]")
- end
- while true do
- text()
- touch()
- end
Add Comment
Please, Sign In to add comment