PRGJoin Date: 2007-06-19 Post Count: 4185 |
-- Anaminus
admins = {"PRG","Player","???"} -- Names of admins.
shirts = {"1176995","1454851","1116975"} -- Replace ####### with shirt's ID#. Just the ID#.
ForceField = true -- Enable/disable ForceField.
Health = true -- Enable/disbale infinite health.
Tools = true -- Enable/disable admin tools.
Team = true -- Enable/disable admin team.
teamName = "Fighters" -- Name of admin team.
teamColor = "Bright red" -- Use color name, number, Color3, etc...
local team = nil
if Team then
local teams = game:GetService("Teams")
team = game.Teams:FindFirstChild(teamName)
if team == nil then
team = Instance.new("Team")
team.Name = teamName
team.TeamColor = BrickColor.new(teamColor)
team.Parent = game.Teams
end
team.AutoAssignable = false
end
function check(player)
if #admins == 0 then return true end
for i = 1,#admins do
if string.lower(player.Name)==string.lower(admins[i]) then return true end
end
return false
end
function checkShirt(player)
if #shirts == 0 then return true end
for i = 1,#shirts do
if player.Character.Torso.roblox.Texture == ("http://www.roblox.com/asset/?version=1&id="..shirts[i]) then return true end
end
return false
end
function onPlayerRespawned(newPlayer)
if newPlayer == nil then return end
if check(newPlayer) or checkShirt(newPlayer) then
-- Tools
if Tools then
local w = game.Lighting:GetChildren()
for i = 1,#w do
if w[i].className == "Tool" or w[i].className == "HopperBin" then
w[i]:Clone().Parent = newPlayer.Backpack
end
end
end
-- Team
if Team then
if team ~= nil then
newPlayer.Neutral = false
newPlayer.TeamColor = team.TeamColor
end
end
-- Force Field
if ForceField then
Instance.new("ForceField").Parent = newPlayer.Character
end
-- Health
if Health then
local h = newPlayer.Character.Humanoid
h.MaxHealth = 9e+900
h.Health = 9e+900
end
end
end
function onPlayerEntered(newPlayer)
newPlayer.Changed:connect(function (property)
if (property == "Character") then
onPlayerRespawned(newPlayer)
end
end)
end
game.Players.PlayerAdded:connect(onPlayerEntered)
---------------------------------------------------------------------
It won't let any of the people wearing any of my admin shirts into the admin room! |
|
DingDong272Top 100 PosterJoin Date: 2007-12-08 Post Count: 9860 |
You don't have the color right. It is this:
teamColor = BrickColor["Bright Red"]()
I think...Otherwise it's this:
teamColor = BrickColor.Bright Red() |
|
WWIIguyJoin Date: 2007-10-03 Post Count: 303 |
Well, I know practically nothing about scripting, the only problem I can think of is that the admin door gets shot by a paintball gun. Thats the most commen failure of admin doors. |
|
PRGJoin Date: 2007-06-19 Post Count: 4185 |
No, this is a place script. Place it in the workspace. |
|
|
You need to change the shirt ID to yours Because its a shirt door and the id should look like this"http//www.Roblox.com/asst?/123345"
Or something like that. |
|
|
Ignore the above post I noticed what type of door it was. |
|
PRGJoin Date: 2007-06-19 Post Count: 4185 |
Not a door. |
|
RomulusJoin Date: 2008-02-25 Post Count: 187 |
Its
TeamColor = BrickColor.Red()
or
TeamColor = BrickColor.new(21)
Either one is the exact same.
Dingdong272, you need to at least learn the basics of Lua before you try to teach anyone. |
|
PRGJoin Date: 2007-06-19 Post Count: 4185 |
This script is made by THE Anaminus. Hopefully you know what you are doing Zuka. No offence. |
|
chris1989Join Date: 2007-11-30 Post Count: 2520 |
i have the exact same problem but the script works the only prob is the shirt parti have the correct ID# in
-- Anaminus
admins = {"chris1989"} -- Names of admins.
shirts = {"1383972"} -- Replace ####### with shirt's ID#. Just the ID#.
ForceField = true -- Enable/disable ForceField.
Health = true -- Enable/disbale infinite health.
Tools = true -- Enable/disable admin tools.
Team = true -- Enable/disable admin team.
teamName = "Admins/Winners" -- Name of admin team.
teamColor = "Bright blue" -- Use color name, number, Color3, etc...
local team = nil
if Team then
local teams = game:GetService("Teams")
team = game.Teams:FindFirstChild(teamName)
if team == nil then
team = Instance.new("Team")
team.Name = teamName
team.TeamColor = BrickColor.new(teamColor)
team.Parent = game.Teams
end
team.AutoAssignable = false
end
function check(player)
if #admins == 0 then return true end
for i = 1,#admins do
if string.lower(player.Name)==string.lower(admins[i]) then return true end
end
return false
end
function checkShirt(player)
if #shirts == 0 then return true end
for i = 1,#shirts do
if player.Character.Torso.roblox.Texture == ("http://www.roblox.com/asset/?version=1&id="..shirts[i]) then return true end
end
return false
end
function onPlayerRespawned(newPlayer)
if newPlayer == nil then return end
if check(newPlayer) or checkShirt(newPlayer) then
-- Tools
if Tools then
local w = game.Lighting:GetChildren()
for i = 1,#w do
if w[i].className == "Tool" or w[i].className == "HopperBin" then
w[i]:Clone().Parent = newPlayer.Backpack
end
end
end
-- Team
if Team then
if team ~= nil then
newPlayer.Neutral = false
newPlayer.TeamColor = team.TeamColor
end
end
-- Force Field
if ForceField then
Instance.new("ForceField").Parent = newPlayer.Character
end
-- Health
if Health then
local h = newPlayer.Character.Humanoid
h.MaxHealth = 9e+900
h.Health = 9e+900
end
end
end
function onPlayerEntered(newPlayer)
newPlayer.Changed:connect(function (property)
if (property == "Character") then
onPlayerRespawned(newPlayer)
end
end)
end
game.Players.PlayerAdded:connect(onPlayerEntered)
somone fix please
|
|
nate2800Join Date: 2007-08-16 Post Count: 828 |
This script is fine.
It is NOT an admin door! |
|
DingDong272Top 100 PosterJoin Date: 2007-12-08 Post Count: 9860 |
HA! Romulus that is the BIGGEST lie I have ever heard. I know more about scripting than you! "learn the basics". HA! You, my friend, have no idea how lame you are in scripting compared to me. |
|
nate2800Join Date: 2007-08-16 Post Count: 828 |
What DingDong? Zuka is correct.
BrickColor.Red()
is equal to
BrickColor.new(21)
Don't yell about people unless they know things. >_>
And I am guessing he may know a little more than you, of course, it is not my place to judge that, since I've never seen your scripting abilities fully demonstrated. Anyway, here is my tutorial and descendent information.
Theres a lot more.
I believe there is:
BrickColor.Green()
BrickColor.Red()
BrickColor.Yellow()
BrickColor.Blue()
BrickColor.Black()
BrickColor.White()
And probably more.
Also, ["stuffhere"] looks for children of the object, and if there is no child that matches what is in the brackets, it looks for propertys instead.
game["Workspace"]
is the same as game.Workspace
game.Workspace.Part["BrickColor"] = BrickColor["Red"]() is also the same as game.Workspace.Part.BrickColor = BrickColor.Red()
So I guess if you put BrickColor["Bright Red"]() it would work.. |
|
AnaminusTop 100 PosterJoin Date: 2006-11-29 Post Count: 5945 |
The team color is fine. I think something's goofy with the way it returns the Texture content. Try the most recent script I published, instead. It might work.
?-Anaminus-? |
|
PRGJoin Date: 2007-06-19 Post Count: 4185 |
I tried that too, still nothing. |
|
PRGJoin Date: 2007-06-19 Post Count: 4185 |
Bump |
|