Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- local side = "back"
- local password = "1"
- local vypnout = "2"
- while true do
- term.clear()
- term.setCursorPos(1,1)
- write("Co chcete udelat se svetly? ")
- print("-------------------")
- print("1) Zapnout")
- print("2) Vypnout")
- print("Napiste cislo, bez zavorky napr. 1")
- local input = read("")
- if input == password then
- term.clear()
- term.setCursorPos(1,1)
- print("Zapinam svetla!")
- print("Prosim vypnete svetla, az budete koncit.)
- rs.setOutput(side,true)
- else if input == vypnout
- print("Vypinam svetla!")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement