How do I make VIP doors?

From ROBLOX Wiki
Jump to navigationJump to search

Introduction

VIP Doors are commonly used to restrict access to a certain area or areas of a map to a select few. There are two types of VIP Doors; those that determine whether or not to let a person through based on their username, and those that determine the same based on a person's shirt. At the bottom of this page are scripts for both types of doors.

Construction

1. Open your place in Roblox Studio. Make a cool room with something awesome in it that you don't want everyone to have.

An example of a building with a VIP door.

2. Select the brick (not several bricks, or a group of bricks, or a model, but a single brick) that you want to be the VIP door. You will need to stretch a brick to make it the size you need to fit a humanoid through a brick. Then, click Insert (highlighted below) and select Object. Find the Script object in the menu that appears, and select it.

Inserting a new script.

3. Double click on the script in the Explorer tab (on the right) to open it. Copy the script at the bottom of this page into it.


4. Change the names in the permission section to those of the people you want to let through the door. NOTE:If you test the admin doors in roblox studio by selecting play solo they will not work as your name becomes 'player'.

  • If you are using a Shirt VIP door, you will also have to set the texture value to the TextureId of the vip shirt, otherwise, the door will not work properly.
Changing the permission values.

VIP Door Scripts

Be sure to first copy these into your script and then edit them!

VIP Door Script

print("VIP Door Script loaded") 

-- list of account names allowed to go through the door. 
permission = { "Username1", "Username2" , "Username3" } --Put your friends name's here. You can add more.

function checkOkToLetIn(name) 
	for i = 1,#permission do 
		-- convert strings to all upper case, otherwise we will let in, 
		-- "Username," but not, "username," or, "uSERNAME."
                -- Why? Because, "Username," is how it is spelled in the permissions.
		if (string.upper(name) == string.upper(permission[i])) then return true end 
	end 
	return false 
end 

local Door = script.Parent

function onTouched(hit) 
	print("Door Hit") 
	local human = hit.Parent:findFirstChild("Humanoid") 
	if (human ~= nil ) then 
		-- a human has touched this door! 
		print("Human touched door") 
		-- test the human's name against the permission list 
		if (checkOkToLetIn(human.Parent.Name)) then 
			print("Human passed test") 
			Door.Transparency = 0.7 
			Door.CanCollide = false 
			wait(4) -- this is how long the door is open 
			Door.CanCollide = true 
			Door.Transparency = 0 
		else human.Health= 0 -- delete this line of you want a non-killing VIP door 
		end 
	end 
end 

script.Parent.Touched:connect(onTouched)

VIP Shirt Door script

print ("VIP Shirt Door Script Loaded")

-- list of account names allowed to go through the door.
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.

-- TextureId of the VIP shirt.
texture = "http://www.roblox.com/asset/?version=1&id=1194117" -- Go to the wiki below this script to find out how to change the shirt. And paste the link in between the "" marks.

function checkOkToLetIn(name) 
	for i = 1,#permission do 
		-- convert strings to all upper case, otherwise we will let in 
		-- "Username" but not "username" or "uSERNAME" 
		if (string.upper(name) == string.upper(permission[i])) then return true end 
	end 
	return false 
end 

local Door = script.Parent

function onTouched(hit) 
	print("Door Hit") 
	local human = hit.Parent:findFirstChild("Humanoid") 
	if (human ~= nil ) then 
		if human.Parent.Torso.roblox.Texture == texture then --the shirt 
			Door.Transparency = 0.7 
			Door.CanCollide = false 
			wait(4) -- this is how long the door is open 
			Door.CanCollide = true 
			Door.Transparency = 0 
			-- a human has touched this door! 
			print("Human touched door") 
			-- test the human's name against the permission list 
		elseif (checkOkToLetIn(human.Parent.Name)) then 
			print("Human passed test") 
			Door.Transparency = 0.7
			Door.CanCollide = false 
			wait(4) -- this is how long the door is open
			Door.CanCollide = true 
			Door.Transparency = 0 
		else human.Health = 0 -- delete this line of you want a non-killing VIP door 
		end 
	end 
end 

script.Parent.Touched:connect(onTouched)

