Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- local detector = peripheral.find("playerDetector")
- local playerList = detector.getPlayersInRange(7)
- count = 0
- for _ in pairs(playerList) do count = count + 1 end
- print("count")
- if(count == 0) then
- redstone.setOutput("top", false)
- print("no")
- end
- for k,v in pairs(playerList) do
- redstone.setOutput("top", true)
- print("yes")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment