Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. local function leave()
  2. local pin = "1234"
  3. gpu.fill(1,1,20,5," ")
  4. gpu.setForeground(0xFF0000)
  5. gpu.set(2,2,"Enter PIN:")
  6. gpu.set(2,4,"_ _ _ _")
  7. local num = 1
  8. local col = 2
  9. local inpin
  10. while ture do
  11. local ka,ch,co,pn = event.pull(20,"key_down")
  12. if ka == nil then init() end
  13. gpu.set(col,3,"*")
  14. inpin = inpin .. ch
  15. num = num + 1
  16. col = col + 2
  17. if num == 5 then break end
  18. end
  19. if inpin == pin then
  20. gpu.setResolution(gpu.maxResolution())
  21. gpu.fill(1,1,w,h," ")
  22. interrupt = true
  23. else
  24. init()
  25. end
  26. end
  27. event.listen("interrupted",leave)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement