Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

ROBLOX - VIP DOOR SCRIPT

By: a guest on Sep 10th, 2010  |  syntax: None  |  size: 1.51 KB  |  views: 792  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. print ("VIP T-Shirt Door Script Loaded")
  2.  
  3. -- list of account names allowed to go through the door.
  4. permission = { "YOURNAMEHERE" } -- This is how many people can still get through, so u don't have to change shirts. You can also have another friend here.
  5.  
  6. -- TextureId of the VIP shirt.
  7. texture = "" -- Go to the wiki below this script to find out how to change the shirt. And paste the link in between the "" marks.
  8.  
  9. function checkOkToLetIn(name)
  10.         for i = 1,#permission do
  11.                 -- convert strings to all upper case, otherwise we will let in
  12.                 -- "Username" but not "username" or "uSERNAME"
  13.                 if (string.upper(name) == string.upper(permission[i])) then return true end
  14.         end
  15.         return false
  16. end
  17.  
  18. local Door = script.Parent
  19.  
  20. function onTouched(hit)
  21.         print("Door Hit")
  22.         local human = hit.Parent:findFirstChild("Humanoid")
  23.         if (human ~= nil ) then
  24.                 if human.Parent.Torso.roblox.Texture == texture then --the shirt
  25.                         Door.Transparency = 0.7
  26.                         Door.CanCollide = false
  27.                         wait(4) -- this is how long the door is open
  28.                         Door.CanCollide = true
  29.                         Door.Transparency = 0
  30.                         -- a human has touched this door!
  31.                         print("Human touched door")
  32.                         -- test the human's name against the permission list
  33.                 elseif (checkOkToLetIn(human.Parent.Name)) then
  34.                         print("Human passed test")
  35.                         Door.Transparency = 0.7
  36.                         Door.CanCollide = false
  37.                         wait(3) -- this is how long the door is open
  38.                         Door.CanCollide = true
  39.                         Door.Transparency = 0
  40.                 end
  41.         end
  42. end
  43.  
  44. script.Parent.Touched:connect(onTouched)