Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function leave()
- local pin = "1234"
- gpu.fill(1,1,20,5," ")
- gpu.setForeground(0xFF0000)
- gpu.set(2,2,"Enter PIN:")
- gpu.set(2,4,"_ _ _ _")
- local num = 1
- local col = 2
- local inpin
- while ture do
- local ka,ch,co,pn = event.pull(20,"key_down")
- if ka == nil then init() end
- gpu.set(col,3,"*")
- inpin = inpin .. ch
- num = num + 1
- col = col + 2
- if num == 5 then break end
- end
- if inpin == pin then
- gpu.setResolution(gpu.maxResolution())
- gpu.fill(1,1,w,h," ")
- interrupt = true
- else
- init()
- end
- end
- event.listen("interrupted",leave)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement