Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Simple script to display a message on a monitor
- -- Find the monitor connected to the computer
- -- "top", "bottom", "left", "right", "front", "back" are valid sides
- local monitor = peripheral.find("monitor")
- -- Check if a monitor was actually found
- if monitor == nil then
- print("Error: No monitor attached!")
- return -- Stop the script if no monitor is found
- end
- -- Clear the monitor of any previous text
- monitor.clear()
- -- Set the cursor to the top-left corner (position 1, 1)
- monitor.setCursorPos(1, 1)
- -- Write the message to the monitor
- monitor.write("Haydens Home")
Advertisement
Add Comment
Please, Sign In to add comment