return function(q,R,Y,h,X)R=string.lower(R)h=h or.15 X=X or false local P={}if R=="\109\111\117\115\101\100\111\119\110"then P[#P+1]=q.MouseButton1Down:Connect(function()_L.Audio.Play(Y,script,X and math.random(95,105)/100 or 1,h*2)end)elseif R=="\109\111\117\115\101\117\112"then P[#P+1]=q.MouseButton1Up:Connect(function()_L.Audio.Play(Y,script,X and math.random(95,105)/100 or 1,h*2)end)elseif R=="\109\111\117\115\101\101\110\116\101\114"then P[#P+1]=q.MouseEnter:Connect(function()_L.Audio.Play(Y,script,X and math.random(95,105)/100 or 1,h)end)elseif R=="\109\111\117\115\101\108\101\097\118\101"then P[#P+1]=q.MouseLeave:Connect(function()_L.Audio.Play(Y,script,X and math.random(95,105)/100 or 1,h)end)elseif R=="\109\111\117\115\101\099\108\105\099\107"then P[#P+1]=q.MouseButton1Click:Connect(function()_L.Audio.Play(Y,script,X and math.random(95,105)/100 or 1,h)end)end return function()for q,R in ipairs(P)do R:disconnect()end P=nil end end



return function(element, interactType, interactSoundId, interactSoundVolume, enableRandomPitch)
	--- Variables
	interactType = string.lower(interactType)
	interactSoundVolume = interactSoundVolume or 0.15
	enableRandomPitch = enableRandomPitch or false
	--
	local events = {}
	
	--- Events
	if interactType == "mousedown" then
		--- Mouse down
		events[#events + 1] = element.MouseButton1Down:Connect(function()
			_L.Audio.Play(interactSoundId, script, (enableRandomPitch and math.random(95, 105) / 100 or 1), interactSoundVolume * 2)
		end)
		
	elseif interactType == "mouseup" then
		--- Mouse up
		events[#events + 1] = element.MouseButton1Up:Connect(function()
			_L.Audio.Play(interactSoundId, script, (enableRandomPitch and math.random(95, 105) / 100 or 1), interactSoundVolume * 2)
		end)
		
	elseif interactType == "mouseenter" then
		--- Mouse hover over
		events[#events + 1] = element.MouseEnter:Connect(function()
			_L.Audio.Play(interactSoundId, script, (enableRandomPitch and math.random(95, 105) / 100 or 1), interactSoundVolume)
		end)

	elseif interactType == "mouseleave" then
		--- Mouse hover leave
		events[#events + 1] = element.MouseLeave:Connect(function()
			_L.Audio.Play(interactSoundId, script, (enableRandomPitch and math.random(95, 105) / 100 or 1), interactSoundVolume)
		end)
	
	elseif interactType == "mouseclick" then
		--- Mouse click
		events[#events + 1] = element.MouseButton1Click:Connect(function()
			_L.Audio.Play(interactSoundId, script, (enableRandomPitch and math.random(95, 105) / 100 or 1), interactSoundVolume)
		end)
	end
	
	--- Return function to cancel this behavior
	return function()
		for _, event in ipairs(events) do
			event:disconnect()
		end
		events = nil
	end
end
