function KeepModulateActive()repeat wait()ModVal.Value=true until ModSwch.Value==false or Power.Value==false ModVal.Value=false end ModSwch.Changed:Connect(function()if ModSwch.Value==true then ModSwch.Parent.P1.Transparency=1 ModSwch.Parent.P2.Transparency=0 ClickSound:Play()if Power.Value==true then KeepModulateActive()end else ModSwch.Parent.P1.Transparency=0 ModSwch.Parent.P2.Transparency=1 ClickSound:Play()ModVal.Value=false end end)
--ModulateSwitch

function KeepModulateActive()
	repeat
		wait()
		ModVal.Value = true
	until ModSwch.Value == false or Power.Value == false
	ModVal.Value = false
end

ModSwch.Changed:Connect(function()
	if ModSwch.Value == true then
		ModSwch.Parent.P1.Transparency = 1
		ModSwch.Parent.P2.Transparency = 0
		ClickSound:Play()
		if Power.Value == true then
			KeepModulateActive()
		end
	else
		ModSwch.Parent.P1.Transparency = 0
		ModSwch.Parent.P2.Transparency = 1
		ClickSound:Play()
		ModVal.Value = false
	end
end)
