Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --courtesy of Bomb Bloke
- local function oc(state)
- redstone.setOutput("back", state)
- redstone.setOutput("front", state)
- end
- while true do
- if redstone.getInput("left") or redstone.getInput("right") then
- oc(false)
- os.pullEvent("redstone") -- Yield until a redstone state change occurs.
- else
- oc(commands.exec("testfor @a[r=3]"))
- sleep(0.2) -- Bigger sleep here = less server load, but less frequent checks.
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement