generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

How do I rescript this holo?

Previous Thread :: Next Thread 
Sethien is not online. Sethien
Joined: 24 Dec 2010
Total Posts: 1817
01 Mar 2014 10:43 PM
I want it to have one thing at the top for people who are allowed to have commands. If I add more than one person to the "if player.Name == "Sethien"" then it messes up. So I just want one permissions section at the top and I want to remove the rest. What do I do?

game.Players.ChildAdded:connect(function(player)
player.Chatted:connect(function(chat)
if player.Name == "Sethien" then
if string.lower(chat) == "run/sft" then
if not game.Workspace:FindFirstChild("sft") then
game.Lighting["sft"]:Clone().Parent = game.Workspace
end
elseif string.lower(chat) == "end/sft" then
if game.Workspace:FindFirstChild("sft") then
game.Workspace["sft"]:Remove()
end
end
end
end)
end)
game.Players.ChildAdded:connect(function(player)
player.Chatted:connect(function(chat)
if player.Name == "Sethien" then
if string.lower(chat) == "run/ffa" then
if not game.Workspace:FindFirstChild("FFA") then
game.Lighting["FFA"]:Clone().Parent = game.Workspace
end
elseif string.lower(chat) == "end/ffa" then
if game.Workspace:FindFirstChild("FFA") then
game.Workspace["FFA"]:Remove()
end
end
end
end)
end)
game.Players.ChildAdded:connect(function(player)
player.Chatted:connect(function(chat)
if player.Name == "Sethien" then
if string.lower(chat) == "run/sharks" then
if not game.Workspace:FindFirstChild("Sharks") then
game.Lighting["Sharks"]:Clone().Parent = game.Workspace
end
elseif string.lower(chat) == "end/sharks" then
if game.Workspace:FindFirstChild("Sharks") then
game.Workspace["Sharks"]:Remove()
end
end
end
end)
end)
game.Players.ChildAdded:connect(function(player)
player.Chatted:connect(function(chat)
if player.Name == "Sethien" then
if string.lower(chat) == "run/meeting" then
if not game.Workspace:FindFirstChild("Meeting") then
game.Lighting["Meeting"]:Clone().Parent = game.Workspace
end
elseif string.lower(chat) == "end/meeting" then
if game.Workspace:FindFirstChild("Meeting") then
game.Workspace["Meeting"]:Remove()
end
end
end
end)
end)
game.Players.ChildAdded:connect(function(player)
player.Chatted:connect(function(chat)
if player.Name == "Sethien" then
if string.lower(chat) == "run/obstacle1" then
if not game.Workspace:FindFirstChild("Obstacle1") then
game.Lighting["Obstacle1"]:Clone().Parent = game.Workspace
end
elseif string.lower(chat) == "end/obstacle1" then
if game.Workspace:FindFirstChild("Obstacle1") then
game.Workspace["Obstacle1"]:Remove()
end
end
end
end)
end)
game.Players.ChildAdded:connect(function(player)
player.Chatted:connect(function(chat)
if player.Name == "Sethien" then
if string.lower(chat) == "run/obstacle2" then
if not game.Workspace:FindFirstChild("Obstacle2") then
game.Lighting["Obstacle2"]:Clone().Parent = game.Workspace
end
elseif string.lower(chat) == "end/obstacle2" then
if game.Workspace:FindFirstChild("Obstacle2") then
game.Workspace["Obstacle2"]:Remove()
end
end
end
end)
end)
game.Players.ChildAdded:connect(function(player)
player.Chatted:connect(function(chat)
if player.Name == "Sethien" then
if string.lower(chat) == "close/arenasim" then
if not game.Workspace:FindFirstChild("ArenaSim") then
game.Lighting["ArenaSim"]:Clone().Parent = game.Workspace
end
elseif string.lower(chat) == "open/arenasim" then
if game.Workspace:FindFirstChild("ArenaSim") then
game.Workspace["ArenaSim"]:Remove()
end
end
end
end)
end)
game.Players.ChildAdded:connect(function(player)
player.Chatted:connect(function(chat)
if player.Name == "Sethien" then
if string.lower(chat) == "close/sim" then
if not game.Workspace:FindFirstChild("Sim") then
game.Lighting["Sim"]:Clone().Parent = game.Workspace
end
elseif string.lower(chat) == "open/sim" then
if game.Workspace:FindFirstChild("Sim") then
game.Workspace["Sim"]:Remove()
end
end
end
end)
end)
game.Players.ChildAdded:connect(function(player)
player.Chatted:connect(function(chat)
if player.Name == "Sethien" then
if string.lower(chat) == "close/arena" then
if not game.Workspace:FindFirstChild("Arena") then
game.Lighting["Arena"]:Clone().Parent = game.Workspace
end
elseif string.lower(chat) == "open/arena" then
if game.Workspace:FindFirstChild("Arena") then
game.Workspace["Arena"]:Remove()
end
end
end
end)
end)
Report Abuse
Voidition is not online. Voidition
Joined: 14 Jul 2012
Total Posts: 1849
01 Mar 2014 10:48 PM
[ Content Deleted ]
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
01 Mar 2014 11:34 PM
if player.Name == "name" or player.Name == "othername" or player.Name == "adiffname" then
--just use "or"
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image