Advertisement
Batword

Untitled

May 16th, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. --#wrap peripherals
  2. local s = peripheral.wrap("top")
  3. --#make a whitelist
  4. local whitelist = {
  5.   Batword = true,
  6.   batword = false,
  7. }
  8.  
  9. while true do
  10.   local a, users = os.pullEvent("player")
  11.   if users then --#make sure users isn't nil
  12. print("coucou")
  13.     for _, user in ipairs( users ) do --#iterate through all the users
  14.     print("coucou2")
  15.       if whitelist[ user.name ] then --#if the user is on the whitelist
  16.     print("bievenue")
  17.         --#say stuff
  18.         break --#exit the for loop early
  19.       end
  20.     end
  21.   end
  22.   sleep( 1 ) --#wait one second
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement