Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- verze = "21.1018.R1"
- runstart = 0
- local w,h = term.getSize()
- local function prc(text, y)
- local w = term.getSize()
- local _, cy = term.getCursorPos()
- term.setCursorPos(math.ceil((w-#text)/2), y or cy)
- write(text)
- end
- function clear()
- term.clear()
- term.setBackgroundColor(colors.white)
- for i=1,w do
- for j=1,h do
- term.setCursorPos(i,j)
- write(" ")
- end
- end
- end
- function checkVyvoj() if not fs.exists("/C/system/Users/"..user.."/vyvoj") then vyvoj = false else vyvoj = true end end
- function start ()
- if not fs.exists ("/C/system/RAM/bluescreen") then
- local data = fs.open ("/C/system/RAM/bluescreen", "w")
- data.close ()
- if not fs.exists ("/C/system/.core/desktop.lua") then
- shell.run ("pastebin get HyhMtGvd /C/system/.core/desktop.lua")
- end
- local f=fs.open("/C/system/RAM/user","r")
- user=f.readLine()
- f.close()
- checkVyvoj()
- if fs.exists("/C/system/Users/"..user.."/startupProgram") then
- if fs.exists("/C/system/Users/"..user.."/startupProgram") then
- local f=fs.open("/C/system/Users/"..user.."/startupProgram","r")
- afterstart=f.readLine()
- f.close()
- runstart = 1
- end
- end
- if fs.exists("/C/system/.core/display") then
- local f=fs.open("/C/system/.core/display","r")
- monitor=f.readLine()
- f.close()
- term.setTextColor(colors.white)
- if runstart == 1 then
- runstart = 0
- term.clear()
- prc("Connected to an external monitor",h/2)
- term.setTextColor(colors.black)
- shell.run("monitor "..monitor.." "..afterstart)
- else
- term.clear()
- prc("Connected to an external monitor",h/2)
- term.setTextColor(colors.black)
- shell.run("monitor "..monitor.." /C/system/.core/desktop.lua")
- end
- end
- if runstart == 1 then
- runstart = 0
- shell.run(afterstart)
- shell.run("/C/system/.core/desktop.lua")
- else
- shell.run("/C/system/.core/desktop.lua")
- end
- if fs.exists("/C/system/RAM/logout") then shell.run("/startup.lua") end
- end
- checkVyvoj()
- if vyvoj then error() end
- os.pullEvent = os.pullEventRaw
- term.setBackgroundColor(colors.blue)
- term.setTextColor(colors.white)
- term.clear()
- prc("Pepdroll has been Crashed!",2)
- local shutWin = window.create(term.current(),4,5,21,4)
- shutWin.setBackgroundColor(colors.lightBlue)
- shutWin.clear()
- shutWin.setCursorPos(2,2)
- shutWin.write("Turn off computer")
- shutWin = window.create(term.current(),4,10,21,4)
- shutWin.setBackgroundColor(colors.lightBlue)
- shutWin.clear()
- shutWin.setCursorPos(2,2)
- shutWin.write("Restart computer")
- shutWin = window.create(term.current(),4,15,21,4)
- shutWin.setBackgroundColor(colors.lightBlue)
- shutWin.clear()
- shutWin.setCursorPos(2,2)
- shutWin.write("Commander")
- shutWin = window.create(term.current(),28,5,21,4)
- shutWin.setBackgroundColor(colors.lightBlue)
- shutWin.clear()
- shutWin.setCursorPos(2,2)
- shutWin.write("Reset Core & Setting")
- shutWin = window.create(term.current(),28,10,21,4)
- shutWin.setBackgroundColor(colors.lightBlue)
- shutWin.clear()
- shutWin.setCursorPos(2,2)
- shutWin.write("Reinstall system")
- shutWin = window.create(term.current(),28,15,21,4)
- shutWin.setBackgroundColor(colors.lightBlue)
- shutWin.clear()
- shutWin.setCursorPos(2,2)
- checkVyvoj()
- if vyvoj then shutWin.write("Disable Dev Mode") else shutWin.write(" Enable Dev Mode ") end
- while true do
- local event, button, x, y = os.pullEvent("mouse_click")
- if x >= 4 and x <= 24 and y >= 5 and y <= 8 then
- os.shutdown()
- elseif x >= 4 and x <= 24 and y >= 10 and y <= 13 then
- os.reboot()
- elseif x >= 4 and x <= 24 and y >= 15 and y <= 18 then
- term.setBackgroundColor(colors.black)
- term.setCursorPos (1,1)
- term.clear ()
- term.setTextColor(colors.yellow)
- print "Commander"
- term.setTextColor(colors.white)
- term.setCursorPos (1,2)
- if not fs.exists("/C/system/api/commander.lua") then
- shell.run ("pastebin get LY8cUArW /C/system/api/commander.lua")
- end
- shell.run ("/cd /")
- shell.run ("/C/system/api/commander.lua")
- elseif x >= 28 and x <= 48 and y >= 5 and y <= 8 then
- fs.delete("/C/system/.core/defmodem")
- fs.delete("/C/system/.core/defuser")
- fs.delete("/C/system/.core/display")
- os.reboot()
- elseif x >= 28 and x <= 48 and y >= 10 and y <= 13 then
- fs.delete("/C")
- os.reboot()
- elseif x >= 28 and x <= 48 and y >= 15 and y <= 18 then
- if vyvoj then
- fs.exists("/C/system/Users/"..user.."/vyvoj")
- else
- local data=fs.open("/C/system/Users/"..user.."/vyvoj","w") data.close()
- os.reboot()
- end
- end
- end
- end
- start ()
Add Comment
Please, Sign In to add comment