Advertisement
colhaydutu

Untitled

Jan 6th, 2024 (edited)
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. local radar = peripheral.wrap("bottom")
  2.  
  3.  
  4. while true do
  5. redstone.setOutput("top", false)
  6. local players = radar.getPlayers()
  7.  
  8. for i = 1, #players do
  9. local playerName = players[i]["name"]
  10. local distance = players[i]["distance"]
  11.  
  12. if (playerName == "ETvd" or playerName == "Dirty_Bregman") and distance < 4 then
  13. redstone.setOutput("top", true)
  14. sleep(2)
  15. end
  16. end
  17.  
  18. sleep(0.1)
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement