Advertisement
Guest User

testing

a guest
Apr 6th, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.55 KB | None | 0 0
  1. term.setCursorPos(1,1)
  2. term.setBackgroundColor(colors.black)
  3. term.clear()
  4.  
  5. local rPos = "Home"
  6. local uInput = " "
  7. local pInput = " "
  8. local cUser = "Pikachu"
  9. local cPass = "minecraft"
  10.  
  11. function cleer()
  12.   term.setCursorPos(1,1)
  13.   term.setBackgroundColor(colors.black)
  14.   term.clear()
  15. end
  16.  
  17. function click()
  18.   if rPos == "Home" then
  19.     local event, button, x, y = os.pullEvent("mouse_click")
  20.     if x >= 20 and x <= 25 and y == 8 then
  21.       rLogin()
  22.     elseif x >=20 and x<= 31 and y == 10 then
  23.       rDir()
  24.     else
  25.       rHome()
  26.     end
  27.   elseif rPos == "Login" then
  28.     local event, button, x, y = os.pullEvent("mouse_click")
  29.     if x >= 1 and x <= 5 and y == 5 then
  30.       rHome()
  31.     elseif x >= 11 and x <= 19 and y == 2 then
  32.       term.setCursorPos(11,2)
  33.       term.setBackgroundColor(colors.white)
  34.       term.setTextColor(colors.black)
  35.       write("         ")
  36.       term.setCursorPos(11,2)
  37.       uInput = read()
  38.       term.setBackgroundColor(colors.black)
  39.       term.setTextColor(colors.white)
  40.       rLogin()
  41.     elseif x >= 11 and x <= 19 and y == 3 then
  42.       term.setCursorPos(11,3)
  43.       term.setBackgroundColor(colors.white)
  44.       term.setTextColor(colors.black)
  45.       write("         ")
  46.       term.setCursorPos(11,3)
  47.       pInput = read()
  48.       term.setBackgroundColor(colors.black)
  49.       term.setTextColor(colors.white)
  50.       rLogin()
  51.     elseif x >= 1 and x <= 6 and y == 6 then
  52.       if uInput == cUser and pInput == cPass then
  53.         rDone()
  54.       else
  55.         term.setCursorPos(1,7)
  56.         term.setBackgroundColor(colors.red)
  57.         write("Wrong!")
  58.         term.setBackgroundColor(colors.black)
  59.         sleep(1)
  60.         rLogin()
  61.       end
  62.     else
  63.       rLogin()
  64.     end
  65.   elseif rPos == "Dir" then
  66.     local event, button, x, y = os.pullEvent("mouse_click")
  67.     if x >= 1 and x <= 5 and y == 1 then
  68.       rHome()
  69.     elseif x >= 1 and x <= 14 and y == 3 then
  70.       rTFolder()
  71.     elseif x >= 1 and x <= 5 and y == 4 then
  72.       rCache()
  73.     elseif x >= 1 and x <= 9 and y == 5 then
  74.       rTrash()
  75.     else
  76.       rDir()
  77.     end
  78.   elseif rPos == "TFolder" then
  79.     local event, button, x, y = os.pullEvent("mouse_click")
  80.     if x >= 1 and x <= 5 and y == 1 then
  81.       rDir()
  82.     elseif x >= 1 and x <= 16 and y == 3 then
  83.       rFiss()
  84.     elseif x >= 1 and x <= 20 and y == 4 then
  85.       rCProg()
  86.     else
  87.       rTFolder()
  88.     end
  89.   elseif rPos == "Fiss" then
  90.     local event, button, x, y = os.pullEvent("mouse_click")
  91.     if x >= 1 and x <= 5 and y == 1 then
  92.       rTFolder()
  93.     else
  94.       rFiss()
  95.     end
  96.   elseif rPos == "CProg" then
  97.     local event, button, x, y = os.pullEvent("mouse_click")
  98.     if x >= 1 and x <= 5 and y == 1 then
  99.       rTFolder()
  100.     else
  101.       rCProg()
  102.     end
  103.   elseif rPos == "Cache" then
  104.     local event, button, x, y = os.pullEvent("mouse_click")
  105.     if x >= 1 and x <= 5 and y == 1 then
  106.       rDir()
  107.     elseif x >= 1 and x <= 16 and y == 3 then
  108.       rD1337()
  109.     elseif x >= 1 and x <= 15 and y == 4 then
  110.       rD007()
  111.     elseif x >= 1 and x <= 16 and y == 5 then
  112.       rD9001()
  113.     else
  114.       rCache()
  115.     end
  116.   elseif rPos == "D1337" then
  117.     local event, button, x, y = os.pullEvent("mouse_click")
  118.     if x >= 1 and x <= 5 and y == 1 then
  119.       rCache()
  120.     else
  121.       rD1337()
  122.     end
  123.   elseif rPos == "D007" then
  124.     local event, button, x, y = os.pullEvent("mouse_click")
  125.     if x >= 1 and x <= 5 and y == 1 then
  126.       rCache()
  127.     else
  128.       rD007()
  129.     end
  130.   elseif rPos == "D9001" then
  131.     local event, button, x, y = os.pullEvent("mouse_click")
  132.     if x >= 1 and x <= 5 and y == 1 then
  133.       rCache()
  134.     else
  135.       rD9001()
  136.     end
  137.   elseif rPos == "Trash" then
  138.     local event, button, x, y = os.pullEvent("mouse_click")
  139.     if x >= 1 and x <= 5 and y == 1 then
  140.       rDir()
  141.     else
  142.       rTrash()
  143.     end
  144.   end
  145. end
  146.  
  147. function rDone()
  148.   cleer()
  149.   write("Congrats! You successfully hacked in!")
  150.   term.setCursorPos(1,2)
  151.   write("Now fuck off")
  152.   sleep(10)
  153. end
  154.  
  155. function rTrash()
  156.   cleer()
  157.   write(">Back")
  158.   term.setCursorPos(1,3)
  159.   write("The Trash Can is Empty!")
  160.   rPos = "Trash"
  161.   click()
  162. end
  163.  
  164. function rD9001()
  165.   cleer()
  166.   write(">Back")
  167.   term.setCursorPos(1,3)
  168.   write("Dickachu: .heisenberg")
  169.   term.setCursorPos(1,4)
  170.   write("NotSoBot: ERROR! NO FACE DETECTED!")
  171.   term.setCursorPos(1,5)
  172.   write("Dickachu: Damn this thing hardly works")
  173.   rPos = "D9001"
  174.   click()
  175. end
  176.  
  177. function rD007()
  178.   cleer()
  179.   write(">Back")
  180.   term.setCursorPos(1,3)
  181.   write("LadyElisabeth: Hey ")
  182.   term.setBackgroundColor(colors.blue)
  183.   write("@Dickachu")
  184.   term.setBackgroundColor(colors.black)
  185.   term.setCursorPos(1,4)
  186.   write("Dickachu: Yup?")
  187.   term.setCursorPos(1,5)
  188.   write("LadyElisabeth: You mind if I use your PC?")
  189.   term.setCursorPos(1,6)
  190.   write("Dickachu: Uh yeah sure the pass is minecraft")
  191.   term.setCursorPos(1,7)
  192.   write("Why do you need it?")
  193.   term.setCursorPos(1,8)
  194.   write("LadyElisabeth: Mine broke")
  195.   rPos = "D007"
  196.   click()
  197. end
  198.  
  199. function rD1337()
  200.   cleer()
  201.   write(">Back")
  202.   term.setCursorPos(1,3)
  203.   write("Dickachu: Why did the chicken cross the road?")
  204.   term.setCursorPos(1,4)
  205.   write("Atlas: Why?")
  206.   term.setCursorPos(1,5)
  207.   write("Dickachu: To get to the gays house!")
  208.   term.setCursorPos(1,6)
  209.   write("Atlas: Alright...")
  210.   term.setCursorPos(1,7)
  211.   write("Dickachu: Knock knock")
  212.   term.setCursorPos(1,8)
  213.   write("Atlas: Who is there?")
  214.   term.setCursorPos(1,9)
  215.   write("Dickachu: The chicken!")
  216.   term.setCursorPos(1,10)
  217.   write("Atlas: Not funny :/")
  218.   rPos = "D1337"
  219.   click()
  220. end
  221.  
  222. function rCache()
  223.   cleer()
  224.   write(">Back")
  225.   term.setCursorPos(1,3)
  226.   write("discord_1337.txt")
  227.   term.setCursorPos(1,4)
  228.   write("discord_007.txt")
  229.   term.setCursorPos(1,5)
  230.   write("discord_9001.txt")
  231.   rPos = "Cache"
  232.   click()
  233. end
  234.  
  235. function rCProg()
  236.   cleer()
  237.   write(">Back")
  238.   term.setCursorPos(1,3)
  239.   write("local event, button, x, y = os.pullEvent(mouse_click)")
  240.   term.setCursorPos(1,5)
  241.   write("-- button gives info on which button has been pressed")
  242.   term.setCursorPos(1,6)
  243.   write("-- x and y are the positions of the click")
  244.   rPos = "CProg"
  245.   click()
  246. end
  247.  
  248. function rFiss()
  249.   cleer()
  250.   write(">Back")
  251.   term.setCursorPos(1,3)
  252.   write("Apparently the username Pikachu is very popular")
  253.   term.setCursorPos(1,4)
  254.   write("I can't sign up unless I pick another name")
  255.   term.setCursorPos(1,5)
  256.   write("So I guess I will put my usernames here so")
  257.   term.setCursorPos(1,6)
  258.   write("I don't forget")
  259.   term.setCursorPos(1,8)
  260.   write("Pikaman - Youtube")
  261.   term.setCursorPos(1,9)
  262.   write("Niggachu - Pornhub")
  263.   term.setCursorPos(1,10)
  264.   write("Pikerchu - Mineimator")
  265.   rPos = "Fiss"
  266.   click()
  267. end
  268.  
  269. function rTFolder()
  270.   cleer()
  271.   write(">Back")
  272.   term.setCursorPos(1,3)
  273.   write("Forum issues.txt")
  274.   term.setCursorPos(1,4)
  275.   write("Clicking Program.txt")
  276.   rPos = "TFolder"
  277.   click()
  278. end
  279.  
  280. function rDir()
  281.   cleer()
  282.   write(">Back")
  283.   term.setCursorPos(1,3)
  284.   write("Testing folder")
  285.   term.setCursorPos(1,4)
  286.   write("CACHE")
  287.   term.setCursorPos(1,5)
  288.   write("Trash can")
  289.   rPos = "Dir"
  290.   click()
  291. end
  292.  
  293. function rLogin()
  294.   cleer()
  295.   rPos = "Login"
  296.   write("-Please login-")
  297.   term.setCursorPos(1,2)
  298.   write("Username: ")
  299.   term.setBackgroundColor(colors.gray)
  300.   write("         ")
  301.   term.setCursorPos(11,2)
  302.   write(uInput)
  303.   term.setBackgroundColor(colors.black)
  304.   term.setCursorPos(1,3)
  305.   write("Password: ")
  306.   term.setBackgroundColor(colors.gray)
  307.   write("         ")
  308.   term.setCursorPos(11,3)
  309.   write(pInput)
  310.   term.setBackgroundColor(colors.black)
  311.   term.setCursorPos(1,5)
  312.   write(">Back")
  313.   term.setCursorPos(1,6)
  314.   write(">Login")
  315.   click()
  316. end
  317.  
  318. function rHome()
  319.   cleer()
  320.   term.setCursorPos(19,5)
  321.   term.setBackgroundColor(colors.yellow)
  322.   write("           ")
  323.   term.setCursorPos(19,6)
  324.   write(" ")
  325.   term.setCursorPos(29,6)
  326.   write(" ")
  327.   term.setCursorPos(19,7)
  328.   write("           ")
  329.   term.setBackgroundColor(colors.green)
  330.   term.setCursorPos(20,6)
  331.   write("-Welcome-")
  332.   term.setBackgroundColor(colors.yellow)
  333.   term.setCursorPos(19,8)
  334.   write(" ")
  335.   term.setCursorPos(25,8)
  336.   write("        ")
  337.   term.setCursorPos(19,9)
  338.   write("              ")
  339.   term.setCursorPos(19,11)
  340.   write("              ")
  341.   term.setCursorPos(19,10)
  342.   write(" ")
  343.   term.setCursorPos(32,10)
  344.   write(" ")
  345.   term.setBackgroundColor(colors.blue)
  346.   term.setCursorPos(20,8)
  347.   write(">Login")
  348.   term.setCursorPos(20,10)
  349.   write(">Directories")
  350.   rPos = "Home"
  351.   click()
  352. end
  353.  
  354. rHome()
  355. term.setCursorPos(1,1)
  356. term.setBackgroundColor(colors.black)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement