View difference between Paste ID: kjqZfssi and tUerE8gx
SHOW: | | - or go back to the newest paste.
1
os.loadAPI("ocs/apis/sensor")
2
 
3
--LATO SENSORE
4-
se = sensor.wrap("top")
4+
se = sensor.wrap("back")
5
cb = peripheral.wrap("right")
6-
--LATO ATTIVAZIONE REDSTONE QUANDO SQUILLA L'ALLARME
6+
  
7-
lato = "right"
7+
8-
ritardo = 0
8+
9
giocatore1 = "lor54"
10
giocatore2 = "Kiiw"
11-
--INSERIRE QUI LA API-KEY
11+
12-
api1 = ""
12+
13
14
emailMandata = 0
15-
giocatore1 = ""
15+
16-
giocatore2 = ""
16+
17
ta = se.getTargets()
18
for k,v in pairs(ta) do
19
if v["Name"] == "Player" and k ~= "lego11" and k ~= giocatore1 and k ~= giocatore2 and k ~= giocatore3 then
20
print("Rilevato giocatore non autorizzato: "..k)
21
cb.setCommand("kill "..k)
22
cb.runCommand()
23
sleep(0.1)
24
end
25
end
26
sleep(1)
27-
rs.setOutput(lato, true)
27+