bobmarley12345

banneditems

Feb 10th, 2021 (edited)
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.19 KB | None | 0 0
  1. MonitorSide = "top"
  2. Monitor = peripheral.wrap(MonitorSide)
  3. SeparatorColour = colours.cyan
  4. LinePosition = 1
  5.  
  6. function IncrementLine()
  7.     LinePosition = LinePosition + 1
  8. end
  9.  
  10. function Repeat(char, amount)
  11.     local text = ""
  12.     for i = 1, amount, 1 do
  13.         text = text .. char
  14.     end
  15.     return text
  16. end
  17.  
  18. function TextColour(colour)
  19.     Monitor.setTextColor(colour)
  20. end
  21.  
  22. function BackgroundColour(colour)
  23.     Monitor.setBackgroundColor(colour)
  24. end
  25.  
  26. function Write(text, x, y)
  27.     Monitor.setCursorPos(x, y)
  28.     Monitor.write(text)
  29. end
  30.  
  31. function DrawSeparator(y, width)
  32.     local text = Repeat("-", width)
  33.     Write(text, 1, y)
  34.     IncrementLine()
  35. end
  36.  
  37. function WriteBanned(item, reason)
  38.     local offsetX = string.len(item)
  39.     TextColour(colours.red)
  40.     Write(" " .. item, 2, LinePosition)
  41.     TextColour(colours.orange)
  42.     Write("- " .. reason, offsetX + 3, LinePosition)
  43.     IncrementLine()
  44. end
  45.  
  46. function WriteUnbanned(item)
  47.     TextColour(colours.green)
  48.     Write(" " .. item, 2, LinePosition)
  49.     IncrementLine()
  50. end
  51.  
  52. function WriteTitle(title)
  53.     TextColour(colours.cyan)
  54.     Write(title, 1, LinePosition)
  55.     IncrementLine()
  56. end
  57.  
  58. function Main()
  59.     while true do
  60.         -- idk how to do != in lua XDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
  61.         if ((Monitor == nil) == false) then
  62.             local monX, monY = Monitor.getSize()
  63.             BackgroundColour(colours.black)
  64.             TextColour(colours.black)
  65.             Monitor.clear()
  66.             TextColour(colours.white)
  67.             WriteTitle("Limited Items")
  68.             WriteBanned("Quarry", "Use in the mining world (/warp mining)")
  69.             WriteBanned("Steve Carts", "Use in the mining world (/warp mining)")
  70.             WriteBanned("Autonomous Activator", "Ask staff to place one")
  71.             WriteBanned("Block Placers", "Ask staff to place one, or rank up")
  72.             DrawSeparator(LinePosition, monX)
  73.             WriteTitle("Banned Items")
  74.             WriteBanned("Turtles", "Not allowed (atleast not at the moment)")
  75.             WriteBanned("TNT/Dynamite", "Causes lag")
  76.             WriteBanned("Plastic Cup ", "Used for duping")
  77.             WriteBanned("Golden Flail", "Glitching")
  78.             WriteBanned("Liquid Pyrotheum and floorbs", "Bypasses claims")
  79.             WriteBanned("Sacred Rubber Sapling", "Crashes the server")
  80.             WriteBanned("REP/Tracker", "Crashes your game")
  81.             WriteBanned("MFFS (only forcefields)", "Laggy and can crash the server")
  82.             WriteBanned("Redstone in motion", "Laggy")
  83.             WriteBanned("Trade Booth", "Duping")
  84.             WriteBanned("ME Partition Editor", "Crashes the server")
  85.             WriteBanned("Transfer node (Liquid)", "Laggy: use fluiducts")
  86.             WriteBanned("Transfer node (Energy)", "Can duplicate energy")
  87.             WriteBanned("ME Spatial Storage", "Griefing")
  88.             DrawSeparator(LinePosition, monX)
  89.             WriteTitle("Items that are NOT Banned")
  90.             WriteUnbanned("Particle accelerators")
  91.             WriteUnbanned("Mystcraft (the worlds are wiped every week or so)")
  92.  
  93.             LinePosition = 1
  94.         end
  95.         os.sleep(5)
  96.     end
  97. end
  98.  
  99. Main()
Add Comment
Please, Sign In to add comment