Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Power Monitoring Program Written By: 0_Mr_Redstone_0 AKA MoJoCreatior
- This code is considered free for use both commercial and private and can be redistributed so long as it meats following criteria:
- 1: 0_Mr_Redstone_0 and MoJoCreatior are credited as the original authors
- 2: You do not try to take full ownership of the code/written program
- 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]]
- program = "Power Monitor"
- setup = "fjZjjaHR"
- program = "XYNPGRgb"
- --functions
- function intro()
- term.setBackgroundColour(colors.white)
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColour(colors.green)
- print(program.." -Written By: 0_Mr_Redstone_0 AKA MoJoCreatior\n")
- end
- function install()
- fs.delete("setup.lua")
- fs.delete("program.lua")
- fs.delete("config/")
- shell.run("pastebin get "..setup.." setup.lua")
- shell.run("pastebin get "..program.." program.lua")
- fs.delete("startup")
- startup = fs.open("startup","w")
- startup.write('shell.run("setup.lua")')
- startup.close()
- if fs.exists("config/update") == true then print("Updated")
- else print("Installed")
- end
- end
- function configSave(name,data)
- cfg = fs.open("config/"..name,"w")
- cfg.write(data)
- cfg.close()
- end
- intro()
- if peripheral.find("monitor") == nil then
- print("Connect Monitor!") print("terminating") sleep(2.5) os.reboot()
- end
- install()
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement