View difference between Paste ID: wvGUk2RX and cUg5wCaY
SHOW: | | - or go back to the newest paste.
1
local com =require("component")
2
local event =require("event")
3
local reader = com.os_magreader
4
local door =com.os_door
5
local pc = require("computer")
6-
local whitelist = {marko_rus ="5d2719f6-1b8a-40a7-8648-514e8c4f3957",
6+
local whitelist = {marko_rus ="1", chokopypsik ="1"}
7-
chokopypsik ="1"}
7+
8
_,_, name, data, uid = event.pull("magData")
9
if whitelist[name] == "1" then print("yes") 
10-
if whitelist[name] == uid then print("yes") 
10+
11
local lvl = string.gsub(data, name, "")
12
if lvl == " 1" or lvl == " 2" or lvl == " 3" or lvl == " 4" or lvl == " 5" then
13
door.toggle()
14
pc.beep(800)
15
pc.beep(880)
16
os.sleep(1,5)
17
pc.beep(880)
18
pc.beep(800)
19
door.toggle()
20
else pc.beep(500, 1) end
21
else pc.beep(500)
22
os.sleep(0,25)
23
pc.beep(500)end
24
print(whitelist[name])
25
else pc.beep(800)
26
pc.beep(880)
27
end
28
end