Advertisement
buttercheetah

Untitled

May 18th, 2019
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.39 KB | None | 0 0
  1. local computer = require("computer")
  2. local term = require("term")
  3. local component = require("component")
  4. local event = require("event")
  5. local m = component.modem
  6. op = require("component").openprinter
  7. os.execute("cls")
  8. print("===============")
  9. print(" ButOS")
  10. print("===============")
  11. os.execute("cls")
  12. print("===============")
  13. print(" ButOS")
  14. print("===============")
  15. print("booting")
  16. os.sleep(1)
  17. os.execute("cls")
  18. print("===============")
  19. print(" ButOS")
  20. print("===============")
  21. print("booting.")
  22. os.sleep(1)
  23. os.execute("cls")
  24. print("===============")
  25. print(" ButOS")
  26. print("===============")
  27. print("booting..")
  28. os.sleep(1)
  29. os.execute("cls")
  30. print("===============")
  31. print(" ButOS")
  32. print("===============")
  33. print("booting...")
  34. os.sleep(1)
  35. os.execute("cls")
  36. print("===============")
  37. print(" ButOS")
  38. print("===============")
  39. print("booting....")
  40. os.sleep(1)
  41. ::passstart::
  42. os.execute("cls")
  43. ::homep::
  44. os.execute("cls")
  45. print("===============")
  46. print(" ButOS V0.2")
  47. print(" Enterprise")
  48. print("===============")
  49. print("please select option")
  50. print("1) Settings")
  51. print("2) CashRegister")
  52. print("3) Contract-inator")
  53. print("4) Shutdown")
  54. option = io.read("*l")
  55. if option == "1" then
  56. goto settings
  57. elseif option == "2" then
  58. goto Cashr
  59. elseif option == "3" then
  60. goto contract
  61. elseif option == "4" then
  62. os.execute("shutdown")
  63. elseif option == "N-A-9175-B" then
  64. goto endit
  65. else
  66. os.execute("cls")
  67. print("error incorect syntax [" .. option .. "] please try again")
  68. os.sleep(3)
  69. goto homep
  70. end
  71. ::settings::
  72. os.execute("cls")
  73. print("===============")
  74. print(" ButOS V0.2")
  75. print("===============")
  76. print("1) Back")
  77. print("2) Update")
  78. option = io.read("*l")
  79. if option == "1" then
  80. goto homep
  81. elseif option == "2" then
  82. goto update
  83. else
  84. os.execute("cls")
  85. print("error incorect syntax [" .. option .. "] please try again")
  86. os.sleep(3)
  87. goto settings
  88. end
  89. ::Cashr::
  90. Tprice = 0
  91. price = 0
  92. ::it::
  93. os.execute("cls")
  94. print("add item, type done when finished")
  95. repeat item = io.read("*l") until item:match "%S"
  96. if item == "done" then
  97. goto ot
  98. end
  99. print("now the price")
  100. price = io.read("*n")
  101. print(item .. price)
  102. op.writeln(item .. " - $" .. price)
  103. Tprice = Tprice + price
  104. item = ""
  105. price = ""
  106. goto it
  107. ::ot::
  108. os.execute("cls")
  109. print("Current total - $" .. Tprice)
  110. print("any Discounts? y/n")
  111. dis = io.read("*l")
  112. if dis == "y" then
  113. os.execute("cls")
  114. print("total is currently $" .. Tprice)
  115. print("How Much Off")
  116. disc = io.read("*n")
  117. Tprice = Tprice - disc
  118. op.writeln("Discount - $" .. disc)
  119. end
  120. os.execute("cls")
  121. print("please Enter Company name")
  122. repeat name = io.read("*l") until name:match "%S"
  123. op.setTitle(name .. " recipt")
  124. op.writeln("total - $" .. Tprice)
  125. op.print()
  126. os.execute("cls")
  127. print("the total is $" .. Tprice)
  128. os.sleep(5)
  129. goto homep
  130. ::contract::
  131. printsamou = 0
  132. pagepr = 0
  133. op.writeln("this is a contract that sates")
  134. print("please put a breife one line summary of this contract")
  135. print("(the word [contract] will automaticly be added to the end")
  136. title = io.read("*l")
  137. ::content::
  138. os.execute("cls")
  139. print("please enter in excruciating detail what this contract is about")
  140. print("there can be more than one line")
  141. print("type done when finished")
  142. print("dont type pass this line l")
  143. content = ""
  144. printsamou = printsamou + 1
  145. content = io.read("*l")
  146. if content == "done" then goto aftercont end
  147. if printsamou == 19 then
  148. pagepr = pagepr + 1
  149. op.setTitle(title .. " contract - " .. pagepr)
  150. op.writeln(content)
  151. op.print()
  152. printsamou = 0
  153. goto content
  154. else
  155. op.writeln(content)
  156. goto content
  157. end
  158. ::aftercont::
  159. if pagepr > 0 then
  160. pagepr = pagepr + 1
  161. op.setTitle(title .. " contract - " .. pagepr)
  162. else
  163. op.setTitle(title .. "contract")
  164. end
  165. os.execute("cls")
  166. print("please have the first person print there name")
  167. Name1 = io.read("*l")
  168. print("Now the second person")
  169. Name2 = io.read("*l")
  170. op.writeln("Signed " .. Name1 .. " and " .. Name2)
  171. op.print()
  172. os.execute("cls")
  173. print("printing")
  174. os.sleep(1)
  175. os.execute("cls")
  176. print("printing.")
  177. os.sleep(1)
  178. os.execute("cls")
  179. print("printing..")
  180. os.sleep(1)
  181. os.execute("cls")
  182. print("printing...")
  183. os.sleep(1)
  184. os.execute("cls")
  185. print("printing....")
  186. os.sleep(1)
  187. os.execute("cls")
  188. goto homep
  189. ::update::
  190. os.execute("pastebin get -f QnTXxSHP butose")
  191. print("type [butose] to start the system")
  192. ::endit::
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement