Advertisement
Guest User

startup

a guest
Feb 27th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.90 KB | None | 0 0
  1. local mon = peripheral.wrap("right")
  2. mon.setTextScale(2)
  3. mon.clear()
  4. mon.setCursorPos(1,1)
  5.  
  6. local function centerText (printThis)
  7.     local xsize,ysize = mon.getSize()
  8.     local curCol,curRow = mon.getCursorPos()
  9.     mon.setCursorPos((xsize - #printThis) /2, curRow)
  10.     mon.write(printThis)
  11.     mon.setCursorPos(1, curRow + 1)
  12. end
  13.  
  14. local function agreeRules ()
  15.     mon.clear()
  16.     mon.setCursorPos(1,1)
  17.     centerText("Rules:")
  18.     centerText("1) Don't be a dick.")
  19.     centerText("2) Don't break the server.")
  20.     centerText("")
  21.     centerText("Do you agree to these rules?")
  22.     centerText("(Right-Click the Player Sensor)")
  23.     centerText("")
  24.     centerText("<<<<<<<<<<<<<<<<")
  25.       local event, players = os.pullEvent("player")
  26.       local commandBlock = peripheral.wrap("bottom")
  27.       commandBlock.setCommand("pex user " .. players .. " group set member")
  28.       commandBlock.runCommand()
  29.     commandBlock.setCommand("broadcast " .. players .. " has become a member!")
  30.     commandBlock.runCommand()
  31.     tellCommands()
  32. end
  33.  
  34. function tellCommands()
  35. mon.clear()
  36. mon.setCursorPos(1,1)
  37. centerText("Use /home set to save location,")
  38. centerText("and /home to return to saved")
  39. centerText("location.")
  40. centerText("")
  41. centerText("Use /tppos to find your way.")
  42. centerText("")
  43. centerText("Equip your heart cannisters.")
  44. centerText("No, seriously. You'll die.")
  45. centerText("(Right-Click to Continue)")
  46. os.pullEvent("monitor_touch")
  47. startScreen()
  48. end            
  49.                                                                                                                                                                                    
  50. function startScreen ()
  51. mon.clear()
  52. mon.setCursorPos(1,1)
  53. centerText("Not The 1.7.10 Pack")
  54. centerText("Official Test Server!")
  55. centerText("")
  56. centerText("(Right-Click w/ Empty Hand)")
  57. os.pullEvent("monitor_touch")
  58. agreeRules()
  59. end
  60.  
  61. startScreen()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement