Use=false function ChangeCode(u,t)if script.Parent.Parent.Status.Value~=0 then return end if Use then return end Use=true for u,t in pairs(script.Parent.Parent.CPanelButtons:GetChildren())do t.BrickColor=BrickColor.new("\076\105\103\104\116 \115\116\111\110\101 \103\114\101\121")end t.BrickColor=BrickColor.new("\076\105\109\101 \103\114\101\101\110")script.Parent.Parent.SounderTone.Value=u wait(.5)Use=false end for u,t in pairs(script.Parent.Parent.CPanelButtons:GetChildren())do t.ClickDetector.MouseClick:connect(function()ChangeCode(t.Name:sub(7),t)end)end

Use = false
function ChangeCode(Code,l)
if script.Parent.Parent.Status.Value ~= 0 then return end
if Use then return end
Use = true
for i,l in pairs(script.Parent.Parent.CPanelButtons:GetChildren()) do l.BrickColor = BrickColor.new("Light stone grey") end


l.BrickColor =  BrickColor.new("Lime green")
script.Parent.Parent.SounderTone.Value = Code
wait(0.5)
Use = false
end


for i,l in pairs(script.Parent.Parent.CPanelButtons:GetChildren()) do
	
	l.ClickDetector.MouseClick:connect(function() ChangeCode(l.Name:sub(7),l) end)
end
