local C=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local g=C:WaitForChild("\077\111\100\117\108\101\115")local q=g:WaitForChild("\115\114\099")local h=require(q.utils.Logger)local x={}local t={"\069\102\102\101\099\116\095\077\111\117\115\101","\069\102\102\101\099\116\095\083\099\114\101\097\109\049";"\069\102\102\101\099\116\095\083\099\114\101\097\109\050";"\069\102\102\101\099\116\095\083\099\114\101\097\109\051","\069\102\102\101\099\116\095\083\099\114\101\097\109\052","\069\102\102\101\099\116\095\083\099\114\101\097\109\053";"\069\102\102\101\099\116\095\067\104\097\105\110\115\097\119\049","\069\102\102\101\099\116\095\067\104\097\105\110\115\097\119\050","\069\102\102\101\099\116\095\087\104\105\115\112\101\114\049";"\069\102\102\101\099\116\095\087\104\105\115\112\101\114\050","\069\102\102\101\099\116\095\087\104\105\115\112\101\114\051";"\069\102\102\101\099\116\095\073\083\101\101\089\111\117","\069\102\102\101\099\116\095\070\097\114\116","\069\102\102\101\099\116\095\066\097\114\107\105\110\103";"\069\102\102\101\099\116\095\087\105\110\100\072\111\119\108";"\069\102\102\101\099\116\095\087\111\108\102\072\111\119\108";"\069\102\102\101\099\116\095\083\110\097\114\108";"\069\102\102\101\099\116\095\087\111\108\102\083\110\097\114\108";"\069\102\102\101\099\116\095\090\111\109\098\105\101\083\110\097\114\108"}local e={}function x.makeSound(x,C,g,q)local P=e[C]if not P then P=t[math.random(1,#t)]e[C]=P end h:w("\080\108\097\121\101\114 \112\108\097\121\101\100 \114\097\110\100\111\109 \115\111\117\110\100",P)q(P,C)wait(g)end return x
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local Modules = ReplicatedStorage:WaitForChild('Modules')
local src = Modules:WaitForChild('src')
local logger = require(src.utils.Logger)

local SoundTriggerManager = {}

local sounds =
	{
		'Effect_Mouse',
		'Effect_Scream1',
		'Effect_Scream2',
		'Effect_Scream3',
		'Effect_Scream4',
		'Effect_Scream5',
		'Effect_Chainsaw1',
		'Effect_Chainsaw2',
		'Effect_Whisper1',
		'Effect_Whisper2',
		'Effect_Whisper3',
		'Effect_ISeeYou',
		'Effect_Fart',
		'Effect_Barking',
		'Effect_WindHowl',
		'Effect_WolfHowl',
		'Effect_Snarl',
		'Effect_WolfSnarl',
		'Effect_ZombieSnarl',
	}

local cachedSounds = {}
function SoundTriggerManager:makeSound(triggerPart, waitFor, playAudio)
	local sound = cachedSounds[triggerPart]
	if not sound then
		sound = sounds[math.random(1, #sounds)]
		cachedSounds[triggerPart] = sound
	end

	logger:w('Player played random sound', sound)
	playAudio(sound, triggerPart)

	wait(waitFor)
end

return SoundTriggerManager