To get a shirt for your place, you must be wearing the shirt you want to be the VIP one. Then you must visit your place in Build Solo mode. Then:
1) Go to View > Explorer, then the Explorer will pop up on the side of your screen.
2) Click on the plus sign next to Workspace.
3) Click on the plus sign next to your character's name.
4) Scroll down to "Torso".
5) Click on the plus sign next to "Torso".
6) You should see the shirt graphic. Highlight the shirt graphic (not the plus sign).
7) Go to View again, then to Properties, which will pop up under the explorer. The shirt graphic should still be highlighted.
8) In Properties, copy an address that looks like a web address next to "Texture".
9) Open the script, and paste that address where the script tells you to. (In between the "" marks, in place of the address that's there.) You can now sell your shirt, if you are in Builders Club, that is. I would test the door online to make sure the door works before you advertise the shirt.


VIP / non-VIP door

Since GreenMachine has released his Point-and-Click place and got the script from the VIP door, and it looks like that it keeps out non-VIP people that follow the VIP people WITHOUT killing the non-VIP person.

print("Advanced SpecialDoor Script loaded")
permission = {"GreenMachine"}
Door = script.Parent

function checkOkToLetIn(name)
	for i = 1,#permission do
		if (string.upper(name) == string.upper(permission[i])) then return true end
	end
	return false
end

function onTouched(hit)
		print("Door Hit")
		local human = hit.Parent:findFirstChild("Humanoid")
		if (human ~= nil ) then
			print("Human touched door")
			if (checkOkToLetIn(human.Parent.Name)) then
				print("Human passed test")
				g = human.Parent
				g:findFirstChild("Head").CanCollide = false
				g:findFirstChild("Torso").CanCollide = false
				g:findFirstChild("Left Arm").CanCollide = false
				g:findFirstChild("Right Arm").CanCollide = false
				g:findFirstChild("Left Leg").CanCollide = false
				g:findFirstChild("Right Leg").CanCollide = false
				wait(0.5)
				g:findFirstChild("Head").CanCollide = true
				g:findFirstChild("Torso").CanCollide = true
				g:findFirstChild("Left Arm").CanCollide = false
				g:findFirstChild("Right Arm").CanCollide = false
				g:findFirstChild("Left Leg").CanCollide = false
				g:findFirstChild("Right Leg").CanCollide = false
			end
		end

end

connection = Door.Touched:connect(onTouched)

This VIP door will teleport non-VIP

print("VIP Door Script loaded") 

-- list of account names allowed to go through the door. 
permission = { "Username1", "Username2", "Username3", "Username4", "etc" } 

function checkOkToLetIn(name) 
	for i = 1,#permission do 
		-- convert strings to all upper case, otherwise we will let in 
		-- "Username1" but not "username" or "uSERNAME" 
		if (string.upper(name) == string.upper(permission[i])) then return true end 
	end 
	return false 
end 

local Door = script.Parent

function onTouched(hit) 
	print("Door Hit") 
	local human = hit.Parent:findFirstChild("Humanoid") 
	if (human ~= nil ) then 
		-- a human has touched this door! 
		print("Human touched door") 
		-- test the human's name against the permission list 
		if (checkOkToLetIn(human.Parent.Name)) then 
			print("Human passed test") 
			Door.Transparency = 0.5 
			Door.CanCollide = false 
			wait(4) -- this is how long the door is open 
			Door.CanCollide = true 
			Door.Transparency = 0 
		else hit.Parent.Torso.CFrame = CFrame.new(Vector3.new( 0, 0, 0)) --Change the 0's to the location of where you want non-VIP's to go
		end 
	end 
end 

script.Parent.Touched:connect(onTouched)

This VIP door will teleport VIP

print("VIP Door Script loaded") 

-- list of account names allowed to go through the door. 
permission = { "Username1", "Username2", "Username3", "Username4", "etc" }

function checkOkToLetIn(name) 
	for i = 1,#permission do 
		-- convert strings to all upper case, otherwise we will let in 
		-- "Username" but not "username" or "uSERNAME" 
		if (string.upper(name) == string.upper(permission[i])) then return true end 
	end 
	return false 
end 

local Door = script.Parent

function onTouched(hit) 
	print("Door Hit") 
	local human = hit.Parent:findFirstChild("Humanoid") 
	if (human ~= nil ) then 
		-- a human has touched this door! 
		print("Human touched door") 
		-- test the human's name against the permission list 
		if (checkOkToLetIn(human.Parent.Name)) then 
			print("Human passed test") 
                        hit.Parent.Torso.CFrame = CFrame.new(Vector3.new( 0, 0, 0)) --Change the 0's to the location of where you want non-VIPs to go
                        else hit.Parent.Torso.CFrame = (game.Workspace.AdminDoor.Position - (Vector3.new( 0, 0, 0)) --This line will teleport non-admins to the admin door + a Position, so if the 0's are ( 10, 10, 10), the person will move 10 studs away in one direction, 10 in another and 10 up, you could use math.Random here to
		end 
	end 
end 

script.Parent.Touched:connect(onTouched)

A VIP pants door

'''VIP Door script:'''
print ("VIP Pants Door Script")

-- list of account names allowed to go through the door.
permission = { "username1", "username2", "username3", "username4", "etc" } 

-- TextureId of the VIP Pants.
MadebySuperdude42 = "http://www.roblox.com/asset/?id=1859810"

function checkOkToLetIn(name) 
	for i = 1,#permission do 
		-- convert strings to all upper case, otherwise we will let in 
		-- "Username" but not "username" or "uSERNAME" 
		if (string.upper(name) == string.upper(permission[i])) then return true end 
	end 
	return false 
end 

-- list of account names allowed to go through the door.
permission = { "username1", "username2", "username3", "username4", "etc." }

-- TextureId of the VIP Pants.
MadebySuperdude42 = "http://www.roblox.com/asset/?id=1859810"

function checkOkToLetIn(name) 
	for i = 1,#permission do 
		-- convert strings to all upper case, otherwise we will let in 
		-- "Username" but not "username" or "uSERNAME" 
		if (string.upper(name) == string.upper(permission[i])) then return true end 
	end 
	return false 
end 

local Door = script.Parent

function onTouched(hit) 
	print("Door Hit") 
	local human = hit.Parent:findFirstChild("Humanoid") 
	if (human ~= nil ) then 
		if human.Parent.Pants.PantsTemplate == MadebySuperdude42 then --the pants
			Door.Transparency = 0.5 
			Door.CanCollide = false 
			wait(2) -- this is how long the door is open 
			Door.CanCollide = true 
			Door.Transparency = 0 
			-- a human has touched this door! 
			print("Human touched door") 
			-- test the human's name against the permission list 
		elseif (checkOkToLetIn(human.Parent.Name)) then 
			print("Human passed test") 
			Door.Transparency = 0.5
			Door.CanCollide = false 
			wait(4) -- this is how long the door is open
			Door.CanCollide = true 
			Door.Transparency = 0 
		else human.Health = 0 -- delete this line of you want a non-killing admin door 
		end 
	end 
end 

script.Parent.Touched:connect(onTouched)

VIP shirt(not T-Shirt)door

print ("VIP Shirt Door Script Loaded")

-- list of account names allowed to go through the door.
permission = { "username1", "username2", "username3", "username4", "etc." }

-- TextureId of the Admin Shirt(not t-shirt).
MadebySuperdude42 = "http://www.roblox.com/asset/?id=1859889"

function checkOkToLetIn(name) 
	for i = 1,#permission do 
		-- convert strings to all upper case, otherwise we will let in 
		-- "Username" but not "username" or "uSERNAME" 
		if (string.upper(name) == string.upper(permission[i])) then return true end 
	end 
	return false 
end 

local Door = script.Parent

function onTouched(hit) 
	print("Door Hit") 
	local human = hit.Parent:findFirstChild("Humanoid") 
	if (human ~= nil ) then 
		if human.Parent.Shirt.ShirtTemplate == MadebySuperdude42 then --the pants
			Door.Transparency = 0.5 
			Door.CanCollide = false 
			wait(2) -- this is how long the door is open 
			Door.CanCollide = true 
			Door.Transparency = 0 
			-- a human has touched this door! 
			print("Human touched door") 
			-- test the human's name against the permission list 
		elseif (checkOkToLetIn(human.Parent.Name)) then 
			print("Human passed test") 
			Door.Transparency = 0.5
			Door.CanCollide = false 
			wait(4) -- this is how long the door is open
			Door.CanCollide = true 
			Door.Transparency = 0 
		else human.Health = 0 -- delete this line of you want a non-killing admin door 
		end 
	end 
end 

VIP Spawn Script

MrB0ssM4n made the VIP spawn script. it takes away the need for VIP doors!

print ("VIP Spawn Script Loaded")

-- list of people who will spawn here
permission = { "NameHere", "NameHere", "NameHere", "NameHere" } --change NameHere to the usernames of the VIPs


texture = "http://www.roblox.com/asset/?id=2971388" --see the wiki on how to change shirts.

function checkOkToLetIn(name) 
	for i = 1,#permission do 
		if (string.upper(name) == string.upper(permission[i])) then return true end 
	end 
	return false 
end 

function onPlayerEntered(newPlayer) 
	print("Person Spawned") 
	local human = newPlayer:findFirstChild("Humanoid") 
	if (human ~= nil ) then 
		if human.Parent.Torso.roblox.Texture == texture then
			print("Humanoid Is VIP")
			human.Parent.Torso.TeamColor=script.Parent.TeamColor 
		elseif (checkOkToLetIn(human.Parent.Name)) then 
			human.Parent.Torso.TeamColor=script.Parent.TeamColor
                end
        end
end

game.Players.PlayerAdded:connect(onPlayerEntered)

Vip Platform

print ("VIP Shirt Door Script Loaded")

-- list of account names allowed to go through the door.
permission = { "Player" } -- Change Player to your Name

-- TextureId of the VIP shirt.
texture = "" -- Go to the wiki to script to find out how to change the shirt. And paste the link in between the "" marks.

function checkOkToLetIn(name) 
	for i = 1,#permission do 
		-- convert strings to all upper case, otherwise we will let in 
		-- "Username" but not "username" or "uSERNAME" 
		if (string.upper(name) == string.upper(permission[i])) then return true end 
	end 
	return false 
end 

local Door = script.Parent

function onTouched(hit) 
	print("Door Hit") 
	local human = hit.Parent:findFirstChild("Humanoid") 
	if (human ~= nil ) then 
		if human.Parent.Torso.roblox.Texture == texture then --the shirt 
			Door.Transparency = 0
			Door.CanCollide = true 
			wait(4) -- this is how long the door is open 
			Door.CanCollide = false 
			Door.Transparency = 0 
			-- a human has touched this Platform! 
			print("Human touched door") 
			-- test the human's name against the permission list 
		elseif (checkOkToLetIn(human.Parent.Name)) then 
			print("Human passed test") 
			Door.Transparency = 0
			Door.CanCollide = true 
			wait(4) -- this is how long the Platform is Solid
			Door.CanCollide = false 
			Door.Transparency = 0 
		else human.Health = 0 -- delete this line of you want a non-killing VIP Platform 
		end 
	end 
end 

script.Parent.Touched:connect(onTouched)

A Few bugs, but they Can Be Worked Out

VIP Code And Letter Door

To get started, make the door. Add a script into the door, then name the script "MasterScript" then add the script below into it.

Code = "" -- Type your code here
while true do -- loop
	if script.Disabled == false then
		if script.parent.parent.Name == Code then
			script.parent.Transparency = 0.5
			script.parent.CanCollide = false
			script.parent.parent.Name = "Password Approved" 
			wait(5)
			script.parent.Transparency = 0
			script.parent.CanCollide = true
			script.parent.parent.Name = "" 
		end
	end
	wait(0.1)
end

Making The Letters And Numbers

The numbers and letters are used to put in your code and open the door. To get started, make 26 1,0.4,1 Letter Bricks and 10 1,0.4,1 Number Bircks. Then put a click detector and a script into EACH OF THE NEW BRICKS. Insert the script below into the scripts in ALL the buttons.

function clickedzero()
	if script.parent.Name == "" then
		script.parent.parent.Name = "0."
	else
		script.parent.parent.Name = script.parent.parent.Name..""..script.parent.Name
	end
end


script.parent.ClickDetector.MouseClick:connect(clickedzero)

Making The Frame

Insert FOUR simple bricks and anchor them.

  • "Brick 1" should be 3,12,11 in size.
  • "Brick 2" should be 3,1.2,20 also in size.
  • "Brick 3" will be called "Head" and be 9,1.2,1.
  • "Brick 4" should be 3,13.1,1.

After you have those four bricks, place "Brick 2" on top of "Brick 1" so that three edges matches the edge of "Brick 1". Place the "Head" brick under "Brick 2" and touches on one side Brick 1. Next, place the door under the "Head" brick and touches "Brick 1" also. Place, "Brick 4" to the edge not covered by a black brick.

Putting It Together

Now put the buttons on "Brick 1" in order and put decals on the buttons to identify them.