Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local p = peripheral.wrap("left")
- local ent = rs.getInput("bottom")
- local entColors = { colors.purple, colors.green, colors.brown, colors.blue, colors.red, colors.cyan, colors.lightgrey, colors.grey, colors.pink }
- local killCount = 1
- local panic = false
- local function engage()
- while not panic do
- os.pullEvent("redstone")
- while rs.getInput("back") == true do
- rs.setOutput("top", true)
- local function mobloop()
- if killCount == 1 then
- p.setBundledOutput(entColors[killCount])
- killCount = + 1
- end
- end
- end
- end
- end
- local function reset()
- while true do
- os.pullEvent("redstone")
- while rs.getInput("right") == true do
- panic = true
- end
- end
- end
- while true do
- parallel.waitForAny(engage, reset)
- if panic then
- rs.setOutput("top", false)
- os.reboot()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment