local X=script.soundeffect if level>=0 and level<=100 then X.HighGain=(level*-1)/2 X.MidGain=(level*-1)/2 elseif level<0 then X.HighGain=0 X.MidGain=0 elseif level>100 then X.HighGain=-50 X.MidGain=-50 end
-- the script ----------------------

local effect = script.soundeffect

if level >= 0 and level <= 100 then
	effect.HighGain = (level * -1) / 2
	effect.MidGain = (level * -1) / 2
elseif level < 0 then
	effect.HighGain = -0
	effect.MidGain = -0
elseif level > 100 then
	effect.HighGain = -50
	effect.MidGain = -50
end
