Advertisement
yoyoyyoghurtboyyyy

Untitled

Nov 22nd, 2021
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. --[[ Power Monitoring Program Written By: 0_Mr_Redstone_0 AKA MoJoCreatior
  2. This code is considered free for use both commercial and private and can be redistributed so long as it meats following criteria:
  3. 1: 0_Mr_Redstone_0 and MoJoCreatior are credited as the original authors
  4. 2: You do not try to take full ownership of the code/written program
  5. 3: If you modify the code for re-upload you must provide it under the same conditions. as in- Open Source, and credit me as original author]]
  6.  
  7. program = "Power Monitor"
  8. setup = "fjZjjaHR"
  9. program = "XYNPGRgb"
  10.  
  11. --functions
  12. function intro()
  13. term.setBackgroundColour(colors.white)
  14. term.clear()
  15. term.setCursorPos(1,1)
  16. term.setTextColour(colors.green)
  17. print(program.." -Written By: 0_Mr_Redstone_0 AKA MoJoCreatior\n")
  18. end
  19.  
  20. function install()
  21. fs.delete("setup.lua")
  22. fs.delete("program.lua")
  23. fs.delete("config/")
  24. shell.run("pastebin get "..setup.." setup.lua")
  25. shell.run("pastebin get "..program.." program.lua")
  26. fs.delete("startup")
  27. startup = fs.open("startup","w")
  28. startup.write('shell.run("setup.lua")')
  29. startup.close()
  30. if fs.exists("config/update") == true then print("Updated")
  31. else print("Installed")
  32. end
  33. end
  34.  
  35. function configSave(name,data)
  36. cfg = fs.open("config/"..name,"w")
  37. cfg.write(data)
  38. cfg.close()
  39. end
  40.  
  41. intro()
  42.  
  43. if peripheral.find("monitor") == nil then
  44. print("Connect Monitor!") print("terminating") sleep(2.5) os.reboot()
  45. end
  46.  
  47. install()
  48. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement