|
| 09 Jul 2011 05:30 PM |
print ("VIP T-Shirt Door Script Loaded")
-- list of account names allowed to go through the door. permission = { "legend8887" } -- 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/Survive-Epic-Disasters-VIP-item?id=55800314" -- 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) |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 05:31 PM |
| texture = "http://www.roblox.com/asset?id=55800313" |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jul 2011 05:33 PM |
| Your texture variable held the wrong link. |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jul 2011 05:43 PM |
| You want the asset id of the T-Shirt, not the item id. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 05:43 PM |
| Sorry threadmaker, but I rofl'd. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 05:44 PM |
| And agent, you're good with being persistent. :P |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 05:47 PM |
@Agent, lost cause...Lol
@OwnerOfThread, A learn to script, B no free models, pl0x. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 06:00 PM |
Oh well.
function getAssetId(link) local num = tonumber(link:reverse():match("(%d+)"):reverse()) local item = "http://www.roblox.com/Item.aspx?id="..(num-1) local asset = "http://www.roblox.com/asset?id="..(num-1) print("Check this link to see if it's your image: ", item) print("If that link is correct, use this asset: ", asset) print("--------------------------------------------") print("If the given link was incorrect, insert the image link into the function") end
getAssetId("http://www.roblox.com/Survive-Epic-Disasters-VIP-item?id=55800314")
This requires the use of Edit mode and View > Output. Or you could always use that code on this site:
http://www.lua.org/cgi-bin/demo
This is for the beginners. :P |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 06:04 PM |
| @Agent How do you find the asset ID of the T-Shirt? |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 06:07 PM |
| Take the numbers in the 'id=#########' section and subtract one from it. Then insert the numbers at the end of the string 'http://www.roblox.com/Item.aspx?id=' and if the resulting page has an item that belongs to you, the asset id is 'http://www.roblox.com/asset?id=' with the number at the end. |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jul 2011 06:11 PM |
| @Agent What do you mean and subtract one from it? |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 06:13 PM |
print ("VIP T-Shirt Door Script Loaded")
permission = { "Legend8887" } -- This is how many people can still get through, so u don't have to change shirts. You can also have another friend here.
texture = "http://www.roblox.com/asset/?id=55800313" function checkOkToLetIn(name) for i = 1,#permission do 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 Door.Transparency = 0.6 Door.CanCollide = false wait(3) -- this is how long the door is open Door.CanCollide = true Door.Transparency = 0 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.6 Door.CanCollide = false wait(3) -- 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) |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 06:16 PM |
@Legend
I fixed it, look at my last post. When you upload a shirt, tshirt, pants, decal, then it always becomes an image to be approved by the mods before it becomes a decal, shirt, tshirt, etc.
So basically, you need the image ID instead of the tshirt or shirt ID.
So to access the image ID, you just subtract one from the regular ID.
So if the shirt ID was 55800314, then -1 and it's 55800313. Try it, and you'll see the image you uploaded, which is right here:
http://www.roblox.com/cooltext538296385-item?id=55800313 |
|
|
| Report Abuse |
|
|
zack11212
|
  |
| Joined: 24 Aug 2009 |
| Total Posts: 301 |
|
|
| 09 Jul 2011 06:44 PM |
| You cant have permission or it wont work so remove your permission and only use the t-shirt. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 06:52 PM |
| @ieatboulders Ok, I think I fixed it. But now, if you own the T-Shirt, but you're not wearing it, you can still get into the VIP Room. How do I fix it so you HAVE to be wearing the T-Shirt in order to get into the VIP Room? |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jul 2011 07:00 PM |
| I meant how will it mess it up? :3 |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 07:03 PM |
I don't see if it makes a difference if they're wearing it or not. Any specific reasons they need to be wearing it? If not, just keep it how it is. If so, reply back. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 07:06 PM |
| Well, if I have it where you don't HAVE to be wearing the T-Shirt, don't you think noobs will think you don't have to have a T-Shirt at all? So they will keep trying to get into the VIP Room. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 10:08 PM |
| We'll they wont be able to, so basically it just keeps them their longer for more people to arrive, meaning bigger servers, meaning front page faster. |
|
|
| Report Abuse |
|
|