Advertisement
Guest User

testing

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