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