Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- term.clear()
- term.setCursorPos(1, 1)
- local colors = {"yellow","lightBlue","lime", "magenta", "orange", "white", "black"}
- print("Tape ton texte a affiche")
- local input = read()
- monitor = peripheral.wrap("top")
- if input == "0001" then
- term.clear()
- term.setCursorPos(1, 1)
- print("Deconnexion en cours")
- sleep("5")
- shell.exit()
- print("OK")
- else
- term.clear()
- term.setCursorPos(1, 1)
- local rand = math.random(0, 7)
- local colors1 = colors[rand]
- print("Couleur choisi: " .. colors1)
- print("Affichage du message " .. input)
- monitor.clear()
- monitor.setCursorPos(1, 1)
- monitor.setBackgroundColor(colors.lime)
- monitor.write(input)
- sleep(5)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement