Discern
|
  |
| Joined: 02 Feb 2013 |
| Total Posts: 331 |
|
|
| 04 Feb 2013 07:49 PM |
Can someone help me with this map changing script?
admins = {"Discern", "FireFang4589", "hypnoticdrew", "altforRigbyxx", "Fireball6675", "00EpicPenguin00"} map = game.Workspace.Map door = game.Workspace.Door w = game.Workspace:GetChildren() sf = game.Lighting.SF:GetChildren() gf = game.Lighting.GF:GetChildren() walls = game.Workspace.InnerWalls:GetChildren()
function onChat(msg) if string.lower(msg) == "open walls" then if door.Value == true then door.Value = false for i, v in pairs(walls) do v.Transparency = 1 v.CanCollide = false s = Instance.new("SelectionBox", v) s.Color = BrickColor.new("Medium stone grey") s.Adornee = v end end elseif string.lower(msg) == "close walls" then if door.Value == false then door.Value = true for i, v in pairs(walls) do v.CanCollide = true v.Transparency = 0.7 v.SelectionBox:Destroy() end end elseif string.lower(msg) == "start sf" then if map.Value == false then map.Value = true m = Instance.new("Message", game.Workspace) m.Text = "Loading Swordfighting." wait(2) m:Destroy() sf.Parent = game.Workspace for i, v in pairs(sf) do if v.ClassName == "Part" then s = Instance.new("SelectionBox", v) s.Adornee = v s.Color = BrickColor.new("Really red") v.Transparency = 0 wait(.2) s:Destroy() wait(.2) end end m = Instance.new("Message", game.Workspace) m.Text = "Swordfighting Loading Completed. Please wait for further instructions." wait(5) m:Destroy() end elseif string.lower(msg) == "start gf" then if map.Value == false then map.Value = true m = Instance.new("Message", game.Workspace) m.Text = "Loading Gunfighting." wait(2) m:Destroy() gf.Parent = game.Workspace for i, v in pairs(gf) do if v.ClassName == "Part" then s = Instance.new("SelectionBox", v) s.Adornee = v s.Color = BrickColor.new("Really red") v.Transparency = 0 wait(.2) s:Destroy() wait(.2) end end m = Instance.new("Message", game.Workspace) m.Text = "Gunfighting Loading Completed. Please wait for further instructions." end elseif string.lower(msg) == "clear map" then if map.Value == true then map.Value = false for i = 1, #w do if w[i].Name == "SF" or w[i].Name == "GF" then w[i].Parent = game.Lighting t = w[i]:GetChildren() for i = 1, #t do if t[i].ClassName == "Part" then t[i].Transparency = 1 end end end end m = Instance.new("Message", game.Workspace) m.Text = "Map Cleared. Please wait for further instructions." wait(5) m:Destroy() end end end
game.Players.PlayerAdded:connect(function(player) for i, v in pairs(admins) do if player.Name == v then player.Chatted:connect(onChat) end end end) |
|
|
| Report Abuse |
|
dekkonot
|
  |
| Joined: 22 Dec 2010 |
| Total Posts: 6685 |
|
|
| 04 Feb 2013 07:50 PM |
| This is a case of 'over complicated'...and yes, I could help you, no I won't. |
|
|
| Report Abuse |
|
Discern
|
  |
| Joined: 02 Feb 2013 |
| Total Posts: 331 |
|
| |
dekkonot
|
  |
| Joined: 22 Dec 2010 |
| Total Posts: 6685 |
|
|
| 04 Feb 2013 07:54 PM |
| I'm too lazy to make a custom command script for you. Or even fix it. I dunt leik fixing things... |
|
|
| Report Abuse |
|
Discern
|
  |
| Joined: 02 Feb 2013 |
| Total Posts: 331 |
|
| |
Discern
|
  |
| Joined: 02 Feb 2013 |
| Total Posts: 331 |
|
| |