SHARE
TWEET

BSOD

pepeknamornik Jun 19th, 2019 (edited) 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. runstart = 0
  2.  
  3. local function prc(text, y)
  4.   local w = term.getSize()
  5.   local _, cy = term.getCursorPos()
  6.   term.setCursorPos(math.ceil((w-#text)/2), y or cy)
  7.   write(text)
  8. end
  9.  
  10.  
  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 start ()
  24.    
  25.     if not fs.exists ("/system/RAM/bluescreen") then
  26.         local data = fs.open ("/system/RAM/bluescreen", "w")
  27.         data.close ()
  28.     if not fs.exists ("/desktop") then
  29.     shell.run ("pastebin get HyhMtGvd /desktop")
  30.     end
  31.    
  32.     local f=fs.open("system/RAM/user","r")
  33.     user=f.readLine()
  34.     f.close()
  35.    
  36.     if fs.exists("/system/Users/"..user.."/startupProgram") then
  37.         if fs.exists("/system/Users/"..user.."/startup") then
  38.         local f=fs.open("/system/Users/"..user.."/startup","r")
  39.         afterstart=f.readLine()
  40.         f.close()
  41.         runstart = 1
  42.         end
  43.     end
  44.    
  45.     if fs.exists("/system/.core/display") then
  46.         local f=fs.open("/system/.core/display","r")
  47.         monitor=f.readLine()
  48.         f.close()
  49.             if runstart == 1 then
  50.             runstart = 0
  51.             shell.run("monitor "..monitor.." "..afterstart)
  52.             else
  53.             shell.run("monitor "..monitor.." /desktop")
  54.             end
  55.     end
  56.     if runstart == 1 then
  57.         runstart = 0
  58.         shell.run(afterstart)
  59.         else
  60.         shell.run("/desktop")
  61.     end
  62. end
  63.  
  64.     term.setBackgroundColor(colors.black)
  65.     term.setTextColor(colors.red)
  66.     term.clear()
  67.     prc ("Pepdroll has Crashed!", 2)
  68.     prc ("Select the next step", 5)
  69.     term.setTextColor(colors.white)
  70.     term.setCursorPos(5, 10)
  71.     print ("- Commander")
  72.     term.setCursorPos(5, 12)
  73.     print ("- Reboot")
  74.     term.setCursorPos(5, 14)
  75.     print ("- Shutdown")
  76.     term.setBackgroundColor(colors.purple)
  77.  
  78.     while true do
  79.     local event, button, x, y = os.pullEvent("mouse_click")
  80.     xy = x..","..y
  81.    
  82.     if x >= 5 and x <= 20 and y == 10 and button == 1 then
  83.     term.setBackgroundColor(colors.black)
  84.     term.setTextColor(colors.white)
  85.     term.clear()
  86.     term.setCursorPos(5, 10)
  87.     print ("- Commander")
  88.     sleep (0.2)
  89.     term.clear()
  90.     local data = fs.open ("/system/RAM/ercommander", "w")
  91.         data.close ()
  92.     term.setCursorPos(1,1)
  93.     if not fs.exists("/system/api/commander") then
  94.     shell.run ("pastebin get LY8cUArW /system/api/commander")
  95.     end
  96.     shell.run ("cd /")
  97.     shell.run ("/system/api/commander")
  98.     elseif x >= 5 and x <= 20 and y == 12 and button == 1 then
  99.     term.setCursorPos(5, 12)
  100.     print ("- Reboot")
  101.     sleep (0.2)
  102.     os.reboot ()
  103.     elseif x >= 5 and x <= 20 and y == 14 and button == 1 then
  104.     term.setCursorPos(5, 14)
  105.     print ("- Shutdown")
  106.     sleep (0.2)
  107.     os.shutdown ()
  108.     end
  109.     end    
  110.     end
  111.    
  112. start ()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top