Advertisement
Marlingaming

CC Tweaked (BPeripherals) KeyCard Terminal

Feb 4th, 2022 (edited)
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. local Side = "bottom"
  2. local AcceptedCodes = {}
  3. local OutputSide = "left"
  4. local ActiveTime = 3
  5. local AdminCode = "0000"
  6.  
  7.  
  8.  
  9. function Loop()
  10. while true do
  11. local event, side, id, code = os.pullEvent("mag_swipe")
  12. for i = 1, #AcceptedCodes do
  13. if code == AcceptedCodes[i] then Open() end
  14. end
  15. end
  16. end
  17.  
  18. function Open()
  19. redstone.setOutput(OutputSide,true)
  20. os.sleep(3)
  21. redstone.setOutput(OutputSide,false)
  22. end
  23.  
  24. Loop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement