I made a post earlier about this, fixed the errors, edited some things, and still doesn't work.
admins = {"wattleman"}
group = {899203}
rankid = 50
keyword = {"gun"}
function isAdmin()
for i,v in pairs(admins) do
if Player.Name == (v) then
return true
elseif Player.Name ~= (v) then
for i,v in pairs(group) do
if Player:isInGroup(v) and Player:GetRankInGroup(v) >= 50 then
return true
end
end
end
end
end
game.Players.PlayerAdded:connect(function(Player)
Player.Chatted:connect(function(Message)
if Player(isAdmin(Player)) then
for i,v in pairs(keyword) do
if Message:lower() == (string.sub("gun") (1, 3)) then
trigger()
elseif Message:lower() == (string.sub("countdown") (1, 9)) then
local cdt = game.Lighting.CountDownTimer
local timer = game.Lighting.Timer
cdt.Value = "Active"
for i = 3, 0, -1 do
timer.Value = i
wait(3)
timer.Value = "GO!"
wait(1)
cdt.Value = "NotActive"
end
end
end
end
end)
end)
function trigger()
script.Parent.Parent.Part1.Transparency = 0
script.Parent.Parent.Part1.CanCollide = true
wait(.1)
script.Parent.Parent.Part2.Transparency = 0
script.Parent.Parent.Part2.CanCollide = true
wait(.1)
script.Parent.Parent.Part3.Transparency = 0
script.Parent.Parent.Part3.CanCollide = true
wait(.1)
script.Parent.Parent.Part4.Transparency = 0
script.Parent.Parent.Part4.CanCollide = true
wait(.1)
script.Parent.Parent.Part5.Transparency = 0
script.Parent.Parent.Part5.CanCollide = true
wait(.1)
script.Parent.Parent.Part6.Transparency = 0
script.Parent.Parent.Part6.CanCollide = true
script.Parent.Parent.Parent.SFing.Part1.Transparency = 1
script.Parent.Parent.Parent.SFing.Part1.CanCollide = false
end
