Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local radar = peripheral.wrap("top")
- redstone.setOutput("back",true)
- while true do
- local players = radar.getPlayers()
- for i = 1, #players do
- local playerName = players[i]["name"]
- local distance = players[i]["distance"]
- if (playerName == "colhaydutu" or playerName == "989598") and distance < 4 then
- redstone.setOutput("back", false)
- sleep(3)
- else
- redstone.setOutput("back", true)
- end
- end
- sleep(0.1)
- redstone.setOutput("back", true)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement