Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local _exit = false
- function _exitScript()
- local event, key = os.pullEvent( "key" ) -- limit os.pullEvent to the 'key' event
- if key == keys.e then -- if the key pressed was 'e'
- print("Script Stopped")
- _exit = true
- end
- return true
- end
- while not _exit do
- term.clear()
- term.setCursorPos(1,1)
- print("----- PRESS TO INSTALL -----")
- print( "-- 1 to Install Monitor Script" )
- print( "-- 2 to Install Sender Script" )
- print ("-- 3 to Install Receiver Script")
- print("")
- print( "-- E to exit Script." )
- print( "-- R to reboot system and start installed script." )
- local event, key = os.pullEvent( "key" ) -- limit os.pullEvent to the 'key' event
- if key == 2 then -- key 1
- shell.run("rm startup")
- shell.run("pastebin get tHrMpZTC startup")
- elseif key == 3 then -- key 2
- shell.run("rm startup")
- shell.run("pastebin get tHrcJsQd startup")
- elseif key == 4 then -- key 3
- shell.run("rm startup")
- shell.run("pastebin get uZ8NFbSF startup")
- elseif key == keys.e then -- e
- print("Script Stopped")
- _exit = true
- elseif key == keys.r then -- r
- os.reboot()
- end
- if not _exit then
- sleep(3)
- print("Complete")
- sleep(5)
- end
- end
Add Comment
Please, Sign In to add comment