Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = peripheral.wrap("right")
- m = peripheral.wrap("top")
- local whiteList = {}
- local blackList = {}
- m.clear()
- --whiteList["Player1"] = true
- blackList["KingMinecrafter"] = true
- blackList["Falmaze"] = true
- blackList["hayboy2001"] = true
- blackList["ryguy6011"] = true
- blackList["cody1904"] = true
- blackList["SkeliWar"] = true
- blackList["Stravides"] = true
- blackList["maxcel23"] = true
- blackList["Hermann_Klink"] = true
- blackList["ChJees"] = true
- blackList["Zelophed"] = true
- function centerText(text)
- m.setTextScale(1,9)
- x,y = m.getSize()
- x1,y1 = m.getCursorPos()
- m.setCursorPos((math.floor(x/2) - (math.floor(#text/2))), y1)
- m.write(text)
- end
- function black(playerName)
- m.clear()
- y2 = 3
- m.setTextColor(1)
- m.setCursorPos(1, 3)
- m.setCursorPos(1, 5)
- m.setTextColor(16384)
- centerText(" "..playerName.." ")
- m.setCursorPos(1, 7)
- m.setTextColor(1)
- centerText("Has entered the area")
- rs.setBundledOutput("back", colors.lime)
- sleep(2)
- end
- function white(playerName)
- m.clear()
- y2 = 3
- m.setCursorPos(1, 2)
- centerText("Welcome Back")
- m.setCursorPos(1, 3)
- m.setTextColor(32)
- centerText(" " ..playerName.. " ")
- rs.setBundledOutput("back", 0)
- sleep(2)
- rs.setBundledOutput("back", colors.lime)
- sleep(1)
- end
- function nobody(playerName)
- m.clear()
- y2 = 3
- m.setCursorPos(1, y2)
- centerText("Unrecognised player: "..playerName.." Please leave")
- end
- function reset()
- rs.setBundledOutput("back", 0)
- end
- while true do
- sleep(1)
- players = p.getPlayerNames()
- for num,name in pairs(players) do
- if whiteList[name] then
- white(name)
- elseif blackList[name] then
- black(name)
- else
- print("System does not recognize player: "..name.."")
- nobody(name)
- rs.setBundledOutput("back",0)
- end
- rs.setBundledOutput("back", 0)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment