Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function clear(c)
- redstone.setOutput(c, true)
- end
- local function set(c)
- redstone.setOutput(c, false)
- end
- local function restart()
- os.reboot()
- end
- local function main()
- heslo1 = "123"
- heslo2 = "5805"
- while pristup == 0 do
- write("Zadejte heslo: ")
- zadani = read()
- if (zadani == heslo1) then
- set("left")
- print("Dekuji, cesta je volna")
- sleep(5)
- clear("left")
- elseif (zadani == heslo2) then
- set("left")
- pristup = 1
- else print("Zadáno špatné heslo")
- end
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement