Advertisement
Guest User

startup

a guest
Apr 3rd, 2020
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. local component=require("component")
  2. local r=component.redstone
  3. local gpu=component.gpu
  4. local term=require("term")
  5.  
  6. local component = require("component")
  7. local gpu = component.gpu
  8. local w, h =  gpu.getResolution()
  9.  
  10. gpu.fill(1, 1, w, h, " ")
  11. gpu.setForeground(0x000000)
  12. gpu.setBackground(0xFFFFFF)
  13. gpu.fill(1, 1, w/2, h/2, "X")
  14. gpu.copy(1, 1, w/2, h/2, w/2, h/2)
  15.  
  16. local password="0419"
  17. local delay=5
  18. local side=5
  19.  
  20. local wrong=false
  21.  
  22. while true do
  23.   term.clear()
  24.   gpu.set(1,1,"Passwort eingeben")
  25.   if wrong then
  26.     gpu.set(1,1, "Passwort falsch")
  27.     wrong=false
  28.   end
  29.   term.setCursor(1,2)
  30.   local input=io.read()
  31.   if input==password then
  32.     r.setOutput(5, 15)
  33.     os.sleep(50)
  34.     r.setOutput(5,0)
  35.   else
  36.     wrong=false
  37.   end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement