Advertisement
LokeYourLord

Player Alarm

Jun 26th, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SensorS = peripheral.wrap("top")
  2. users = {"LokeYourLord","Death_Rever090"}
  3. while true do
  4. rs.setOutput("right", false)
  5. Alarm = false
  6. --Check for players
  7. for value,name in pairs(users) do
  8. for T,PlayerTable in pairs(SensorS.getPlayers()) do
  9. if PlayerTable.name==name then
  10. rs.setOutput("right", false)
  11. else
  12. rs.setOutput("right", false)
  13. Alarm = true
  14. end
  15. end
  16. end
  17. if Alarm then
  18. rs.setOutput("right", true)
  19. end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement