--//by wild
--//also hastily written i don't care about making this one look nice


local Sound = workspace.Audios

local vol = {}

vol.table = {}

vol.Reset = function()
	
	for _,v in pairs(Sound.FAAS:GetDescendants()) do
		if v:IsA("Sound") then
			v.PlaybackSpeed = 1
			v:Stop()
		end
	end
	
	for _,v in pairs(Sound.HumanAnnouncements:GetDescendants()) do
		if v:IsA("Sound") then
			v.PlaybackSpeed = 1
			v:Stop()
		end
	end
	
	if game.Players.LocalPlayer.PlayerGui:WaitForChild("UserInterface").GuiController.SettingsModule.PlayerMusicDisabled.Value == false then
		for _,v in pairs(Sound.Music:GetDescendants()) do
			if v:IsA("Sound") then
				v.PlaybackSpeed = 1
				v:Stop()
			end
		end
	end
	
end

vol.Mute = function()

	for _,v in pairs(Sound.FAAS:GetDescendants()) do
		if v:IsA("Sound") then
			v.PlaybackSpeed = 0
			v:Stop()
		end
	end
	
	for _,v in pairs(Sound.HumanAnnouncements:GetDescendants()) do
		if v:IsA("Sound") then
			v.PlaybackSpeed = 0
			v:Stop()
		end
	end
	
	if game.Players.LocalPlayer.PlayerGui:WaitForChild("UserInterface").GuiController.SettingsModule.PlayerMusicDisabled.Value == false then
		for _,v in pairs(Sound.Music:GetDescendants()) do
			if v:IsA("Sound") then
				v.PlaybackSpeed = 0
				v:Stop()
			end
		end
	end
end

return vol
