-- Decompiled with the Synapse X Luau decompiler.


local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
end)();
return function(p1, p2, p3, p4, p5)
	local v1 = {};
	p2 = string.lower(p2);
	p4 = p4 or 0.15;
	if p2 == "mousedown" then
		v1[#v1 + 1] = p1.InputBegan:Connect(function(p6)
			local l__UserInputType__2 = p6.UserInputType;
			if l__UserInputType__2 == Enum.UserInputType.MouseButton1 or (l__UserInputType__2 == Enum.UserInputType.Touch and p6.UserInputState == Enum.UserInputState.Begin or p6.KeyCode == Enum.KeyCode.ButtonA) then
				u1.Sound.Play(p3, script, p4 * 2, p5 or 1);
			end;
		end);
	elseif p2 == "mouseup" then
		v1[#v1 + 1] = p1.InputEnded:Connect(function(p7)
			local l__UserInputType__3 = p7.UserInputType;
			if l__UserInputType__3 == Enum.UserInputType.MouseButton1 or (l__UserInputType__3 == Enum.UserInputType.Touch and p7.UserInputState == Enum.UserInputState.End or p7.KeyCode == Enum.KeyCode.ButtonA) then
				u1.Sound.Play(p3, script, p4 * 2, p5 or 1);
			end;
		end);
	elseif p2 == "mouseenter" then
		v1[#v1 + 1] = p1.MouseEnter:Connect(function()
			u1.Sound.Play(p3, script, p4, p5 or 1);
		end);
	elseif p2 == "mouseleave" then
		v1[#v1 + 1] = p1.MouseLeave:Connect(function()
			u1.Sound.Play(p3, script, p4, p5 or 1);
		end);
	elseif p2 == "mouseclick" then
		v1[#v1 + 1] = p1.Activated:Connect(function()
			u1.Sound.Play(p3, script, p4, p5 or 1);
		end);
	end;
	return function()

			for v4, v5 in ipairs(v1) do
			if not v4 then
				break;
			end;
			v5:Disconnect();		
		end;
	end;
end;
