Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function s(...) return sleep(...) end
- local function w(...) return write(...) end
- local function p(...) return print(...) end
- local function tw(...) return term.write(...) end
- local function scp(...) return term.setCursorPos(...) end
- local function sbc(...) return term.setBackgroundColor(...) end
- local function stc(...) return term.setTextColor(...) end
- local function tc(...) return term.clear(...) end
- local function tcl(...) return term.clearLine(...) end
- local function r(...) return shell.run(...) end
- local function sp(...) return textutils.slowPrint(...) end
- local function sw(...) return textutils.slowWrite(...) end
- local function fse(...) return fs.exists(...) end
- local function pul(...) return paintutils.loadImage(...) end
- local function pud(...) return paintutils.drawImage(...) end
- local function pfb(...) return paintutils.drawFilledBox(...) end
- local function su(...) return os.shutdown(...) end
- local function re(...) return os.reboot(...) end
- while true do
- if fs.exists("/os/.log1") and fs.exists("/os/.log2") then ok = 1 else r("/os/.menu") end
- tc()
- pfb(1, 1, 51, 5, colors.blue)
- pfb(1, 6, 51, 14, colors.lightBlue)
- pfb(1, 15, 51, 19, colors.blue)
- scp(1,1)
- p("Logowanie MineCore")
- scp(1,2)
- p("Wybierz uzytkownika, a nastepnie wpisz haslo.")
- local u = fs.open("/os/.log1", "r")
- user = u.readLine(1)
- u.close()
- local h = fs.open("/os/.log2", "r")
- pass = h.readLine(1)
- h.close()
- scp(51,19)
- sbc(colors.red)
- w("X")
- pfb(15, 7, 17, 9, colors.gray)
- scp(18,7)
- sbc(colors.lightBlue)
- p(user)
- local event, click, x, y = os.pullEvent("mouse_click")
- if x == 51 and y == 19 then os.shutdown() end
- if x>14 and x<18 and y>6 and y<10 then
- scp(18, 8)
- w("Wpisz haslo: ")
- haslo = read()
- if haslo == pass then r("/os/.menu") else scp(18,9) stc(colors.white) sbc(colors.red) p("Bledne haslo!") sleep(2) end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement