Advertisement
Guest User

startup

a guest
May 28th, 2021
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.81 KB | None | 0 0
  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 = "Ghostmike_"
  15. giocatore3 = "Lay4play"
  16. giocatore4 = "Materasso"
  17. giocatore5 = ""
  18.  
  19. local rsout = rs.getInput("back")
  20. rs.setOutput(lato, false)
  21. os.loadAPI("ocs/apis/sensor")
  22. while true do
  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 ~= "FoxWorn3365" then
  26. print("Rilevato giocatore non autorizzato: "..k)
  27. if rsout == true then
  28. rs.setOutput(lato, true)
  29. sleep(0.3)
  30. rs.setOutput(lato, false)
  31. print("Zappato!")
  32. end
  33. end
  34. sleep(2)
  35. end
  36. end
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement