Advertisement
TechManDylan

PlayerFinder

May 31st, 2022 (edited)
806
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | None | 0 0
  1. local detector = peripheral.find("playerDetector")
  2.  
  3. if detector == nil then error("playerDetector not found") end
  4.  
  5. while true do
  6.  
  7. if detector.isPlayersInRange(8) == true then redstone.setOutput("back",true, 15) else redstone.setOutput("back",false)
  8. end
  9. sleep(1)
  10.  
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement