Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alarmed = false
- inSignal = "left"
- outSound = "right"
- outLight = "back"
- while true do
- if rs.getInput(inSignal, true) then
- if alarmed == false then
- -- print("Alarm")
- rs.setOutput(outSound, true)
- rs.setOutput(outLight, true)
- alarmed = true
- sleep(1.8)
- else
- -- print("Alarm already sounded")
- rs.setOutput(outSound, false)
- rs.setOutput(outLight, true)
- end
- else
- -- print("No alarm")
- rs.setOutput(outSound, false)
- rs.setOutput(outLight, false)
- alarmed = false
- end
- sleep(1)
- end
- --RabaGhast
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement