FoxWorn3365

MERDOR_REMOTE_DOOR

May 31st, 2021 (edited)
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Made by FoxWorn3365
  2.  
  3. os.loadAPI("ocs/apis/sensor")
  4.  
  5. --LATO SENSORE
  6. se = sensor.wrap("top")
  7.  
  8. --LATO ATTIVAZIONE REDSTONE QUANDO SQUILLA L'ALLARME
  9. lato = "back"
  10. ritardo = 0
  11.  
  12. --GIOCATORI PER CUI L'ALLARME NON SI ATTIVA
  13. giocatore1 = "djcrash01"
  14. giocatore2 = "LORDMALARIA1"
  15. giocatore3 = ""
  16. giocatore4 = ""
  17. giocatore5 = ""
  18.  
  19. rs.setOutput(lato, true)
  20. os.loadAPI("ocs/apis/sensor")
  21. while true do
  22. local rsout = rs.getInput("front")
  23. ta = se.getTargets()
  24. for k,v in pairs(ta) do
  25. if v["Name"] == "Player" and k ~= "lego11" and k ~= giocatore1 and k ~= giocatore2 and k ~= giocatore3 and k ~= giocatore4 and k ~= giocatore5 then
  26. print("Rilevato giocatore non autorizzato: "..k)
  27. rs.setOutput(lato, false)
  28. sleep(1)
  29. else
  30. rs.setOutput(lato, true)
  31. sleep(1)
  32. end
  33. end
  34. end
Add Comment
Please, Sign In to add comment