Inumel

Untitled

Sep 30th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. whitelist = {
  2. "name1",
  3. "name2",
  4. "name3",
  5. "name4",
  6. "name5",
  7. "name6"
  8. }
  9. blacklist = {
  10. "name1",
  11. }
  12. local function table_contains(table,element)
  13.   for _,value in pairs(table) do
  14.     if value == element then
  15.       return true
  16.     end
  17.   end
  18.   return false
  19. end
  20. while true do
  21.     local event,player = os.pullEvent("player")
  22.   if table_contains(whitelist,player) then
  23.     print("Welcome: "..player.." !")
  24.   rs.setBundledOutput("bottom",colors.orange)
  25.     sleep(2)
  26.     rs.setBundledOutput("bottom",colors.white)
  27.   end
  28.   if table_contains(blacklist,player) then
  29.     print("no dice "..player)
  30.   end
  31. end
Advertisement
Add Comment
Please, Sign In to add comment