Swimsam1

Scorp MEnue

Mar 20th, 2020 (edited)
878
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2. Written by Swimsam1 for use with
  3. SCorp Clan Bases across any and all
  4. Minecraft servers!
  5. Saber Corporation Clan Base Menu v1.0.1
  6.  
  7. V1.0.1
  8. - Minor bug fixes, typo corrections
  9. - Changed from left click to right click on menu buttons
  10. (For admins in creative)
  11. - Added monitor functionality
  12.  
  13. Big thanks to GravityCube for helping make this project
  14. run!
  15. --]]
  16.  
  17.  
  18. local x, y = 3, 5
  19. local x2, y2 = 3, 7
  20. local x3, y3 = 3, 9
  21. local x4, y4 = 18, 2
  22. local option1 = ' Home    '
  23. local option2 = ' Rules   '
  24. local option3 = ' Leaders '
  25. local headline = ' Saber Corporation '
  26. local monitor = peripheral.wrap('right')
  27. term.redirect(peripheral.wrap('top'))
  28.  
  29. shell.run('pastebin','get','m3QDDrZi','monitor')
  30.  
  31. local function drawMenu()
  32.  
  33.     shell.run('pastebin','get','MTLwxGvw','backwall')
  34.  
  35.     image = paintutils.loadImage('backwall')
  36.     paintutils.drawImage(image, 1, 1)
  37.  
  38.     -- Button 1 image and writing
  39.  
  40.     term.setCursorPos(x,y)
  41.     term.setBackgroundColor(colors.blue)
  42.     term.setTextColor(1)
  43.     write(option1)
  44.  
  45.     -- Button 2 image and writing
  46.  
  47.     term.setCursorPos(x2,y2)
  48.     write(option2)
  49.  
  50.     -- Button 3 image and writing
  51.  
  52.     term.setCursorPos(x3,y3)
  53.     write(option3)
  54.  
  55.     -- Headline image and writing
  56.  
  57.     term.setCursorPos(x4,y4)
  58.     write(headline)
  59.  
  60.     term.setCursorPos(15,5)
  61.             term.setBackgroundColor(colors.black)
  62.             term.setTextColor(1)
  63.             print('Welcome to SCorp!')
  64.             term.setCursorPos(15,6)
  65.             print('Contact a leader with any')
  66.             term.setCursorPos(15,7)
  67.             print('questions you may have!')
  68.  
  69. end
  70.  
  71. drawMenu()
  72.  
  73. while true do
  74.  
  75.     local event, button, cx, cy = os.pullEvent()
  76.     if event == 'monitor_touch' then
  77.  
  78.     -- Rules Page
  79.  
  80.  
  81.         if cx >= x2 and cx < option2:len() and cy == y2 then
  82.  
  83.         -- Headline rewrite
  84.  
  85.             local headline = ' Rules '
  86.             local x4, y4 = 23, 2
  87.  
  88.             term.clear()
  89.             term.setCursorPos(1,1)
  90.             image = paintutils.loadImage('backwall')
  91.             paintutils.drawImage(image, 1, 1)
  92.             term.setCursorPos(x4, y4)
  93.             term.setBackgroundColor(colors.blue)
  94.             write(headline)
  95.  
  96.             term.setCursorPos(x,y)
  97.             write(option1)
  98.             term.setCursorPos(x2,y2)
  99.             write(option2)
  100.             term.setCursorPos(x3,y3)
  101.             write(option3)
  102.             term.setCursorPos(15,5)
  103.             term.setBackgroundColor(colors.black)
  104.             term.setTextColor(1)
  105.  
  106.             write([[- No stealing or griefing in claims]])
  107.             term.setCursorPos(15,6)
  108.             write([[- Respect all clan leaders]])
  109.             term.setCursorPos(15,7)
  110.             write([[- Respect all server admins]])
  111.             term.setCursorPos(15,8)
  112.             write([[- Respect all clan members]])
  113.             term.setCursorPos(15,9)
  114.             write([[- No Dying!]])
  115.             term.setCursorPos(15,10)
  116.             write([[- No duping/other glitching]])
  117.             term.setCursorPos(15,11)
  118.             write([[- Follow all server rules]])
  119.  
  120.     -- Leader Page
  121.  
  122.         elseif cx >= x3 and cx < option3:len() and cy == y3 then
  123.  
  124.         -- Headline rewrite
  125.  
  126.             local headline = ' Leaders '
  127.             local x4, y4 = 22, 2
  128.  
  129.             term.clear()
  130.             term.setCursorPos(1,1)
  131.             image = paintutils.loadImage('backwall')
  132.             paintutils.drawImage(image, 1, 1)
  133.             term.setCursorPos(x4,y4)
  134.             term.setBackgroundColor(colors.blue)
  135.             write(headline)
  136.  
  137.             term.setCursorPos(x,y)
  138.             write(option1)
  139.             term.setCursorPos(x2,y2)
  140.             write(option2)
  141.             term.setCursorPos(x3,y3)
  142.             write(option3)
  143.             term.setCursorPos(15,5)
  144.             term.setBackgroundColor(colors.black)
  145.             term.setTextColor(1)
  146.  
  147.             write([[- Swimsam1 (Founder)]])
  148.             term.setCursorPos(15,6)
  149.             write([[- BigMan2008 (CoFounder)]])
  150.             term.setCursorPos(15,7)
  151.             write([[- Nova (Assasin)]])
  152.             term.setCursorPos(15,8)
  153.             write([[- MMD (CoFounder)]])
  154.             term.setCursorPos(15,9)
  155.             write([[- MacyMacerator (General)]])
  156.  
  157.     -- Home Page
  158.  
  159.         elseif cx >= x and cx < option1:len() and cy == y then
  160.  
  161.         -- Headline rewrite
  162.  
  163.             local headline = ' Rabbit Hole Inc '
  164.             local x4, y4 = 18, 2
  165.             term.clear()
  166.             term.setCursorPos(x4,y4)
  167.             write(headline)
  168.  
  169.             drawMenu()
  170.  
  171.         end
  172.     end
  173. end
Add Comment
Please, Sign In to add comment