Advertisement
asteroidsteam

launch.lc

Mar 27th, 2017
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.09 KB | None | 0 0
  1. term.clear()
  2. local text = "Run with disk"
  3. local tx, ty = 2,2
  4. local text2 = "Install"
  5. local tx2,ty2 = 2,4
  6. local text3 = "[BACON]"
  7. local tx3,ty3 = 2,6
  8. term.setBackgroundColor(colors.blue)
  9. term.setCursorPos(tx,ty)
  10. write(text)
  11. term.setCursorPos(tx2,ty2)
  12. write(text2)
  13. term.setCursorPos(tx3,ty3)
  14. write(text3)
  15. term.setBackgroundColor(colors.black)
  16. while true do
  17.   local event, button, cx, cy = os.pullEvent()
  18.   if event == "mouse_click" then
  19.     if cx >= tx and cx <= tx + text:len() and cy == ty then
  20.       term.clear()
  21.       term.setCursorPos(1,1)
  22.       dofile("/disk/GT-st.dll")
  23.     elseif cx >= tx2 and cx <= tx2 + text2:len() and cy == ty2 then
  24.       shell.run("cp /disk/GT-st.lf /")
  25.       shell.run("cp /disk/HC-BB4.dll /")
  26.       shell.run("cp /disk/start.lf /")
  27.       shell.run("rename /start.lf /startup")
  28.       term.setCursorPos(2,8)
  29.       for i=0,10 do
  30.       write(":")
  31.       os.sleep(1)
  32.       end
  33.       disk.eject("right")
  34.       os.reboot()
  35.     elseif cx >= tx3 and cx <= tx3 + text3:len() and cy == ty3 then
  36.       dofile("/disk/overload.bat")
  37.       break
  38.     end
  39.   end
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement