FoxWorn3365

ENDORTarocco

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