Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- password = "testtest"
- if not fs.exists('ML') then shell.run('pastebin','run','6QYJND9x','ML') end os.loadAPI('ML')
- ML.loadAPI("movieAPI2")
- goFile = "goFile"
- ML.update(goFile)
- goSave = "goSave"
- goMon = peripheral.wrap("left")
- goText = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}"
- goRS = "bottom"
- goMon.setTextScale(0.5)
- go = movieAPI2.new(goMon,goFile,36)
- go:Load()
- function save(string)
- local fh = fs.open(goSave,"w")
- fh.write(string)
- fh.close()
- end
- function load()
- if fs.exists(goSave) then
- local fh = fs.open(goSave,"r")
- local string = fh.readAll()
- fh.close()
- return tonumber(string)
- else
- return nil
- end
- end
- function random()
- local p = math.random(1,string.len(goText))
- return string.sub(goText,p,p)
- end
- function terminal(string)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.setCursorPos(1,1)
- term.clear()
- for i=1,51*19 do io.write(random()) end
- term.setCursorPos(1,10)
- term.clearLine()
- term.write(string)
- end
- while true do
- local num = load() or 1
- go:Page(num)
- go:Show()
- terminal("> ")
- if read("*") == password then
- if num >= 2 then num = 1 else num = 2 end
- rs.setOutput(goRS,true)
- save(num)
- sleep(0.2)
- rs.setOutput(goRS,false)
- terminal(" Changed!")
- sleep(2)
- else
- terminal(" Password Wrong!!")
- sleep(10)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement