Advertisement
Guest User

startup

a guest
May 29th, 2021
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 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 = "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.  
  18. local rsout = rs.getInput("front")
  19. rs.setOutput(lato, true)
  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, false)
  28. sleep(0.1)
  29. rs.setOutput(lato, true)
  30. print("Zappato!")
  31. end
  32. end
  33. sleep(2)
  34. end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement