Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local coteporte = "back"
- local colorPipe = "color.bleu"
- local colorPorte = "color.red"
- local colorTel = "color.green"
- local time = 500
- while true do
- print("attente...")
- event,side = os.pullEvent("redstone")
- if event == "redstone" then
- redstone.setBundledOutput("bottom",colorPipe)
- redstone.setBundledOutput("bottom",colorPorte)
- print("Porte ouverte")
- event,side = os.pullEvent("redstone")
- if side == coteporte then
- redstone.setBundledOutput("bottom",0)
- print("Porte fermΓ©")
- redstone.setBundledOutput("bottom",colorPipe)
- sleep(time)
- redstone.setBundledOutput("bottom",colorTel)
- redstone.setBundledOutput("bottom",0)
- print("Tp")
- end
- turtle.drop()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement