pepeknamornik

BSOD

Jun 19th, 2019 (edited)
2,092
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.54 KB | None | 0 0
  1. verze = "21.1018.R1"
  2. runstart = 0
  3.  
  4. local w,h = term.getSize()
  5. local function prc(text, y)
  6.   local w = term.getSize()
  7.   local _, cy = term.getCursorPos()
  8.   term.setCursorPos(math.ceil((w-#text)/2), y or cy)
  9.   write(text)
  10. end
  11.    
  12. function clear()
  13.   term.clear()
  14.   term.setBackgroundColor(colors.white)
  15.   for i=1,w do
  16.     for j=1,h do
  17.       term.setCursorPos(i,j)
  18.       write(" ")
  19.     end
  20.   end
  21. end
  22.  
  23. function checkVyvoj() if not fs.exists("/C/system/Users/"..user.."/vyvoj") then vyvoj = false else vyvoj = true end end
  24.  
  25. function start ()
  26.    
  27.     if not fs.exists ("/C/system/RAM/bluescreen") then
  28.         local data = fs.open ("/C/system/RAM/bluescreen", "w")
  29.         data.close ()
  30.     if not fs.exists ("/C/system/.core/desktop.lua") then
  31.     shell.run ("pastebin get HyhMtGvd /C/system/.core/desktop.lua")
  32.     end
  33.    
  34.     local f=fs.open("/C/system/RAM/user","r")
  35.     user=f.readLine()
  36.     f.close()
  37.    
  38.        checkVyvoj()
  39.    
  40.     if fs.exists("/C/system/Users/"..user.."/startupProgram") then
  41.         if fs.exists("/C/system/Users/"..user.."/startupProgram") then
  42.         local f=fs.open("/C/system/Users/"..user.."/startupProgram","r")
  43.         afterstart=f.readLine()
  44.         f.close()
  45.         runstart = 1
  46.         end
  47.     end
  48.    
  49.     if fs.exists("/C/system/.core/display") then
  50.         local f=fs.open("/C/system/.core/display","r")
  51.         monitor=f.readLine()
  52.         f.close()
  53.             term.setTextColor(colors.white)
  54.             if runstart == 1 then
  55.             runstart = 0
  56.             term.clear()
  57.             prc("Connected to an external monitor",h/2)
  58.             term.setTextColor(colors.black)
  59.             shell.run("monitor "..monitor.." "..afterstart)
  60.             else
  61.             term.clear()
  62.             prc("Connected to an external monitor",h/2)
  63.             term.setTextColor(colors.black)
  64.             shell.run("monitor "..monitor.." /C/system/.core/desktop.lua")
  65.             end
  66.     end
  67.     if runstart == 1 then
  68.         runstart = 0
  69.         shell.run(afterstart)
  70.         shell.run("/C/system/.core/desktop.lua")
  71.         else
  72.         shell.run("/C/system/.core/desktop.lua")
  73.     end
  74.     if fs.exists("/C/system/RAM/logout") then shell.run("/startup.lua") end
  75. end
  76.  
  77.     checkVyvoj()
  78.     if vyvoj then error() end
  79.    
  80.     os.pullEvent = os.pullEventRaw
  81.    
  82.     term.setBackgroundColor(colors.blue)
  83.     term.setTextColor(colors.white)
  84.     term.clear()
  85.     prc("Pepdroll has been Crashed!",2)
  86.     local shutWin = window.create(term.current(),4,5,21,4)
  87.     shutWin.setBackgroundColor(colors.lightBlue)
  88.     shutWin.clear()
  89.     shutWin.setCursorPos(2,2)
  90.     shutWin.write("Turn off computer")
  91.     shutWin = window.create(term.current(),4,10,21,4)
  92.     shutWin.setBackgroundColor(colors.lightBlue)
  93.     shutWin.clear()
  94.     shutWin.setCursorPos(2,2)
  95.     shutWin.write("Restart computer")
  96.     shutWin = window.create(term.current(),4,15,21,4)
  97.     shutWin.setBackgroundColor(colors.lightBlue)
  98.     shutWin.clear()
  99.     shutWin.setCursorPos(2,2)
  100.     shutWin.write("Commander")
  101.     shutWin = window.create(term.current(),28,5,21,4)
  102.     shutWin.setBackgroundColor(colors.lightBlue)
  103.     shutWin.clear()
  104.     shutWin.setCursorPos(2,2)
  105.     shutWin.write("Reset Core & Setting")
  106.     shutWin = window.create(term.current(),28,10,21,4)
  107.     shutWin.setBackgroundColor(colors.lightBlue)
  108.     shutWin.clear()
  109.     shutWin.setCursorPos(2,2)
  110.     shutWin.write("Reinstall system")
  111.     shutWin = window.create(term.current(),28,15,21,4)
  112.     shutWin.setBackgroundColor(colors.lightBlue)
  113.     shutWin.clear()
  114.     shutWin.setCursorPos(2,2)
  115.     checkVyvoj()
  116.     if vyvoj then shutWin.write("Disable Dev Mode") else shutWin.write(" Enable Dev Mode ") end
  117.  
  118.     while true do
  119.     local event, button, x, y = os.pullEvent("mouse_click")
  120.    
  121.         if x >= 4 and x <= 24 and y >= 5 and y <= 8 then
  122.         os.shutdown()
  123.         elseif x >= 4 and x <= 24 and y >= 10 and y <= 13 then
  124.         os.reboot()
  125.         elseif x >= 4 and x <= 24 and y >= 15 and y <= 18 then
  126.         term.setBackgroundColor(colors.black)
  127.         term.setCursorPos (1,1)
  128.         term.clear ()
  129.         term.setTextColor(colors.yellow)
  130.         print "Commander"
  131.         term.setTextColor(colors.white)
  132.         term.setCursorPos (1,2)
  133.         if not fs.exists("/C/system/api/commander.lua") then
  134.         shell.run ("pastebin get LY8cUArW /C/system/api/commander.lua")
  135.         end
  136.         shell.run ("/cd /")
  137.         shell.run ("/C/system/api/commander.lua")
  138.         elseif x >= 28 and x <= 48 and y >= 5 and y <= 8 then
  139.         fs.delete("/C/system/.core/defmodem")
  140.         fs.delete("/C/system/.core/defuser")
  141.         fs.delete("/C/system/.core/display")
  142.         os.reboot()
  143.         elseif x >= 28 and x <= 48 and y >= 10 and y <= 13 then
  144.         fs.delete("/C")
  145.         os.reboot()
  146.         elseif x >= 28 and x <= 48 and y >= 15 and y <= 18 then
  147.         if vyvoj then
  148.             fs.exists("/C/system/Users/"..user.."/vyvoj")
  149.         else
  150.         local data=fs.open("/C/system/Users/"..user.."/vyvoj","w") data.close()
  151.         os.reboot()
  152.         end
  153.        
  154.        
  155.         end
  156.     end
  157. end
  158.    
  159. start ()
Add Comment
Please, Sign In to add comment