Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sleep(5)
- os.loadAPI("ocs/apis/sensor")
- --LATO SENSORE
- se = sensor.wrap("top")
- --LATO ATTIVAZIONE REDSTONE QUANDO SQUILLA L'ALLARME
- lato = "right"
- ritardo = 0
- --GIOCATORI PER CUI L'ALLARME NON SI ATTIVA
- giocatore1 = ""
- giocatore2 = ""
- giocatore3 = ""
- giocatore4 = ""
- local rsout = rs.getInput("back")
- rs.setOutput(lato, false)
- os.loadAPI("ocs/apis/sensor")
- while true do
- ta = se.getTargets()
- for k,v in pairs(ta) do
- if v["Name"] == "Player" and k ~= "lego11" and k ~= giocatore1 and k ~= giocatore2 and k ~= giocatore3 and k ~= giocatore4 and k ~= "FoxWorn3365" then
- print("Rilevato giocatore non autorizzato: "..k)
- if rsout == true then
- rs.setOutput(lato, true)
- sleep(0.3)
- rs.setOutput(lato, false)
- print("Zappato!")
- end
- end
- sleep(2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement