Advertisement
Guest User

startup

a guest
Apr 21st, 2014
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.10 KB | None | 0 0
  1. c = 1
  2. term.clear()
  3. term.setCursorPos(1,1)
  4. textutils.slowPrint("Detection des donnees systeme")
  5. sleep(1)
  6. if not fs.exists("XyodX") then
  7.   textutils.slowPrint("Donnees manquantes, telechargement en cours")
  8.   shell.run("mkdir XyodX")
  9.   shell.run("cd XyodX")
  10.   shell.run("mkdir User")
  11.   shell.run("cd User")
  12.   shell.run("mkdir User1")
  13.   shell.run("mkdir User2")
  14.   shell.run("cd User1")
  15.   shell.run("mkdir Programs")
  16.   shell.run("mkdir lock")
  17.   shell.run("mkdir background")
  18.   shell.run("cd ..")
  19.   shell.run("cd User2")
  20.   shell.run("mkdir Programs")
  21.   shell.run("mkdir lock")
  22.   shell.run("mkdir background")
  23.   sleep(1)
  24.   shell.run("reboot")
  25. else
  26.   textutils.slowPrint("Donnees detecte, activation en cours")
  27.   shell.run("cd XyodX")
  28. end
  29. sleep(1)
  30. textutils.slowPrint("quel systeme voulez vous utiliser?")
  31. print("X:Windows")
  32. print("X:Craft OS")
  33. while c == 1 do
  34.   event, button, x, y = os.pullEvent("mouse_click")
  35.   if x == 1 and y == 4 then
  36.     shell.run("system")
  37.     c = 0
  38.   elseif x == 1 and y == 5 then
  39.     term.clear()
  40.     term.setCursorPos(1,1)
  41.     c = 0
  42.     shell.run("cd /")
  43.   end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement