Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.find("monitor")
- function display(message,x,y,speed)
- monitor.setTextScale(5)
- monitor.clear()
- monitor.setCursorPos(x,y)
- monitor.write(message)
- os.sleep(speed)
- end
- function displayText()
- if monitor then
- local message = "Vive la démocratie"
- local speed = 0.1
- local width, height = monitor.getSize()
- local y = math.floor((height/2)-1)
- local x = width
- print(x)
- print(y)
- while x > -string.len(message) do
- display(message,x,y,speed)
- x = x - 1
- end
- displayText()
- else
- print("Pas d'écran en sah")
- end
- end
- displayText()
Advertisement
Add Comment
Please, Sign In to add comment