Advertisement
colhaydutu

atm door radar

Jan 23rd, 2024 (edited)
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. local sensor = peripheral.wrap("left")
  2.  
  3. while true do
  4.  
  5. redstone.setOutput("bottom", false)
  6. redstone.setOutput("top", false)
  7. local playersInRange = sensor.getPlayersInRange(2)
  8.  
  9.  
  10. for _, player in ipairs(playersInRange) do
  11. print("Player " .. player)
  12. if player == "colhaydutu" or player == "ETvd" or player == "Lenny53" then
  13. redstone.setOutput("top", true)
  14.  
  15. sleep(3)
  16.  
  17.  
  18. else
  19.  
  20. redstone.setOutput("bottom", true)
  21. sleep(1)
  22. redstone.setOutput("bottom", false)
  23. end
  24. end
  25.  
  26.  
  27.  
  28.  
  29.  
  30. os.sleep(0.1)
  31.  
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement