local sound = playSound("https://upload.wikimedia.org/wikipedia/commons/0/0d/Hino-Nacional-Brasil-instrumental-mec.ogg", false)
addEventHandler("onClientRender", root, function()
for i, v in pairs(getElementsByType("sound", resourceRoot)) do
if getSoundPosition(v) >= getSoundLength(v) - 10 then
setSoundVolume(v, getSoundVolume(v) - 0.005)
end
end
end)