Guest User

Untitled

a guest
Sep 18th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 65.60 KB | None | 0 0
  1. if fs.exists("BLUTD-resetinhibiter") then
  2.  
  3. term.clear()
  4. term.setCursorPos(1,1)
  5. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO") -- 49 spaces across
  6. print("O O")
  7. print("O O")
  8. print("O OOO O O O OOOO OOOO OOOO OOO OOOO O")
  9. print("O O O O O O O OO OO O O O O")
  10. print("O OOOO O O O OOOO OO OO O O OOOO O")
  11. print("O O O O O O O OO OO O O O O")
  12. print("O OOO OOOO OOO OOOO OO OOOO OOO OOOO O")
  13. print("O O")
  14. print("O systems.inc O")
  15. print("O O")
  16. print("O loading O")
  17. print("O O")
  18. print("O O")
  19. print("O O")
  20. print("O Made by: Benedict Allen O")
  21. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO") -- 17 spaces down
  22. term.setCursorPos(27,12)
  23. write(".")
  24. sleep(0.7)
  25. write(".")
  26. sleep(0.7)
  27. write(".")
  28. sleep(0.7)
  29. print(".")
  30. sleep(3)
  31.  
  32. while true do
  33. term.clear()
  34. term.setCursorPos(1,1)
  35. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  36. print("O O")
  37. print("O O")
  38. print("O O")
  39. print("O O")
  40. print("O O")
  41. print("O O")
  42. print("O O")
  43. print("O O")
  44. print("O O")
  45. print("O O")
  46. print("O O")
  47. print("O O")
  48. print("O O")
  49. print("O O")
  50. print("O BlueTide OS Made by: Benedict Allen O")
  51. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  52. term.setCursorPos(3,3)
  53.  
  54. print("This is the Login page. Default settings are;")
  55. term.setCursorPos(3,4)
  56. print("username: newuser")
  57. term.setCursorPos(3,5)
  58. print("password: pass")
  59.  
  60. term.setCursorPos(3,7)
  61. write("username: ")
  62. usernameinput = read()
  63. term.setCursorPos(49,7)
  64. print("O")
  65.  
  66. filereader = fs.open("username", "r")
  67.  
  68. username = filereader.readLine()
  69.  
  70. filereader.close()
  71. filereader = fs.open("username2", "r")
  72.  
  73. username2 = filereader.readLine()
  74.  
  75. filereader.close()
  76. if (usernameinput == username or usernameinput == username2) then
  77.  
  78.  
  79. term.setCursorPos(3,8)
  80. write("password: ")
  81. passwordinput = read("*")
  82. term.setCursorPos(49,8)
  83. print("O")
  84.  
  85. filereader = fs.open("password", "r")
  86.  
  87. password = filereader.readLine()
  88.  
  89. filereader.close()
  90. filereader = fs.open("password2", "r")
  91.  
  92. password2 = filereader.readLine()
  93.  
  94. filereader.close()
  95. if (passwordinput == password and usernameinput == username or passwordinput == password2 and usernameinput == username2) then
  96. if (usernameinput == username) then
  97.  
  98. userloggedin = 1
  99. else
  100. userloggedin = 2
  101. end
  102. sleep(1)
  103. term.setCursorPos(3,15)
  104. write("loading")
  105. sleep(0.6)
  106. write(".")
  107. sleep(0.7)
  108. write(".")
  109. sleep(0.8)
  110. write(".")
  111. sleep(0.9)
  112. write(".")
  113. sleep(1)
  114. term.clear()
  115. x = 11
  116. y = 6
  117.  
  118. while true do
  119. term.setCursorPos(1,1)
  120. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  121. print("O O")
  122. print("O Menu O")
  123. print("O O")
  124. print("O O")
  125. print("O [ ] Run [ ] Options O")
  126. print("O O")
  127. print("O [ ] BlueVille [ ] Lock O")
  128. print("O O")
  129. print("O [ ] BlueWord [ ] Shutdown O")
  130. print("O O")
  131. print("O O")
  132. print("O O")
  133. print("O O")
  134. print("O O")
  135. print("O BlueTide OS Made by: Benedict Allen O")
  136. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  137.  
  138. v = y-5
  139. if v == 1 and x == 11 then
  140. term.setCursorPos(3,14)
  141. print("Run any program from here")
  142. elseif v == 3 and x == 11 then
  143. term.setCursorPos(3,14)
  144. print("A new rpg game to go with BlueTide OS")
  145. elseif v == 5 and x == 11 then
  146. term.setCursorPos(3,14)
  147. print("Edit create and delete your files/programs")
  148. elseif v == 1 and x == 29 then
  149. term.setCursorPos(3,14)
  150. print("Other BlueTide features")
  151. elseif v == 3 and x == 29 then
  152. term.setCursorPos(3,14)
  153. print("Lock the terminal")
  154. elseif v == 5 and x == 29 then
  155. term.setCursorPos(3,14)
  156. print("Shutdown or reboot the computer")
  157. end
  158.  
  159. term.setCursorPos(3,2)
  160. filereader = fs.open("username", "r")
  161.  
  162. username = filereader.readLine()
  163.  
  164. filereader.close()
  165. filereader = fs.open("username2", "r")
  166.  
  167. username2 = filereader.readLine()
  168.  
  169. filereader.close()
  170. if userloggedin == 2 then
  171. print("welcome ", username2 )
  172. else
  173. print("Welcome ", username )
  174. end
  175. pcid = os.getComputerLabel()
  176. term.setCursorPos(33,2)
  177. print("computer: ", pcid)
  178. term.setCursorPos(3,2)
  179. filereader = fs.open("username", "r")
  180.  
  181. username = filereader.readLine()
  182.  
  183. print("Welcome ", username )
  184. pcid = os.getComputerLabel()
  185. term.setCursorPos(33,2)
  186. print("computer: ", pcid)
  187. term.setCursorPos(x,y)
  188. print("O")
  189. id, key = os.pullEvent()
  190. if key == 208 and y < 10 then
  191. y = y+2
  192. elseif key == 208 and y == 10 then
  193. y = 6
  194. elseif key == 200 and y > 6 then
  195. y = y-2
  196. elseif key == 200 and y == 6 then
  197. y = 10
  198. elseif key == 203 and x > 11 then
  199. x = x-18
  200. elseif key == 203 and x == 11 then
  201. x = 29
  202. elseif key == 205 and x < 29 then
  203. x = x+18
  204. elseif key == 205 and x == 29 then
  205. x = 11
  206.  
  207. elseif key == 28 then
  208.  
  209. if y == 6 and x == 11 then
  210.  
  211. term.clear()
  212. term.setCursorPos(1,1)
  213. while true do
  214. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  215. print("O You are in the run program O")
  216. print("O Please select which program you would like O")
  217. print("O to run: O")
  218. print("O Type exit to exit O")
  219. print("O Please note that some programs will not allow O")
  220. print("O you to return directly here... O")
  221. print("O There is a 15 second window for you to run O")
  222. print("O most programs O")
  223. print("O Currently compatible Programs: O")
  224. print("O All Craft OS programs O")
  225. print("O Tutorial O")
  226. print("O Your programs O")
  227. print("O O")
  228. print("O O")
  229. print("O BlueTide OS Made by: Benedict Allen O")
  230. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  231.  
  232. term.setCursorPos(11,4)
  233. program = read()
  234. if program == "exit" then
  235. break
  236. elseif program == "tutorial" then
  237. m = 1
  238. term.clear()
  239. term.setCursorPos(1,1)
  240. print("O Tutorial Page 1 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  241. print("O O")
  242. print("O BlueTide OS Tutorial O")
  243. print("O As this tutorial is in its early stages it O")
  244. print("O only covers basic door locks, please contact O")
  245. print("O the developer if you have any ideas or O")
  246. print("O suggestions regarding what to include in this O")
  247. print("O tutorial, thank you. Press backspace to exit O")
  248. print("O Tutorial 1: user input and printing-doorlocks O")
  249. print("O I have used - instead of speech marks O")
  250. print("O To print/write something to the page, type in O")
  251. print("O print(-whatever you want it to write-) O")
  252. print("O You might want it to say O")
  253. print("O please put in your password: O")
  254. print("O O")
  255. print("O BlueTide OS Made by: Benedict Allen O")
  256. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  257. term.setCursorPos(1,1)
  258. while true do
  259. event, key = os.pullEvent()
  260. if key == 203 then
  261. m = m - 1
  262. elseif key == 205 then
  263. m = m + 1
  264. elseif key == 14 then
  265. break
  266. end
  267. if m == 1 then
  268. term.clear()
  269. term.setCursorPos(1,1)
  270. print("O Tutorial Page 1 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  271. print("O O")
  272. print("O BlueTide OS Tutorial O")
  273. print("O As this tutorial is in its early stages it O")
  274. print("O only covers basic door locks, please contact O")
  275. print("O the developer if you have any ideas or O")
  276. print("O suggestions regarding what to include in this O")
  277. print("O tutorial, thank you. O")
  278. print("O Tutorial 1: user input and printing-doorlocks O")
  279. print("O I have used - instead of speech marks O")
  280. print("O To print/write something to the page, type in O")
  281. print("O print(-whatever you want it to write-) O")
  282. print("O You might want it to say O")
  283. print("O please put in your password: O")
  284. print("O O")
  285. print("O BlueTide OS Made by: Benedict Allen O")
  286. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  287. elseif m == 2 then
  288. term.clear()
  289. term.setCursorPos(1,1)
  290. print("O Tutorial Page 2 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  291. print("O You would do this by typing print(-please O")
  292. print("O put in your password: -) O")
  293. print("O If you want their cursor to be after the word O")
  294. print("O password: , use write(-please put in your O")
  295. print("O password: -), i would recommend this. O")
  296. print("O To get user input you type password = read() O")
  297. print("O This would make password the variable O")
  298. print("O Then you can type if password == -your O")
  299. print("O password- then O")
  300. print("O Do things i.e. rs.setOutput(-side-, true/ O")
  301. print("O false ) or print(-password correct-) O")
  302. print("O if you want it to do some thing if they get O")
  303. print("O it wrong then you type else after the do O")
  304. print("O things part O")
  305. print("O BlueTide OS Made by: Benedict Allen O")
  306. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  307. elseif m == 3 then
  308. term.clear()
  309. term.setCursorPos(1,1)
  310. print("O Tutorial Page 3 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  311. print("O For example print(-incorrect password-) O")
  312. print("O to make your computer reboot or shutdown type O")
  313. print("O os.reboot() or os.shutdown() O")
  314. print("O O")
  315. print("O O")
  316. print("O O")
  317. print("O O")
  318. print("O O")
  319. print("O O")
  320. print("O O")
  321. print("O thankyou for using the bluetide os and O")
  322. print("O tutorial O")
  323. print("O O")
  324. print("O O")
  325. print("O BlueTide OS Made by: Benedict Allen O")
  326. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  327. end
  328. end
  329. else
  330. term.setCursorPos(1,1)
  331. term.clear()
  332. shell.run(program)
  333. sleep(15)
  334. print("hello")
  335. end
  336. end
  337.  
  338. elseif y == 8 and x == 11 then
  339.  
  340. term.clear()
  341. term.setCursorPos(3,2)
  342. print("BlueVille - A Game By Benedict Allen")
  343. sleep(2)
  344. term.clear()
  345. local xer=3
  346. local yer=4
  347. while true do
  348. print("+-----------------------------------------------+")
  349. print("| Welcome to BlueVille... |")
  350. print("+-----------------------------------------------+")
  351. print("| New game |")
  352. print("| Load game |")
  353. print("| Credits-coming soon... |")
  354. print("| Exit |")
  355. print("| |")
  356. print("| controls: |")
  357. print("| move = arrows |")
  358. print("| use item = u |")
  359. print("| exit = backspace |")
  360. print("| |")
  361. print("| |")
  362. print("| |")
  363. print("| |")
  364. print("+-----------------------------------------------+")
  365. term.setCursorPos(xer,yer)
  366. print("-")
  367. id, key = os.pullEvent()
  368. if key == 208 and yer ~= 7 then
  369. yer = yer+1
  370. elseif key == 208 and yer == 7 then
  371. yer = 4
  372. elseif key == 200 and yer ~= 4 then
  373. yer = yer-1
  374. elseif key == 200 and yer == 4 then
  375. yer = 7
  376. elseif key == 28 then
  377. if yer == 4 then
  378.  
  379. burger=0
  380. coke=0
  381. water=0
  382. apple=0
  383. fruitbag=0
  384. house=0
  385. experience=0
  386. job=0
  387. borrowed=0
  388. x=2
  389. y=4
  390. money=0
  391. rest=840
  392. while true do
  393. items = burger+coke+water+apple+fruitbag
  394. if rest <= 0 then
  395. term.clear()
  396. term.setCursorPos(1,1)
  397. print("You died because you ran out of rest...how sad")
  398. break
  399. elseif rest > 840 then
  400. rest = 840
  401. else
  402. if y == 6 and x == 9 then
  403. shopmenu = 6
  404. x = 8
  405. while true do
  406. term.clear()
  407. term.setCursorPos(1,1)
  408. print("+-----------------------------------------------+")
  409. print("| The Shop |")
  410. print("+-----------------------------------------------+")
  411. print("| Items you can buy |")
  412. print("| |")
  413. print("| Burger 5 money |")
  414. print("| Coke 2 money |")
  415. print("| Water 1 money |")
  416. print("| Lottery Ticket 10 money |")
  417. print("| Apple 2 money |")
  418. print("| Fruit bag 5 money |")
  419. print("| |")
  420. print("| Exit |")
  421. print("| |")
  422. print("| |")
  423. print("| |")
  424. print("+-----------------------------------------------+")
  425. term.setCursorPos(35,2)
  426. print("money: ",money)
  427. term.setCursorPos(3,shopmenu)
  428. print("-")
  429. id, key = os.pullEvent()
  430. if key == 200 and shopmenu > 6 and shopmenu ~= 13 then
  431. shopmenu = shopmenu-1
  432. elseif key == 200 and shopmenu == 6 then
  433. shopmenu = 13
  434. elseif key == 200 and shopmenu == 13 then
  435. shopmenu = 11
  436. elseif key == 208 and shopmenu < 11 then
  437. shopmenu = shopmenu+1
  438. elseif key == 208 and shopmenu == 11 then
  439. shopmenu = 13
  440. elseif key == 208 and shopmenu == 13 then
  441. shopmenu = 6
  442. elseif key == 28 then
  443. if shopmenu == 6 and money >= 5 then
  444. money = money-5
  445. burger = burger+1
  446. term.setCursorPos(3,2)
  447. print("You bought a burger")
  448. sleep(1)
  449. print("looping")
  450. elseif shopmenu == 7 and money >= 2 then
  451. money = money-2
  452. coke = coke+1
  453. term.setCursorPos(3,2)
  454. print("You bought a coke")
  455. sleep(1)
  456. print("looping")
  457. elseif shopmenu == 8 and money >= 1 then
  458. money = money-1
  459. water = water+1
  460. term.setCursorPos(3,2)
  461. print("You bought a bottle of water")
  462. sleep(1)
  463. print("looping")
  464. elseif shopmenu == 9 and money >= 10 then
  465. money = money-10
  466. randomnumber = math.random(1,10)
  467. term.setCursorPos(3,14)
  468. write("your lucky number is: ")
  469. luckynumber = tonumber(read())
  470. if luckynumber == randomnumber then
  471. term.setCursorPos(3,2)
  472. print("You won 100 money ")
  473. money = money+100
  474. sleep(1)
  475.  
  476. print("looping")
  477. else
  478. term.setCursorPos(3,2)
  479. print("You lost, better luck next time... ")
  480. sleep(1)
  481. print("looping")
  482. end
  483. elseif shopmenu == 10 and money >= 2 then
  484. money = money-2
  485. apple = apple+1
  486. term.setCursorPos(3,2)
  487. print("You bought an apple")
  488. sleep(1)
  489. print("looping")
  490. elseif shopmenu == 11 and money >= 5 then
  491. money = money-5
  492. fruitbag = fruitbag+1
  493. term.setCursorPos(3,2)
  494. print("You bought a fruitbag")
  495. sleep(1)
  496. print("looping")
  497. elseif shopmenu == 13 then
  498. break
  499. else
  500. term.setCursorPos(3,2)
  501. print("you don't have enough money")
  502. sleep(1)
  503. print("looping")
  504. end
  505. end
  506.  
  507. end
  508.  
  509. elseif y == 12 and x == 36 then
  510. while true do
  511. term.clear()
  512. term.setCursorPos(1,1)
  513. print("+-----------------------------------------------+")
  514. print("| The Town Centre |")
  515. print("+-----------------------------------------------+")
  516. print("| |")
  517. print("| 1.Buy House 12 money |")
  518. print("| |")
  519. print("| 2.Borrow 5 money |")
  520. print("| |")
  521. print("| 3.Get a job here |")
  522. print("| |")
  523. print("| 4.Leave |")
  524. print("| |")
  525. print("| |")
  526. print("| |")
  527. print("| |")
  528. print("+-----------------------------------------------+")
  529. term.setCursorPos(3,13)
  530. something = read()
  531. if something == "1" and money >= 12 then
  532. money = money-12
  533. term.setCursorPos(3,14)
  534. print("house bought")
  535. house = 1
  536. sleep(2)
  537. print("looping")
  538. elseif something == "1" and money < 12 then
  539. term.setCursorPos(3,14)
  540. print("You need to go to work and get some money first")
  541. sleep(2)
  542. print("looping")
  543. elseif something == "2" and borrowed == 0 then
  544. money = money+5
  545. borrowed = borrowed+1
  546. elseif something == "2" and borrowed == 1 then
  547. print("Your money has been payed back by 20%...")
  548. moneydividedbyfive = money/5
  549. money = money-moneydividedbyfive
  550. sleep(2)
  551. print("looping")
  552. elseif something == "3" then
  553. job = 2
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561. elseif something == "4" then
  562. x = 35
  563. break
  564.  
  565.  
  566.  
  567. else
  568. term.setCursorPos(3,14)
  569. print("something went wrong...")
  570. sleep(2)
  571. print("looping")
  572.  
  573. end
  574.  
  575. end
  576.  
  577. elseif y == 13 and x == 16 and house == 1 then
  578.  
  579.  
  580.  
  581. print("+-----------------------------------------------+")
  582. print("| Home |")
  583. print("+-----------+-----------------------------------+")
  584. print("| | |")
  585. print("| Bedroom | |")
  586. print("| 1 | |")
  587. print("| | |")
  588. print("| | |")
  589. print("+---+ +----+ |")
  590. print("| |")
  591. print("| |")
  592. print("| |")
  593. print("| |")
  594. print("| |")
  595. print("| |")
  596. print("| |")
  597. print("+-----------------------------------------------+")
  598.  
  599. term.setCursorPos(3,2)
  600. write("How many hours would you like to sleep for? ")
  601. sleeptime = tonumber(read())
  602. term.setCursorPos(49,2)
  603. print("|")
  604. if sleeptime ~= "0" then
  605. sleep(sleeptime)
  606. sleepmins = sleeptime*60
  607. rest = rest+sleepmins
  608. term.setCursorPos(3,2)
  609. print("done sleeping ")
  610. x = 15
  611. else
  612. x = 15
  613. end
  614.  
  615. elseif y == 13 and x == 16 and house == 0 then
  616. x = 15
  617.  
  618. elseif y == 16 and x == 3 then
  619. k = fs.open("gamesaveburger", "w")
  620. k.writeLine(burger)
  621. k.close()
  622. k = fs.open("gamesavecoke", "w")
  623. k.writeLine(coke)
  624. k.close()
  625. k = fs.open("gamesavewater", "w")
  626. k.writeLine(water)
  627. k.close()
  628. k = fs.open("gamesaveapple", "w")
  629. k.writeLine(apple)
  630. k.close()
  631. k = fs.open("gamesavefruitbag", "w")
  632. k.writeLine(fruitbag)
  633. k.close()
  634. k = fs.open("gamesavehouse", "w")
  635. k.writeLine(house)
  636. k.close()
  637. k = fs.open("gamesaveexperience", "w")
  638. k.writeLine(experience)
  639. k.close()
  640. k = fs.open("gamesavejob", "w")
  641. k.writeLine(job)
  642. k.close()
  643. k = fs.open("gamesaveborrowed", "w")
  644. k.writeLine(borrowed)
  645. k.close()
  646. k = fs.open("gamesavemoney", "w")
  647. k.writeLine(money)
  648. k.close()
  649. k = fs.open("gamesaverest", "w")
  650. k.writeLine(rest)
  651. k.close()
  652.  
  653. term.clear()
  654. term.setCursorPos(1,1)
  655. break
  656.  
  657.  
  658.  
  659.  
  660.  
  661. elseif y == 5 and x == 19 then
  662. if experience < 44 then
  663. job = 1
  664. term.setCursorPos(3,2)
  665. print("You are at work for 6 hours ")
  666. sleep(6)
  667. rest = rest-360
  668. earnt = experience+6
  669. money = money+earnt
  670. term.setCursorPos(3,2)
  671. print("You now have ", money, " money ")
  672. sleep(1)
  673. experience = experience+1
  674. else
  675. job = 1
  676. term.setCursorPos(3,2)
  677. print("You are at work for 6 hours ")
  678. sleep(6)
  679. rest = rest-360
  680. earnt = experience+6
  681. money = money+earnt
  682. term.setCursorPos(3,2)
  683. print("You now have ", money, " money ")
  684. sleep(1)
  685. end
  686. x = 18
  687. else
  688. term.clear()
  689. term.setCursorPos(1,1)
  690. print("+-----------------------------------------------+")
  691. print("| |")
  692. print("+-----------------------------------------------+")
  693. print("| +-------------+ +----------+ |")
  694. print("| +------+ Work | | | |")
  695. print("| Shop | + | | Town | |")
  696. print("| +-+ | | | | Hall | |")
  697. print("| | | +--------+ | | | |")
  698. print("| +----+ | | | | |")
  699. print("| +----+ | | |")
  700. print("| +--------+ + | |")
  701. print("| + | | |")
  702. print("| House | + | |")
  703. print("| + | | | |")
  704. print("| | | +----------+ |")
  705. print("|> <SAVE +--------+ |")
  706. print("+-----------------------------------------------+")
  707. displayrest = rest/60
  708. term.setCursorPos(3,2)
  709. print("Energy: ",displayrest," hours Money: ",money," You have ",items," items")
  710. term.setCursorPos(x,y)
  711. print("*")
  712. id, key = os.pullEvent()
  713. if key == 208 and y < 16 then
  714. y = y+1
  715. elseif key == 208 and y == 16 then
  716. y = 4
  717. elseif key == 200 and y > 4 then
  718. y = y-1
  719. elseif key == 200 and y == 4 then
  720. y = 16
  721. elseif key == 203 and x > 2 then
  722. x = x-1
  723. elseif key == 203 and x == 2 then
  724. x = 48
  725. elseif key == 205 and x < 48 then
  726. x = x+1
  727. elseif key == 205 and x == 48 then
  728. x = 2
  729. elseif key == 22 then
  730. invmenu = 5
  731. while true do
  732. term.clear()
  733. term.setCursorPos(1,1)
  734. print("+-----------------------------------------------+")
  735. print("| |")
  736. print("+-----------------------------------------------+")
  737. print("| Item Amount Use Item |")
  738. print("| Burger(s) [ ] |")
  739. print("| Coke(s) [ ] |")
  740. print("| Water bottle(s) [ ] |")
  741. print("| Apple(s) [ ] |")
  742. print("| Fruitbag(s) [ ] |")
  743. print("| |")
  744. print("| |")
  745. print("| |")
  746. print("| |")
  747. print("| |")
  748. print("| |")
  749. print("+-----------------------------------------------+")
  750. term.setCursorPos(41,invmenu)
  751. print("use")
  752. term.setCursorPos(3,2)
  753. print("Inventory...")
  754. term.setCursorPos(23,5)
  755. print(burger)
  756. term.setCursorPos(23,6)
  757. print(coke)
  758. term.setCursorPos(23,7)
  759. print(water)
  760. term.setCursorPos(23,8)
  761. print(apple)
  762. term.setCursorPos(23,9)
  763. print(fruitbag)
  764. id, key = os.pullEvent()
  765. if key == 200 and invmenu > 5 then
  766. invmenu = invmenu-1
  767. elseif key == 200 and invmenu == 5 then
  768. invmenu = 9
  769. elseif key == 208 and invmenu < 9 then
  770. invmenu = invmenu+1
  771. elseif key == 208 and invmenu == 9 then
  772. invmenu = 5
  773. elseif key == 28 then
  774. if invmenu == 5 and burger >= 1 then
  775. burger = burger-1
  776. rest = rest+180
  777. elseif invmenu == 6 and coke >= 1 then
  778. coke = coke-1
  779. rest = rest+120
  780. elseif invmenu == 7 and water >= 1 then
  781. water = water-1
  782. if rest < 5 then
  783. rest = rest+60
  784. else
  785. rest = rest+0
  786. end
  787. elseif invmenu == 8 and apple >= 1 then
  788. apple = apple-1
  789. rest = rest+120
  790. elseif invmenu == 9 and fruitbag >= 1 then
  791. fruitbag = fruitbag-1
  792. rest = rest+180
  793. else
  794. term.setCursorPos(3,2)
  795. print("you have none of that item")
  796. sleep(2)
  797. print("looping")
  798. end
  799. elseif key == 14 then
  800. break
  801. end
  802. end
  803.  
  804.  
  805.  
  806.  
  807. elseif key == 14 then
  808. term.clear()
  809. term.setCursorPos(1,1)
  810. break
  811. end
  812. end
  813. end
  814. end
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840. elseif yer == 5 then
  841.  
  842.  
  843.  
  844. k = fs.open("gamesaveburger", "r")
  845. burgerraw = k.readLine(burger)
  846. k.close()
  847. k = fs.open("gamesavecoke", "r")
  848. cokeraw = k.readLine(coke)
  849. k.close()
  850. k = fs.open("gamesavewater", "r")
  851. waterraw = k.readLine(water)
  852. k.close()
  853. k = fs.open("gamesaveapple", "r")
  854. appleraw = k.readLine(apple)
  855. k.close()
  856. k = fs.open("gamesavefruitbag", "r")
  857. fruitbagraw = k.readLine(fruitbag)
  858. k.close()
  859. k = fs.open("gamesavehouse", "r")
  860. houseraw = k.readLine(house)
  861. k.close()
  862. k = fs.open("gamesaveexperience", "r")
  863. experienceraw = k.readLine(experience)
  864. k.close()
  865. k = fs.open("gamesavejob", "r")
  866. jobraw = k.readLine(job)
  867. k.close()
  868. k = fs.open("gamesaveborrowed", "r")
  869. borrowedraw = k.readLine(borrowed)
  870. k.close()
  871. k = fs.open("gamesavemoney", "r")
  872. moneyraw = k.readLine(money)
  873. k.close()
  874. k = fs.open("gamesaverest", "r")
  875. restraw = k.readLine(rest)
  876. k.close()
  877.  
  878. burger = tonumber(burgerraw)
  879. coke = tonumber(cokeraw)
  880. water = tonumber(waterraw)
  881. apple = tonumber(appleraw)
  882. fruitbag = tonumber(fruitbagraw)
  883. house = tonumber(houseraw)
  884. experience = tonumber(experienceraw)
  885. job = tonumber(jobraw)
  886. borrowed = tonumber(borrowedraw)
  887. x=3
  888. y=16
  889. money = tonumber(moneyraw)
  890. rest = tonumber(restraw)
  891.  
  892. while true do
  893. items = burger+coke+water+apple+fruitbag
  894. if rest <= 0 then
  895. term.clear()
  896. term.setCursorPos(1,1)
  897. print("You died because you ran out of rest...how sad")
  898. sleep(2)
  899. print("looping")
  900. break
  901. elseif rest > 840 then
  902. rest = 840
  903. else
  904. if y == 6 and x == 9 then
  905. shopmenu = 6
  906. x = 8
  907. while true do
  908. term.clear()
  909. term.setCursorPos(1,1)
  910. print("+-----------------------------------------------+")
  911. print("| The Shop |")
  912. print("+-----------------------------------------------+")
  913. print("| Items you can buy |")
  914. print("| |")
  915. print("| Burger 5 money |")
  916. print("| Coke 2 money |")
  917. print("| Water 1 money |")
  918. print("| Lottery Ticket 10 money |")
  919. print("| Apple 2 money |")
  920. print("| Fruit bag 5 money |")
  921. print("| |")
  922. print("| Exit |")
  923. print("| |")
  924. print("| |")
  925. print("| |")
  926. print("+-----------------------------------------------+")
  927. term.setCursorPos(35,2)
  928. print("money: ",money)
  929. term.setCursorPos(3,shopmenu)
  930. print("-")
  931. id, key = os.pullEvent()
  932. if key == 200 and shopmenu > 6 and shopmenu ~= 13 then
  933. shopmenu = shopmenu-1
  934. elseif key == 200 and shopmenu == 6 then
  935. shopmenu = 13
  936. elseif key == 200 and shopmenu == 13 then
  937. shopmenu = 11
  938. elseif key == 208 and shopmenu < 11 then
  939. shopmenu = shopmenu+1
  940. elseif key == 208 and shopmenu == 11 then
  941. shopmenu = 13
  942. elseif key == 208 and shopmenu == 13 then
  943. shopmenu = 6
  944. elseif key == 28 then
  945. if shopmenu == 6 and money >= 5 then
  946. money = money-5
  947. burger = burger+1
  948. term.setCursorPos(3,2)
  949. print("You bought a burger")
  950. sleep(1)
  951. print("looping")
  952. elseif shopmenu == 7 and money >= 2 then
  953. money = money-2
  954. coke = coke+1
  955. term.setCursorPos(3,2)
  956. print("You bought a coke")
  957. sleep(1)
  958. print("looping")
  959. elseif shopmenu == 8 and money >= 1 then
  960. money = money-1
  961. water = water+1
  962. term.setCursorPos(3,2)
  963. print("You bought a bottle of water")
  964. sleep(1)
  965. print("looping")
  966. elseif shopmenu == 9 and money >= 10 then
  967. money = money-10
  968. randomnumber = math.random(1,10)
  969. term.setCursorPos(3,14)
  970. write("your lucky number is: ")
  971. luckynumber = tonumber(read())
  972. if luckynumber == randomnumber then
  973. term.setCursorPos(3,2)
  974. print("You won 100 money ")
  975. money = money+100
  976. sleep(1)
  977.  
  978. print("looping")
  979. else
  980. term.setCursorPos(3,2)
  981. print("You lost, better luck next time... ")
  982. sleep(1)
  983. print("looping")
  984. end
  985. elseif shopmenu == 10 and money >= 2 then
  986. money = money-2
  987. apple = apple+1
  988. term.setCursorPos(3,2)
  989. print("You bought an apple")
  990. sleep(1)
  991. print("looping")
  992. elseif shopmenu == 11 and money >= 5 then
  993. money = money-5
  994. fruitbag = fruitbag+1
  995. term.setCursorPos(3,2)
  996. print("You bought a fruitbag")
  997. sleep(1)
  998. print("looping")
  999. elseif shopmenu == 13 then
  1000. break
  1001. else
  1002. term.setCursorPos(3,2)
  1003. print("you don't have enough money")
  1004. sleep(1)
  1005. print("looping")
  1006. end
  1007. end
  1008.  
  1009. end
  1010.  
  1011. elseif y == 12 and x == 36 then
  1012. while true do
  1013. term.clear()
  1014. term.setCursorPos(1,1)
  1015. print("+-----------------------------------------------+")
  1016. print("| The Town Centre |")
  1017. print("+-----------------------------------------------+")
  1018. print("| |")
  1019. print("| 1.Buy House 12 money |")
  1020. print("| |")
  1021. print("| 2.Borrow 5 money |")
  1022. print("| |")
  1023. print("| 3.Get a job here |")
  1024. print("| |")
  1025. print("| 4.Leave |")
  1026. print("| |")
  1027. print("| |")
  1028. print("| |")
  1029. print("| |")
  1030. print("+-----------------------------------------------+")
  1031. term.setCursorPos(3,13)
  1032. something = read()
  1033. if something == "1" and money >= 12 then
  1034. money = money-12
  1035. term.setCursorPos(3,14)
  1036. print("house bought")
  1037. house = 1
  1038. sleep(2)
  1039. print("looping")
  1040. elseif something == "1" and money < 12 then
  1041. term.setCursorPos(3,14)
  1042. print("You need to go to work and get some money first")
  1043. sleep(2)
  1044. print("looping")
  1045. elseif something == "2" and borrowed == 0 then
  1046. money = money+5
  1047. borrowed = borrowed+1
  1048. elseif something == "2" and borrowed == 1 then
  1049. print("Your money has been payed back by 20%...")
  1050. moneydividedbyfive = money/5
  1051. money = money-moneydividedbyfive
  1052. sleep(2)
  1053. print("looping")
  1054. elseif something == "3" then
  1055. job = 2
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063. elseif something == "4" then
  1064. x = 35
  1065. break
  1066.  
  1067.  
  1068.  
  1069. else
  1070. term.setCursorPos(3,14)
  1071. print("something went wrong...")
  1072. sleep(2)
  1073. print("looping")
  1074.  
  1075. end
  1076.  
  1077. end
  1078.  
  1079. elseif y == 13 and x == 16 and house == 1 then
  1080.  
  1081.  
  1082.  
  1083. print("+-----------------------------------------------+")
  1084. print("| Home |")
  1085. print("+-----------+-----------------------------------+")
  1086. print("| | |")
  1087. print("| Bedroom | |")
  1088. print("| 1 | |")
  1089. print("| | |")
  1090. print("| | |")
  1091. print("+---+ +----+ |")
  1092. print("| |")
  1093. print("| |")
  1094. print("| |")
  1095. print("| |")
  1096. print("| |")
  1097. print("| |")
  1098. print("| |")
  1099. print("+-----------------------------------------------+")
  1100.  
  1101. term.setCursorPos(3,2)
  1102. write("How many hours would you like to sleep for? ")
  1103. sleeptime = tonumber(read())
  1104. term.setCursorPos(49,2)
  1105. print("|")
  1106. if sleeptime ~= "0" then
  1107. sleep(sleeptime)
  1108. sleepmins = sleeptime*60
  1109. rest = rest+sleepmins
  1110. term.setCursorPos(3,2)
  1111. print("done sleeping ")
  1112. x = 15
  1113. else
  1114. x = 15
  1115. end
  1116.  
  1117. elseif y == 13 and x == 16 and house == 0 then
  1118. x = 15
  1119.  
  1120. elseif y == 16 and x == 3 then
  1121. k = fs.open("gamesaveburger", "w")
  1122. k.writeLine(burger)
  1123. k.close()
  1124. k = fs.open("gamesavecoke", "w")
  1125. k.writeLine(coke)
  1126. k.close()
  1127. k = fs.open("gamesavewater", "w")
  1128. k.writeLine(water)
  1129. k.close()
  1130. k = fs.open("gamesaveapple", "w")
  1131. k.writeLine(apple)
  1132. k.close()
  1133. k = fs.open("gamesavefruitbag", "w")
  1134. k.writeLine(fruitbag)
  1135. k.close()
  1136. k = fs.open("gamesavehouse", "w")
  1137. k.writeLine(house)
  1138. k.close()
  1139. k = fs.open("gamesaveexperience", "w")
  1140. k.writeLine(experience)
  1141. k.close()
  1142. k = fs.open("gamesavejob", "w")
  1143. k.writeLine(job)
  1144. k.close()
  1145. k = fs.open("gamesaveborrowed", "w")
  1146. k.writeLine(borrowed)
  1147. k.close()
  1148. k = fs.open("gamesavemoney", "w")
  1149. k.writeLine(money)
  1150. k.close()
  1151. k = fs.open("gamesaverest", "w")
  1152. k.writeLine(rest)
  1153. k.close()
  1154.  
  1155. term.clear()
  1156. term.setCursorPos(1,1)
  1157. break
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163. elseif y == 5 and x == 19 then
  1164. if experience < 44 then
  1165. job = 1
  1166. term.setCursorPos(3,2)
  1167. print("You are at work for 6 hours ")
  1168. sleep(6)
  1169. rest = rest-360
  1170. earnt = experience+6
  1171. money = money+earnt
  1172. term.setCursorPos(3,2)
  1173. print("You now have ", money, " money ")
  1174. sleep(1)
  1175. experience = experience+1
  1176. else
  1177. job = 1
  1178. term.setCursorPos(3,2)
  1179. print("You are at work for 6 hours ")
  1180. sleep(6)
  1181. rest = rest-360
  1182. earnt = experience+6
  1183. money = money+earnt
  1184. term.setCursorPos(3,2)
  1185. print("You now have ", money, " money ")
  1186. sleep(1)
  1187. end
  1188. x = 18
  1189. else
  1190. term.clear()
  1191. term.setCursorPos(1,1)
  1192. print("+-----------------------------------------------+")
  1193. print("| |")
  1194. print("+-----------------------------------------------+")
  1195. print("| +-------------+ +----------+ |")
  1196. print("| +------+ Work | | | |")
  1197. print("| Shop | + | | Town | |")
  1198. print("| +-+ | | | | Hall | |")
  1199. print("| | | +--------+ | | | |")
  1200. print("| +----+ | | | | |")
  1201. print("| +----+ | | |")
  1202. print("| +--------+ + | |")
  1203. print("| + | | |")
  1204. print("| House | + | |")
  1205. print("| + | | | |")
  1206. print("| | | +----------+ |")
  1207. print("|> <SAVE +--------+ |")
  1208. print("+-----------------------------------------------+")
  1209. displayrest = rest/60
  1210. term.setCursorPos(3,2)
  1211. print("Energy: ",displayrest," hours Money: ",money," You have ",items," items")
  1212. term.setCursorPos(x,y)
  1213. print("*")
  1214. id, key = os.pullEvent()
  1215. if key == 208 and y < 16 then
  1216. y = y+1
  1217. elseif key == 208 and y == 16 then
  1218. y = 4
  1219. elseif key == 200 and y > 4 then
  1220. y = y-1
  1221. elseif key == 200 and y == 4 then
  1222. y = 16
  1223. elseif key == 203 and x > 2 then
  1224. x = x-1
  1225. elseif key == 203 and x == 2 then
  1226. x = 48
  1227. elseif key == 205 and x < 48 then
  1228. x = x+1
  1229. elseif key == 205 and x == 48 then
  1230. x = 2
  1231. elseif key == 22 then
  1232. invmenu = 5
  1233. while true do
  1234. term.clear()
  1235. term.setCursorPos(1,1)
  1236. print("+-----------------------------------------------+")
  1237. print("| |")
  1238. print("+-----------------------------------------------+")
  1239. print("| Item Amount Use Item |")
  1240. print("| Burger(s) [ ] |")
  1241. print("| Coke(s) [ ] |")
  1242. print("| Water bottle(s) [ ] |")
  1243. print("| Apple(s) [ ] |")
  1244. print("| Fruitbag(s) [ ] |")
  1245. print("| |")
  1246. print("| |")
  1247. print("| |")
  1248. print("| |")
  1249. print("| |")
  1250. print("| |")
  1251. print("+-----------------------------------------------+")
  1252. term.setCursorPos(41,invmenu)
  1253. print("use")
  1254. term.setCursorPos(3,2)
  1255. print("Inventory...")
  1256. term.setCursorPos(23,5)
  1257. print(burger)
  1258. term.setCursorPos(23,6)
  1259. print(coke)
  1260. term.setCursorPos(23,7)
  1261. print(water)
  1262. term.setCursorPos(23,8)
  1263. print(apple)
  1264. term.setCursorPos(23,9)
  1265. print(fruitbag)
  1266. id, key = os.pullEvent()
  1267. if key == 200 and invmenu > 5 then
  1268. invmenu = invmenu-1
  1269. elseif key == 200 and invmenu == 5 then
  1270. invmenu = 9
  1271. elseif key == 208 and invmenu < 9 then
  1272. invmenu = invmenu+1
  1273. elseif key == 208 and invmenu == 9 then
  1274. invmenu = 5
  1275. elseif key == 28 then
  1276. if invmenu == 5 and burger >= 1 then
  1277. burger = burger-1
  1278. rest = rest+180
  1279. elseif invmenu == 6 and coke >= 1 then
  1280. coke = coke-1
  1281. rest = rest+120
  1282. elseif invmenu == 7 and water >= 1 then
  1283. water = water-1
  1284. if rest < 5 then
  1285. rest = rest+60
  1286. else
  1287. rest = rest+0
  1288. end
  1289. elseif invmenu == 8 and apple >= 1 then
  1290. apple = apple-1
  1291. rest = rest+120
  1292. elseif invmenu == 9 and fruitbag >= 1 then
  1293. fruitbag = fruitbag-1
  1294. rest = rest+180
  1295. else
  1296. term.setCursorPos(3,2)
  1297. print("you have none of that item")
  1298. sleep(2)
  1299. print("looping")
  1300. end
  1301. elseif key == 14 then
  1302. break
  1303. end
  1304. end
  1305.  
  1306.  
  1307.  
  1308.  
  1309. elseif key == 14 then
  1310. term.clear()
  1311. term.setCursorPos(1,1)
  1312. break
  1313. end
  1314. end
  1315. end
  1316. end
  1317. elseif yer == 6 then
  1318. term.setCursorPos(3,8)
  1319. print("coming soon...")
  1320. sleep(3)
  1321. print("looping")
  1322. elseif yer == 7 then
  1323. x = 11
  1324. y = 6
  1325. term.clear()
  1326. term.setCursorPos(1,1)
  1327. break
  1328. end
  1329. end
  1330. end
  1331.  
  1332. elseif y == 10 and x == 11 then
  1333.  
  1334. while true do
  1335. term.clear()
  1336. term.setCursorPos(1,1)
  1337. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  1338. print("O BlueWord-Edit a Program or Document O")
  1339. print("O O")
  1340. print("O Would you like to: O")
  1341. print("O Look at file-problem for files 17 lines+ O")
  1342. print("O Add to file O")
  1343. print("O Edit line in file O")
  1344. print("O Create New/Reset File O")
  1345. print("O Delete File O")
  1346. print("O Exit O")
  1347. print("O Choice: O")
  1348. print("O (First 2 words of choice) O")
  1349. print("O O")
  1350. print("O O")
  1351. print("O O")
  1352. print("O BlueTide OS Made by: Benedict Allen O")
  1353. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  1354. term.setCursorPos(11,11)
  1355. choice = read()
  1356. term.setCursorPos(49,11)
  1357. print("O")
  1358. if choice == "exit" then
  1359. break
  1360.  
  1361. elseif choice == "look at" then
  1362. term.setCursorPos(3,13)
  1363. write("which file? ")
  1364. filetolookat = read()
  1365. if fs.exists(filetolookat) then
  1366. fileopener = fs.open(filetolookat, "r")
  1367. filereader = fileopener.readAll()
  1368. fileopener.close()
  1369. term.clear()
  1370. term.setCursorPos(1,1)
  1371. print(filereader)
  1372. sleep(20)
  1373. print("looping")
  1374. else
  1375. term.setCursorPos(3,14)
  1376. print("file doesn't exist...")
  1377. sleep(2)
  1378. print("looping")
  1379. end
  1380.  
  1381. elseif choice == "delete file" then
  1382. term.setCursorPos(3,13)
  1383. write("File to delete: ")
  1384. delete = read()
  1385. if fs.exists(delete) then
  1386. term.setCursorPos(3,14)
  1387. write("are you sure? ")
  1388. answer = read()
  1389. if answer == "yes" then
  1390. fs.delete(delete)
  1391. else
  1392. end
  1393. else
  1394. term.setCursorPos(3,14)
  1395. print("file is non-existent...")
  1396. sleep(2)
  1397. print("looping")
  1398. end
  1399.  
  1400. elseif choice == "create new" then
  1401. term.setCursorPos(3,13)
  1402. write("What would you like the file to be called? ")
  1403. term.setCursorPos(3,14)
  1404. filename = read()
  1405. term.setCursorPos(49,14)
  1406. print("O")
  1407. if filename ~= "cancel" then
  1408. newfile = fs.open(filename, "w")
  1409. newfile.close()
  1410. else
  1411. print("cancelled")
  1412. sleep(1)
  1413. print("looping")
  1414. end
  1415.  
  1416. elseif choice == "edit line" then
  1417.  
  1418. term.clear()
  1419. term.setCursorPos(1,1)
  1420. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  1421. print("O File Editer - Credits to MysticT O")
  1422. print("O O")
  1423. print("O O")
  1424. print("O O")
  1425. print("O O")
  1426. print("O O")
  1427. print("O O")
  1428. print("O O")
  1429. print("O O")
  1430. print("O O")
  1431. print("O O")
  1432. print("O O")
  1433. print("O O")
  1434. print("O O")
  1435. print("O BlueTide OS Made by: Benedict Allen O")
  1436. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  1437. term.setCursorPos(3,4)
  1438. write("Filename: ")
  1439. local filename = read()
  1440. term.setCursorPos(49,4)
  1441. print("O")
  1442. local file = fs.open(filename, "r")
  1443. if file then
  1444. local tLines = {}
  1445. local sLine = file.readLine()
  1446. while sLine do
  1447. table.insert(tLines, sLine)
  1448. sLine = file.readLine()
  1449. end
  1450. file.close()
  1451. term.setCursorPos(3,5)
  1452. write("Line Number: ")
  1453. local nLine = tonumber(read())
  1454. term.setCursorPos(49,5)
  1455. print("O")
  1456. if nLine then
  1457. term.setCursorPos(3,6)
  1458. print("New Text: ")
  1459. term.setCursorPos(3,7)
  1460. local s = read()
  1461. if nLine > #tLines then
  1462. for i = #tLines, nLine - 1 do
  1463. tLines[i] = ""
  1464. end
  1465. end
  1466. tLines[nLine] = s
  1467. local file = fs.open(filename, "w")
  1468. if file then
  1469. for _,line in ipairs(tLines) do
  1470. file.writeLine(line)
  1471. end
  1472. file.close()
  1473. else
  1474. print("Error opening file to save")
  1475. end
  1476. else
  1477. print("Line has to be a number")
  1478. end
  1479. else
  1480. print("No such file ", filename)
  1481. end
  1482.  
  1483.  
  1484. elseif choice == "add to" then
  1485. term.setCursorPos(3,11)
  1486. write("What file would you like to add to? ")
  1487. p = read()
  1488. if fs.exists(p) then
  1489. while true do
  1490. term.clear()
  1491. term.setCursorPos(1,3)
  1492. npcr = fs.open(p, "r")
  1493. programprint = npcr.readAll()
  1494. print(programprint)
  1495. npcr.close()
  1496. term.setCursorPos(1,2)
  1497. print("Your current text:")
  1498. npcw = fs.open(p, "a")
  1499. term.setCursorPos(1,1)
  1500. npw = read()
  1501. if npw == "exit" then
  1502. npcw.close()
  1503. break
  1504. else
  1505. npcw.writeLine(npw)
  1506. npcw.close()
  1507. end
  1508. end
  1509. else
  1510. file = fs.open(p, "w")
  1511. file.close()
  1512. term.setCursorPos(3,13)
  1513. print("file created...")
  1514. sleep(2)
  1515. print("looping")
  1516. end
  1517.  
  1518.  
  1519.  
  1520. end
  1521. end
  1522.  
  1523.  
  1524. elseif y == 6 and x == 29 then
  1525.  
  1526. while true do
  1527. term.clear()
  1528. term.setCursorPos(1,1)
  1529. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  1530. print("O Please type in the the number of the option O")
  1531. print("O you would like to choose and exit to bo back O")
  1532. print("O O")
  1533. print("O 1. Redstone setter 6.N/A FIle Browser O")
  1534. print("O 2. Change account O")
  1535. print("O 3. Label computer O")
  1536. print("O 4. Monitor print O")
  1537. print("O 5. Reboot O")
  1538. print("O O")
  1539. print("O O")
  1540. print("O O")
  1541. print("O O")
  1542. print("O O")
  1543. print("O O")
  1544. print("O BlueTide OS Made by: Benedict Allen O")
  1545. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  1546. term.setCursorPos(3,4)
  1547. option = read()
  1548. term.setCursorPos(49,4)
  1549. print("O")
  1550. if option == "1" then
  1551. term.setCursorPos(3,10)
  1552. print("Which side would you like to set an output")
  1553. term.setCursorPos(3,11)
  1554. write ("from? ")
  1555. rsside = read()
  1556. term.setCursorPos(3,12)
  1557. write("how many seconds? ")
  1558. rstime = read()
  1559. rs.setOutput(rsside, true )
  1560. sleep(rstime)
  1561. rs.setOutput(rsside, false )
  1562. sleep(0.5)
  1563. print(" ")
  1564.  
  1565. elseif option == "exit" then
  1566. break
  1567.  
  1568. elseif option == "2" then
  1569.  
  1570. term.setCursorPos(3,10)
  1571. print("Please put in your password: ")
  1572. term.setCursorPos(3,11)
  1573. passwordinput = read("*")
  1574. filereader = fs.open("password", "r")
  1575.  
  1576. password = filereader.readLine()
  1577.  
  1578. filereader.close()
  1579. filereader = fs.open("password2", "r")
  1580.  
  1581. password2 = filereader.readLine()
  1582.  
  1583. filereader.close()
  1584. if (passwordinput == password or passwordinput == password2) then
  1585.  
  1586. y = 5
  1587.  
  1588. while true do
  1589. term.clear()
  1590. term.setCursorPos(1,1)
  1591. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  1592. print("O Local User Account Control O")
  1593. print("O O")
  1594. print("O O")
  1595. print("O O")
  1596. print("O O")
  1597. print("O O")
  1598. print("O O")
  1599. print("O O")
  1600. print("O O")
  1601. print("O O")
  1602. print("O O")
  1603. print("O O")
  1604. print("O O")
  1605. print("O O")
  1606. print("O BlueTide OS Made by: Benedict Allen O")
  1607. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  1608.  
  1609. term.setCursorPos(17,y)
  1610. print("<")
  1611. term.setCursorPos(35,y)
  1612. print(">")
  1613.  
  1614. term.setCursorPos(19,5)
  1615. print("Change username")
  1616. term.setCursorPos(19,6)
  1617. print("Change password")
  1618. term.setCursorPos(20,7)
  1619. print("Edit account 2")
  1620. term.setCursorPos(19,8)
  1621. print("Reset account 2")
  1622. term.setCursorPos(20,9)
  1623. print("Reset account")
  1624. term.setCursorPos(24,10)
  1625. print("Exit")
  1626.  
  1627. id, key = os.pullEvent()
  1628.  
  1629. if key == 200 and y ~= 5 then
  1630. y = y-1
  1631. elseif key == 200 and y == 5 then
  1632. y = 10
  1633. elseif key == 208 and y ~= 10 then
  1634. y = y+1
  1635. elseif key == 208 and y == 10 then
  1636. y = 5
  1637. elseif key == 28 then
  1638. if y == 5 then
  1639. term.setCursorPos(3,12)
  1640. print("Please type in your new username")
  1641. term.setCursorPos(3,13)
  1642. write("username: ")
  1643. usernameinput = read()
  1644. term.setCursorPos(49,13)
  1645. print("O")
  1646. username = fs.open("username", "w")
  1647. username.write(usernameinput)
  1648. username.close()
  1649. term.setCursorPos(3,13)
  1650. print("username saved ")
  1651. sleep(3)
  1652. print("looping")
  1653.  
  1654. elseif y == 6 then
  1655. term.setCursorPos(3,12)
  1656. print("Please type in your new password")
  1657. term.setCursorPos(3,13)
  1658. write("password: ")
  1659. passwordinput = read()
  1660. term.setCursorPos(49,13)
  1661. print("O")
  1662. password = fs.open("password", "w" )
  1663. password.write(passwordinput)
  1664. password.close()
  1665. term.setCursorPos(3,13)
  1666. print("password saved ")
  1667. sleep(3)
  1668. print("looping")
  1669.  
  1670. elseif y == 7 then
  1671. term.setCursorPos(3,12)
  1672. write("what would you like the account to be called: ")
  1673. term.setCursorPos(3,13)
  1674. username2 = read()
  1675. term.setCursorPos(3,13)
  1676. print("O")
  1677. newaccount = fs.open("username2", "w")
  1678. newaccount.writeLine(username2)
  1679. newaccount.close()
  1680. term.setCursorPos(3,13)
  1681. write("what would you like the password to be: ")
  1682. term.setCursorPos(3,14)
  1683. password2 = read()
  1684. term.setCursorPos(3,14)
  1685. print("O")
  1686. newaccount = fs.open("password2", "w")
  1687. newaccount.writeLine(password2)
  1688. newaccount.close()
  1689. term.setCursorPos(3,14)
  1690. print("account created")
  1691. sleep(2)
  1692. print("looping")
  1693.  
  1694. elseif y == 8 then
  1695. term.setCursorPos(3,12)
  1696. write("Are you sure? ")
  1697. sure = read()
  1698. if sure == "yes" then
  1699. k = fs.open("username2")
  1700. k.writeLine("newuser")
  1701. k.close()
  1702. k = fs.open("password2")
  1703. k.writeLine("pass")
  1704. k.close()
  1705. term.setCursorPos(3,13)
  1706. print("deleted...")
  1707. sleep(2)
  1708. print("looping")
  1709. else
  1710. term.setCursorPos(3,13)
  1711. print("cancelling...")
  1712. sleep(2)
  1713. print("looping")
  1714. end
  1715.  
  1716. elseif y == 9 then
  1717. term.setCursorPos(3,12)
  1718. write("Are you sure? ")
  1719. sure = read()
  1720. if sure == "yes" then
  1721. term.setCursorPos(3,13)
  1722. print("resetting...")
  1723. sleep(2)
  1724. reset = fs.open("username", "w" )
  1725. reset.writeLine("newuser")
  1726. reset.close()
  1727. reset = fs.open("password", "w" )
  1728. reset.writeLine("pass")
  1729. reset.close()
  1730. else
  1731. term.setCursorPos(3,13)
  1732. print("cancelled...")
  1733. sleep(2)
  1734. print("looping")
  1735.  
  1736. end
  1737.  
  1738. elseif y == 10 then
  1739. break
  1740. end
  1741.  
  1742. end
  1743.  
  1744. end
  1745.  
  1746. else
  1747. term.setCursorPos(3,11)
  1748. print("password incorrect...")
  1749. sleep(2)
  1750. print("looping")
  1751. end
  1752.  
  1753.  
  1754. elseif option == "3" then
  1755. term.setCursorPos(3,10)
  1756. print("what would you like to set the computer label")
  1757. term.setCursorPos(3,11)
  1758. write("to? ")
  1759. label = read()
  1760. os.setComputerLabel(label)
  1761.  
  1762. elseif option == "4" then
  1763. term.setCursorPos(3,10)
  1764. print("what side is the monitor on")
  1765. term.setCursorPos(3,11)
  1766. side = read()
  1767. term.setCursorPos(3,12)
  1768. print("what do you want to print?, print nothing to")
  1769. term.setCursorPos(3,13)
  1770. write("clear... ")
  1771. input = read()
  1772. term.setCursorPos(3,13)
  1773. print("type yes to continue...")
  1774. term.setCursorPos(3,14)
  1775. answer = read()
  1776. if answer == "yes" then
  1777. monitor = peripheral.wrap(side)
  1778. term.redirect(monitor)
  1779. term.clear()
  1780. term.setCursorPos(1,1)
  1781. print(input)
  1782. term.restore()
  1783. else
  1784. term.setCursorPos(3,14)
  1785. print("cancelled")
  1786. sleep(1)
  1787. print("looping")
  1788. end
  1789.  
  1790. elseif option == "5" then
  1791. os.reboot()
  1792.  
  1793. else
  1794. term.setCursorPos(3,10)
  1795. print("unrecognised command...")
  1796. sleep(2)
  1797. print("looping")
  1798. end
  1799. end
  1800.  
  1801. elseif y == 8 and x == 29 then
  1802.  
  1803. while true do
  1804. term.clear()
  1805. term.setCursorPos(1,1)
  1806. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  1807. print("O O")
  1808. print("O O")
  1809. print("O O")
  1810. print("O O")
  1811. print("O O")
  1812. print("O O")
  1813. print("O O")
  1814. print("O O")
  1815. print("O O")
  1816. print("O O")
  1817. print("O O")
  1818. print("O O")
  1819. print("O O")
  1820. print("O O")
  1821. print("O BlueTide OS Made by: Benedict Allen O")
  1822. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  1823.  
  1824.  
  1825. term.setCursorPos(3,3)
  1826. print("This is the Login page. Default settings are;")
  1827. term.setCursorPos(3,4)
  1828. print("username: newuser")
  1829. term.setCursorPos(3,5)
  1830. print("password: pass")
  1831.  
  1832. term.setCursorPos(3,7)
  1833. write("username: ")
  1834. usernameinput = read()
  1835. term.setCursorPos(49,7)
  1836. print("O")
  1837. filereader = fs.open("username", "r")
  1838.  
  1839. username = filereader.readLine()
  1840.  
  1841. filereader.close()
  1842. filereader = fs.open("username2", "r")
  1843.  
  1844. username2 = filereader.readLine()
  1845.  
  1846. filereader.close()
  1847. if (usernameinput == username or usernameinput == username2) then
  1848.  
  1849.  
  1850. term.setCursorPos(3,8)
  1851. write("password: ")
  1852. passwordinput = read("*")
  1853. term.setCursorPos(49,8)
  1854. print("O")
  1855.  
  1856. filereader = fs.open("password", "r")
  1857.  
  1858. password = filereader.readLine()
  1859.  
  1860. filereader.close()
  1861. filereader = fs.open("password2", "r")
  1862.  
  1863. password2 = filereader.readLine()
  1864.  
  1865. filereader.close()
  1866. if (passwordinput == password and usernameinput == username or passwordinput == password2 and usernameinput == username2) then
  1867. break
  1868.  
  1869. else
  1870. term.setCursorPos(3,9)
  1871. print("incorrect password")
  1872. sleep(2)
  1873. print("nothing")
  1874. end
  1875.  
  1876. else
  1877. term.setCursorPos(3,8)
  1878. print("incorrect username")
  1879. sleep(2)
  1880. print("nope")
  1881. end
  1882. end
  1883.  
  1884. elseif y == 10 and x == 29 then
  1885. term.setCursorPos(11,5)
  1886. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  1887. term.setCursorPos(10,6)
  1888. print("O O")
  1889. term.setCursorPos(10,7)
  1890. print("O Are you sure you want to O")
  1891. term.setCursorPos(10,8)
  1892. print("O shutdown? O")
  1893. term.setCursorPos(10,9)
  1894. print("O Press enter to shutdown O")
  1895. term.setCursorPos(10,10)
  1896. print("O Press any key to cancel O")
  1897. term.setCursorPos(10,11)
  1898. print("O Press r to reboot O")
  1899. term.setCursorPos(10,12)
  1900. print("O O")
  1901. term.setCursorPos(11,13)
  1902. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  1903. id, key = os.pullEvent()
  1904. if key == 28 then
  1905. os.shutdown()
  1906. elseif key == 19 then
  1907. os.reboot()
  1908.  
  1909. else
  1910. sleep(2)
  1911. print("looping")
  1912. end
  1913.  
  1914. end
  1915.  
  1916. end
  1917. end
  1918. else
  1919. term.setCursorPos(3,9)
  1920. print("incorrect password")
  1921. sleep(2)
  1922. print("nothing")
  1923. end
  1924.  
  1925. else
  1926. term.setCursorPos(3,8)
  1927. print("incorrect username")
  1928. sleep(2)
  1929. print("nothing")
  1930. end
  1931. end
  1932.  
  1933.  
  1934. else
  1935.  
  1936. y = 7
  1937. c = 19
  1938.  
  1939. while true do
  1940.  
  1941. term.clear()
  1942. term.setCursorPos(1,1)
  1943. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  1944. print("O Welcome to your new computer, there are O")
  1945. print("O currently 2 known systems loaded. O")
  1946. print("O Would you like to install and run BlueTide OS O")
  1947. print("O O")
  1948. print("O O")
  1949. print("O Install O")
  1950. print("O Uninstall O")
  1951. print("O Quit O")
  1952. print("O O")
  1953. print("O O")
  1954. print("O O")
  1955. print("O O")
  1956. print("O O")
  1957. print("O O")
  1958. print("O BlueTide OS Made by: Benedict Allen O")
  1959. print("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
  1960. term.setCursorPos(c,y)
  1961. print(">")
  1962.  
  1963. event, key = os.pullEvent()
  1964. if key == 208 and y < 9 then
  1965. y = y+1
  1966. elseif key == 208 and y == 9 then
  1967. y = 7
  1968. elseif key == 200 and y > 7 then
  1969. y = y-1
  1970. elseif key == 200 and y == 7 then
  1971. y = 9
  1972. elseif key == 28 then
  1973. if y == 7 then
  1974.  
  1975. term.setCursorPos(3,6)
  1976. write("checking left...")
  1977. sleep(1)
  1978. print("status: ", peripheral.isPresent("left"), ", type: ", peripheral.getType("left"))
  1979. term.setCursorPos(3,7)
  1980. write("checking right...")
  1981. sleep(1)
  1982. print("status: ", peripheral.isPresent("right"), ", type: ", peripheral.getType("right"))
  1983. term.setCursorPos(3,8)
  1984. write("checking back...")
  1985. sleep(1)
  1986. print("status: ", peripheral.isPresent("back"), ", type: ", peripheral.getType("back"))
  1987. term.setCursorPos(3,9)
  1988. write("checking bottom...")
  1989. sleep(1)
  1990. print("status: ", peripheral.isPresent("bottom"), ", type: ", peripheral.getType("bottom"))
  1991. term.setCursorPos(3,10)
  1992. write("checking top...")
  1993. sleep(1)
  1994. print("status: ", peripheral.isPresent("top"), ", type: ", peripheral.getType("top"))
  1995. sleep(2)
  1996. term.setCursorPos(3,11)
  1997. print("peripherals assessed")
  1998. term.setCursorPos(3,12)
  1999. print("writing user files...")
  2000. username2 = fs.open("username2", "w")
  2001. username2.write("newuser")
  2002. username2.close()
  2003. password2 = fs.open("password2", "w")
  2004. password2.write("pass")
  2005. password2.close()
  2006. username = fs.open("username", "w")
  2007. username.write("newuser")
  2008. username.close()
  2009. password = fs.open("password", "w")
  2010. password.write("pass")
  2011. password.close()
  2012. startup = fs.open("startup", "w")
  2013. startup.write("shell.run(\"BlueTideOS-all-in-one\")")
  2014. startup.close()
  2015. term.setCursorPos(3,13)
  2016. print("creating system files...")
  2017. tutorial = fs.open("tutorial", "w")
  2018. tutorial.writeLine("m = 1")
  2019. tutorial.writeLine("term.clear()")
  2020. tutorial.writeLine("term.setCursorPos(1,1)")
  2021. tutorial.writeLine("print(\"O Tutorial Page 1 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\")")
  2022. tutorial.writeLine("print(\"O O\")")
  2023. tutorial.writeLine("print(\"O BlueTide OS Tutorial O\")")
  2024. tutorial.writeLine("print(\"O As this tutorial is in its early stages it O\")")
  2025. tutorial.writeLine("print(\"O only covers basic door locks, please contact O\")")
  2026. tutorial.writeLine("print(\"O the developer if you have any ideas or O\")")
  2027. tutorial.writeLine("print(\"O suggestions regarding what to include in this O\")")
  2028. tutorial.writeLine("print(\"O tutorial, thank you. O\")")
  2029. tutorial.writeLine("print(\"O Tutorial 1: user input and printing-doorlocks O\")")
  2030. tutorial.writeLine("print(\"O I have used - insead of speech marks O\")")
  2031. tutorial.writeLine("print(\"O To print/write something to the page, type in O\")")
  2032. tutorial.writeLine("print(\"O print(-whatever you want it to write-) O\")")
  2033. tutorial.writeLine("print(\"O You might want it to say O\")")
  2034. tutorial.writeLine("print(\"O please put in your password: O\")")
  2035. tutorial.writeLine("print(\"O O\")")
  2036. tutorial.writeLine("print(\"O BlueTide OS Made by: Benedict Allen O\")")
  2037. tutorial.writeLine("print(\"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\")")
  2038. tutorial.writeLine("term.setCursorPos(1,1)")
  2039. tutorial.writeLine("while true do")
  2040. tutorial.writeLine("event, key = os.pullEvent()")
  2041. tutorial.writeLine("if key == 203 then")
  2042. tutorial.writeLine("m = m - 1")
  2043. tutorial.writeLine("elseif key == 205 then")
  2044. tutorial.writeLine("m = m + 1")
  2045. tutorial.writeLine("elseif key == 14 then")
  2046. tutorial.writeLine("shell.run(\"bluetideos\")")
  2047. tutorial.writeLine("end")
  2048. tutorial.writeLine("if m == 1 then ")
  2049. tutorial.writeLine("term.clear()")
  2050. tutorial.writeLine("term.setCursorPos(1,1)")
  2051. tutorial.writeLine("print(\"O Tutorial Page 1 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\")")
  2052. tutorial.writeLine("print(\"O O\")")
  2053. tutorial.writeLine("print(\"O BlueTide OS Tutorial O\")")
  2054. tutorial.writeLine("print(\"O As this tutorial is in its early stages it O\")")
  2055. tutorial.writeLine("print(\"O only covers basic door locks, please contact O\")")
  2056. tutorial.writeLine("print(\"O the developer if you have any ideas or O\")")
  2057. tutorial.writeLine("print(\"O suggestions regarding what to include in this O\")")
  2058. tutorial.writeLine("print(\"O tutorial, thank you. O\")")
  2059. tutorial.writeLine("print(\"O Tutorial 1: user input and printing-doorlocks O\")")
  2060. tutorial.writeLine("print(\"O I have used - instead of speech marks O\")")
  2061. tutorial.writeLine("print(\"O To print/write something to the page, type in O\")")
  2062. tutorial.writeLine("print(\"O print(-whatever you want it to write-) O\")")
  2063. tutorial.writeLine("print(\"O You might want it to say O\")")
  2064. tutorial.writeLine("print(\"O please put in your password: O\")")
  2065. tutorial.writeLine("print(\"O O\")")
  2066. tutorial.writeLine("print(\"O BlueTide OS Made by: Benedict Allen O\")")
  2067. tutorial.writeLine("print(\"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\")")
  2068. tutorial.writeLine("elseif m == 2 then")
  2069. tutorial.writeLine("term.clear()")
  2070. tutorial.writeLine("term.setCursorPos(1,1)")
  2071. tutorial.writeLine("print(\"O Tutorial Page 2 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\")")
  2072. tutorial.writeLine("print(\"O You would do this by typing print(-please O\")")
  2073. tutorial.writeLine("print(\"O put in your password: -) O\")")
  2074. tutorial.writeLine("print(\"O If you want their cursor to be after the word O\")")
  2075. tutorial.writeLine("print(\"O password: , use write(-please put in your O\")")
  2076. tutorial.writeLine("print(\"O password: -), i would recommend this. O\")")
  2077. tutorial.writeLine("print(\"O To get user input you type password = read() O\")")
  2078. tutorial.writeLine("print(\"O This would make password the variable O\")")
  2079. tutorial.writeLine("print(\"O Then you can type if password == -your O\")")
  2080. tutorial.writeLine("print(\"O password- then O\")")
  2081. tutorial.writeLine("print(\"O Do things i.e. rs.setOutput(-side-, true/ O\")")
  2082. tutorial.writeLine("print(\"O false ) or print(-password correct-) O\")")
  2083. tutorial.writeLine("print(\"O if you want it to do some thing if they get O\")")
  2084. tutorial.writeLine("print(\"O it wrong then you type else after the do O\")")
  2085. tutorial.writeLine("print(\"O things part O\")")
  2086. tutorial.writeLine("print(\"O BlueTide OS Made by: Benedict Allen O\")")
  2087. tutorial.writeLine("print(\"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\")")
  2088. tutorial.writeLine("elseif m == 3 then")
  2089. tutorial.writeLine("term.clear()")
  2090. tutorial.writeLine("term.setCursorPos(1,1)")
  2091. tutorial.writeLine("print(\"O Tutorial Page 3 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\")")
  2092. tutorial.writeLine("print(\"O For example print(-incorrect password-) O\")")
  2093. tutorial.writeLine("print(\"O to make your computer reboot or shutdown type O\")")
  2094. tutorial.writeLine("print(\"O os.reboot() or os.shutdown() O\")")
  2095. tutorial.writeLine("print(\"O O\")")
  2096. tutorial.writeLine("print(\"O O\")")
  2097. tutorial.writeLine("print(\"O O\")")
  2098. tutorial.writeLine("print(\"O O\")")
  2099. tutorial.writeLine("print(\"O O\")")
  2100. tutorial.writeLine("print(\"O O\")")
  2101. tutorial.writeLine("print(\"O O\")")
  2102. tutorial.writeLine("print(\"O thankyou for using the bluetide os and O\")")
  2103. tutorial.writeLine("print(\"O tutorial O\")")
  2104. tutorial.writeLine("print(\"O O\")")
  2105. tutorial.writeLine("print(\"O O\")")
  2106. tutorial.writeLine("print(\"O BlueTide OS Made by: Benedict Allen O\")")
  2107. tutorial.writeLine("print(\"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\")")
  2108. tutorial.writeLine("end")
  2109. tutorial.writeLine("end")
  2110. tutorial.close()
  2111.  
  2112. z = fs.open("BLUTD-resetinhibiter", "w")
  2113. z.close()
  2114. sleep(2)
  2115. term.setCursorPos(3,14)
  2116. print("Thank you for installing BlueTide OS for ")
  2117. term.setCursorPos(3,15)
  2118. print("computercraft...")
  2119.  
  2120. sleep(2)
  2121.  
  2122. os.reboot()
  2123.  
  2124. elseif y == 8 then
  2125.  
  2126. fs.delete("bluetideos")
  2127. fs.delete("setup")
  2128. fs.delete("bluetideos-all-in-one")
  2129. os.reboot()
  2130.  
  2131. elseif y == 9 then
  2132. term.clear()
  2133. term.setCursorPos(1,1)
  2134. break
  2135.  
  2136. end
  2137. end
  2138. end
  2139.  
  2140. end
Add Comment
Please, Sign In to add comment