Advertisement
Guest User

MFP

a guest
Oct 25th, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.86 KB | None | 0 0
  1. function showTime()
  2. fin = http.get("http://time.is/ru/just")
  3. for i = 1,232,1 do
  4.   if i == 232 then
  5.     time = string.sub(fin.readLine(),73,77)
  6.   else
  7.     f = fin.readLine()
  8.   end
  9. end
  10. print(time)
  11. end
  12.  
  13. print("MultiFunction Program 1.0.0 by Delta2Force")
  14. os.sleep(2)
  15. shell.run("clear")
  16.  
  17. term.setBackgroundColor(colors.blue)
  18. term.clear()
  19. term.setCursorPos(2,15)
  20. print("Loading MFP...")
  21.  
  22. term.setCursorPos(10,10)
  23. textutils.slowPrint("################################")
  24. os.sleep(1.5)
  25.  
  26. shell.run("clear")
  27. term.setCursorPos(1,1)
  28. os.sleep(1)
  29.  
  30. term.setBackgroundColor(colors.blue)
  31. term.clear()
  32. term.setCursorPos(3,10)
  33. textutils.slowPrint("What do you want to do? You can enter Following :")
  34. term.setCursorPos(3,10)
  35. os.sleep(5.5)
  36. textutils.slowPrint("Time,Shutdown,Reboot,Adventure,ANTIVIRUS,Exit          ")
  37. term.setCursorPos(3,9)
  38. textutils.slowPrint("Enter the command Case-Sensestive!")
  39. term.setCursorPos(2,15)
  40. term.setTextColor(colors.black)
  41. write("--> ")
  42. input = read()
  43. term.setTextColor(colors.white)
  44.  
  45.  if input == "Shutdown" then
  46.   shell.run("clear")
  47.   shell.run("shutdown")
  48.  elseif input == "Reboot" then
  49.   shell.run("clear")
  50.   shell.run("reboot")
  51.  elseif input == "Adventure" then
  52.   shell.run("clear")
  53.   shell.run("adventure")
  54.  elseif input == "Time" then
  55.   shell.run("clear")
  56.   showTime()
  57.  elseif input == "ANTIVIRUS" then
  58.   shell.run("clear")
  59.   term.setBackgroundColor(colors.gray)
  60.   term.clear()
  61.   term.setCursorPos(1,1)
  62.   print("Delete the Startup File?(y or n)")
  63.   write("--> ")
  64.   input1 = read()
  65.  
  66.   if input1 == "y" then
  67.   fs.delete("startup")
  68.   shell.run("reboot")
  69.  
  70.   else
  71.   print("Okay.")
  72.   os.sleep(2)
  73.   term.clear()
  74.   shell.run("clear")
  75.   end
  76.  
  77.  elseif input == "Exit" then
  78.  print("Seya!")
  79.  os.sleep(2)
  80.  term.clear()
  81.  shell.run("clear")
  82.  
  83.  else
  84.  term.clear()
  85.  shell.run("clear")
  86.  print("What?")
  87.  end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement