Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function install()
- term.setBackgroundColor(colors.white)
- term.clear()
- term.setCursorPos(3,1)
- term.setBackgroundColor(colors.blue)
- term.clearLine()
- print("I am happy if u use in modpacks! just credit me")
- term.setCursorPos(3,3)
- term.clearLine()
- print("Do not copy without owners permisson this is copywrited")
- term.setCursorPos(3,6)
- term.clearLine()
- print("This will install a startup disk for a special OS")
- -- Draw the text
- local tx, ty = 5, 10
- local text = "[Agree and Install]"
- term.setCursorPos(tx, ty)
- write(text)
- -- Event loop
- while true do
- local e, but, cx, cy = os.pullEvent()
- if e == "mouse_click" then
- if cx >= tx and cx <= tx + text:len() and cy == ty then
- --PUT INSTALL CODE HERE
- shell.run("cd /")
- shell.run("pastebin get EX4mrptA startup")
- --END INSTALL CODE HERE
- shell.run("reboot")
- end
- end
- end
- end
- local file = fs.exists("startup")
- if file == true then
- print("Sorry, a startup file for a different OS is currently installed to delete type y/n")
- input = io.read()
- if input == "y" then
- fs.delete("startup")
- print("Installing...")
- os.sleep(1)
- install()
- end
- else
- install()
- end
Add Comment
Please, Sign In to add comment