INFO:
I Will Not Be Updating This Code
Because It Will Work Even In MC 1.7.8 ( << Example)
And I Want To Make Other Program's.
local termWidth, termHeight = term.getSize()
local selectedItem = 1
local onMainMenu = true
function CleanBoot()
term.clear()
term.setCursorPos(1,1)
print("Clean Boot Selected")
print("Starting a Clean Startup File")
textutils.slowPrint("All Threat's Are
Successfuly Gone!")
sleep(2)
onMainMenu = false
end
function load()
print("Recompiling File's.")
sleep(1)
term.clear()
term.setCursorPos(1, 1)
print("Recompiling File's..")
sleep(1)
term.clear()
term.setCursorPos(1, 1)
print("Recompiling File's...")
sleep(1)
term.clear()
term.setCursorPos(1, 1)
print("Recompiling File's..")
sleep(1)
term.clear()
term.setCursorPos(1, 1)
print("Recompiling File's.")
sleep(1)
term.clear()
term.setCursorPos(1, 1)
print("Recompiling File's..")
sleep(1)
term.clear()
term.setCursorPos(1, 1)
print("Recompiling File's...")
sleep(1)
term.clear()
term.setCursorPos(1, 1)
print("Recompiling File's..")
sleep(1)
term.clear()
term.setCursorPos(1, 1)
print("Recompiling File's.")
sleep(1)
term.clear()
term.setCursorPos(1, 1)
fs.delete("startup")
print("All Modified Startup's Are Gone")
sleep(2)
end
function checkFiles()
term.clear()
term.setCursorPos(1,1)
load()
end
function Exit()
onMainMenu = false
end
mainMenu = {
[1] = { text = "Clean Boot (Use After
Recompiling)", handler = CleanBoot },
[2] = { text = "Recompile", handler = checkFiles
},
[3] = { text = "Exit", handler = Exit }
}
function printMenu( menu )
for i=1,#menu do
if i == selectedItem then
print(">> "..menu[i].text)
else
print(" "..menu[i].text)
end
end
end
function onKeyPressed( key, menu )
if key == keys.enter then
onItemSelected(menu)
elseif key == keys.up then
if selectedItem > 1 then
selectedItem = selectedItem - 1
end
elseif key == keys.down then
if selectedItem < #menu then
selectedItem = selectedItem + 1
end
end
end
function onItemSelected( menu )
menu[selectedItem].handler()
end
function main()
while onMainMenu do
term.clear()
term.setCursorPos(1,1)
printMenu(mainMenu)
event, key = os.pullEvent("key")
onKeyPressed(key,mainMenu)
end
end
main()
Thank You! :D/>