Advertisement
FoxWorn3365

MERDOR

May 28th, 2021
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sleep(5)
  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 = "right"
  10. ritardo = 0
  11.  
  12. --GIOCATORI PER CUI L'ALLARME NON SI ATTIVA
  13. giocatore1 = ""
  14. giocatore2 = ""
  15. giocatore3 = ""
  16. giocatore4 = ""
  17.  
  18. local rsout = rs.getInput("back")
  19. rs.setOutput(lato, false)
  20. os.loadAPI("ocs/apis/sensor")
  21. while true do
  22. ta = se.getTargets()
  23. for k,v in pairs(ta) do
  24. if v["Name"] == "Player" and k ~= "lego11" and k ~= giocatore1 and k ~= giocatore2 and k ~= giocatore3 and k ~= giocatore4 and k ~= "FoxWorn3365" then
  25. print("Rilevato giocatore non autorizzato: "..k)
  26. if rsout == true then
  27. rs.setOutput(lato, true)
  28. sleep(0.3)
  29. rs.setOutput(lato, false)
  30. print("Zappato!")
  31. end
  32. end
  33. sleep(2)
  34. end
  35. end
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement