asteroidsteam

Untitled

Aug 6th, 2016
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. function install()
  2. term.setBackgroundColor(colors.white)
  3. term.clear()
  4. term.setCursorPos(3,1)
  5. term.setBackgroundColor(colors.blue)
  6. term.clearLine()
  7. print("I am happy if u use in modpacks! just credit me")
  8. term.setCursorPos(3,3)
  9. term.clearLine()
  10. print("Do not copy without owners permisson this is copywrited")
  11. term.setCursorPos(3,6)
  12. term.clearLine()
  13. print("This will install a startup disk for a special OS")
  14. -- Draw the text
  15. local tx, ty = 5, 10
  16. local text = "[Agree and Install]"
  17. term.setCursorPos(tx, ty)
  18. write(text)
  19. -- Event loop
  20. while true do
  21. local e, but, cx, cy = os.pullEvent()
  22. if e == "mouse_click" then
  23. if cx >= tx and cx <= tx + text:len() and cy == ty then
  24. --PUT INSTALL CODE HERE
  25. shell.run("cd /")
  26. shell.run("pastebin get EX4mrptA startup")
  27. --END INSTALL CODE HERE
  28. shell.run("reboot")
  29. end
  30. end
  31. end
  32. end
  33. local file = fs.exists("startup")
  34. if file == true then
  35.  
  36. print("Sorry, a startup file for a different OS is currently installed to delete type y/n")
  37. input = io.read()
  38. if input == "y" then
  39. fs.delete("startup")
  40. print("Installing...")
  41. os.sleep(1)
  42. install()
  43. end
  44. else
  45. install()
  46. end
Add Comment
Please, Sign In to add comment