Run it
Copy the script and paste it into your executor.
--[[
Updated By Weavy
]]
local RunService = game:GetService("RunService")
local SoundThreshold = 700 -- Modify it to your liking [700 = default]
local originalVolumes = {}
local activeSounds = {}
local function muteSound(sound)
if not originalVolumes[sound] then
originalVolumes[sound] = sound.Volume
end
sound.Volume = 0
end
local function restoreSound(sound)
if originalVolumes[sound] then
sound.Volume = originalVolumes[sound]
originalVolumes[sound] = nil
end
end
local function updateSounds()
for _, sound (activeSounds)
sound.PlaybackLoudness > SoundThreshold
(sound)
(sound)
(sound)
.(activeSounds, sound)
(sound)
i, activeSound (activeSounds)
activeSound == sound
.(activeSounds, i)
(sound)
_, sound (:())
sound:()
(sound)
.DescendantAdded:((descendant)
descendant:()
(descendant)
)
.DescendantRemoving:((descendant)
descendant:()
(descendant)
)
RunService.Heartbeat:(updateSounds) Basically tracks every sound instance in your game and if their PlaybackLoudness goes over the threshold will temporarily mute it until the sound maintains below the threshold. Made By: Empire4946 Updated By: Weavy