Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("---------------Welcome!----------------")
- print("---------Dark lock installer!----------")
- print("---------------------------------------")
- print("This will install Dark lock 1.4 to your")
- print("---------Minecraft Computer------------")
- print("")
- print(" 1. Install Dark lock")
- print(" 2. Exit ")
- print("---------------------------------------")
- print(" Warning! Dark lock will overide ")
- print(" Your default startup program")
- print("")
- write("type a number then press enter: ")
- user=io.read()
- function makeprogram()
- term.clear() term.setCursorPos(1,1)
- print("Looking for old startup file...")
- sleep(1)
- if fs.exists("startup") == true then
- shell.run("rm", "startup")
- print("Startup file found, deleting...")
- sleep(1)
- end
- if fs.exists("setup") == true then
- shell.run("rm", "setup")
- end
- if fs.exists("lock/conf") == true then
- shell.run("rm", "lock/conf")
- end
- if fs.exists("lock/attempt") == true then
- shell.run("rm", "lock/attempt")
- end
- sleep(1)
- print("Making new directory...")
- shell.run("mkdir", "lock")
- sleep(2)
- print("Copying Files...")
- print("")
- sleep(1)
- file = io.open("lock/attempt","w")
- file:write("")
- file:close()
- file = io.open("lock/conf","w")
- file:write("")
- file:close()
- shell.run("cp", "disk/lock", "/startup")
- if fs.exists("startup") == true then
- print ("Startup copy... Success")
- else
- print ("Startup copy... Failed")
- end
- sleep(1)
- print("")
- shell.run("cp", "disk/setup", "/")
- if fs.exists("setup") == true then
- print ("setup copy... Success")
- else
- print ("setup copy... Failed")
- end
- sleep(1)
- print("")
- print("Install completed")
- sleep(1)
- print("")
- print("now running setup")
- sleep(2)
- shell.run("setup")
- end
- --running program
- if user=="1" then
- term.clear() term.setCursorPos(1,1)
- print("Running install...")
- sleep(2)
- makeprogram()
- end
- if not(user=="1") then
- term.clear() term.setCursorPos(1,1)
- print("Exiting...")
- sleep(2)
- term.clear() term.setCursorPos(1,1)
- shell.run("startup")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement