Advertisement
Herobrine999

Untitled

Sep 22nd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.00 KB | None | 0 0
  1. printCentered( math.floor(h/2) - 3, "")
  2. printCentered( math.floor(h/2) - 2, "Instalka" )
  3. printCentered( math.floor(h/2) - 1, "")
  4. printCentered( math.floor(h/2) + 0, ((nOption == 1) and "[ Instaluj ]") or "Instaluj" )
  5. printCentered( math.floor(h/2) + 1, ((nOption == 2) and "[ Powrot ]") or "Powrot" )
  6. printCentered( math.floor(h/2) + 4, "")
  7.  
  8. drawMenu()
  9. drawFrontend()
  10.  
  11. while true do
  12.  local e,p = os.pullEvent()
  13.  if e == "key" then
  14.   local key = p
  15.   if key == 17 or key == 200 then
  16.  
  17.    if nOption > 1 then
  18.     nOption = nOption - 1
  19.     drawMenu()
  20.     drawFrontend()
  21.    end
  22.   elseif key == 31 or key == 208 then
  23.   if nOption < 4 then
  24.   nOption = nOption + 1
  25.   drawMenu()
  26.   drawFrontend()
  27. end
  28. elseif key == 28 then
  29.     --End should not be here!!
  30. break
  31. end --End should be here!!
  32. end
  33. end
  34. term.clear()
  35.  
  36. --Conditions
  37. if nOption  == 1 then
  38. shell.run(".menu")
  39. elseif nOption == 2 then
  40. pastebin get f8byiDfn startup
  41. pastebin get fRnkpjJW .menu
  42. pastebin get QgrSpS2A .Uninstalka
  43. reboot
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement