Advertisement
ZathegamE

proximity door.lua

Apr 23rd, 2024
783
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. localdetector = peripheral.find("environmentDetector")
  2. entities = localdetector.scanEntities(2.5)
  3. while true do
  4. entities = localdetector.scanEntities(2.5)
  5. if entities ~= nil
  6. then print(#entities)
  7.     if #entities >= 1 then
  8.     redstone.setOutput("back",true)
  9.     else
  10.     rs.setOutput("back",false)
  11. end
  12. end
  13. sleep(0.5)
  14.  
  15. end
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement