Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local user = { "user1", "user2", "user3" }
- local component = require("component")
- local event = require("event")
- local Locked = true
- local os = require("os")
- local gpu = component.gpu
- function Main()
- gpu.setResolution(40, 20)
- gpu.fill(1, 1, 40, 20, " ")
- gpu.setForeground(0x00FF00)
- gpu.set(16, 10, "LOCKED")
- Listen()
- end
- function Listen()
- while true do
- local _, Addr, X, Y, But, Name = event.pull("touch")
- if (Name == "Jarverain") then
- if (Locked == true) then
- gpu.fill(1, 1, 40, 20, " ")
- gpu.setForeground(0x00FF00)
- gpu.set(16, 10, "Access Granted")
- Locked = false
- else
- gpu.fill(1, 1, 40, 20, " ")
- gpu.setForeground(0x00FF00)
- gpu.set(16, 10, "LOCKED")
- Locked = true
- end
- end
- end
- end
- Main()
Add Comment
Please, Sign In to add comment