-- Decompiled with the Synapse X Luau decompiler.


local l__Players__1 = game:GetService("Players");
local u1 = {
	Climbing = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3", 
		Looped = true
	}, 
	Died = {
		SoundId = "rbxasset://sounds/uuhhh.mp3"
	}, 
	FreeFalling = {
		SoundId = "rbxasset://sounds/action_falling.mp3", 
		Looped = true
	}, 
	GettingUp = {
		SoundId = "rbxasset://sounds/action_get_up.mp3"
	}, 
	Jumping = {
		SoundId = "rbxasset://sounds/action_jump.mp3"
	}, 
	Landing = {
		SoundId = "rbxasset://sounds/action_jump_land.mp3"
	}, 
	Running = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3", 
		Looped = true, 
		Pitch = 1.85
	}, 
	Splash = {
		SoundId = "rbxasset://sounds/impact_water.mp3"
	}, 
	Swimming = {
		SoundId = "rbxasset://sounds/action_swim.mp3", 
		Looped = true, 
		Pitch = 1.6
	}
};
local l__RunService__2 = game:GetService("RunService");
local function u3(...)
	local u4 = { ... };
	local u5 = Instance.new("BindableEvent");
	local function v2(...)
		for v3 = 1, #u4 do
			u4[v3]:Disconnect();
		end;
		return u5:Fire(...);
	end;
	for v4 = 1, #u4 do
		u4[v4] = u4[v4]:Connect(v2);
	end;
	return u5.Event:Wait();
end;
local function u6(p1, p2, p3)
	local v5 = {};
	for v6, v7 in pairs(u1) do
		local v8 = Instance.new("Sound");
		v8.Name = v6;
		v8.Archivable = false;
		v8.EmitterSize = 5;
		v8.MaxDistance = 150;
		v8.Volume = 0.65;
		for v9, v10 in pairs(v7) do
			v8[v9] = v10;
		end;
		v8.Parent = p3;
		v5[v6] = v8;
	end;
	local u7 = {};
	local v11 = {
		[Enum.HumanoidStateType.FallingDown] = function()
			local v12 = {};
			for v13, v14 in pairs(u7) do
				v12[v13] = v14;
			end;
			for v15 in pairs(v12) do
				if v15 ~= nil then
					v15.Playing = false;
					u7[v15] = nil;
				end;
			end;
		end
	};
	v11[Enum.HumanoidStateType.GettingUp] = function()
		local v16 = {};
		for v17, v18 in pairs(u7) do
			v16[v17] = v18;
		end;
		for v19 in pairs(v16) do
			if v19 ~= nil then
				v19.Playing = false;
				u7[v19] = nil;
			end;
		end;
		local l__GettingUp__20 = v5.GettingUp;
		l__GettingUp__20.TimePosition = 0;
		l__GettingUp__20.Playing = true;
	end;
	v11[Enum.HumanoidStateType.Jumping] = function()
		local v21 = {};
		for v22, v23 in pairs(u7) do
			v21[v22] = v23;
		end;
		for v24 in pairs(v21) do
			if v24 ~= nil then
				v24.Playing = false;
				u7[v24] = nil;
			end;
		end;
		local l__Jumping__25 = v5.Jumping;
		l__Jumping__25.TimePosition = 0;
		l__Jumping__25.Playing = true;
	end;
	v11[Enum.HumanoidStateType.Swimming] = function()
		local v26 = math.abs(p3.Velocity.Y);
		if v26 > 0.1 then
			v5.Splash.Volume = math.clamp((v26 - 100) * 0.72 / 250 + 0.28, 0, 1);
			local l__Splash__27 = v5.Splash;
			l__Splash__27.TimePosition = 0;
			l__Splash__27.Playing = true;
		end;
		local l__Swimming__28 = v5.Swimming;
		local v29 = {};
		for v30, v31 in pairs(u7) do
			v29[v30] = v31;
		end;
		for v32 in pairs(v29) do
			if v32 ~= l__Swimming__28 then
				v32.Playing = false;
				u7[v32] = nil;
			end;
		end;
		v5.Swimming.Playing = true;
		u7[v5.Swimming] = true;
	end;
	v11[Enum.HumanoidStateType.Freefall] = function()
		v5.FreeFalling.Volume = 0;
		local l__FreeFalling__33 = v5.FreeFalling;
		local v34 = {};
		for v35, v36 in pairs(u7) do
			v34[v35] = v36;
		end;
		for v37 in pairs(v34) do
			if v37 ~= l__FreeFalling__33 then
				v37.Playing = false;
				u7[v37] = nil;
			end;
		end;
		u7[v5.FreeFalling] = true;
	end;
	v11[Enum.HumanoidStateType.Landed] = function()
		local v38 = {};
		for v39, v40 in pairs(u7) do
			v38[v39] = v40;
		end;
		for v41 in pairs(v38) do
			if v41 ~= nil then
				v41.Playing = false;
				u7[v41] = nil;
			end;
		end;
		local v42 = math.abs(p3.Velocity.Y);
		if v42 > 75 then
			v5.Landing.Volume = math.clamp((v42 - 50) * 1 / 50 + 0, 0, 1);
			local l__Landing__43 = v5.Landing;
			l__Landing__43.TimePosition = 0;
			l__Landing__43.Playing = true;
		end;
	end;
	v11[Enum.HumanoidStateType.Running] = function()
		local l__Running__44 = v5.Running;
		local v45 = {};
		for v46, v47 in pairs(u7) do
			v45[v46] = v47;
		end;
		for v48 in pairs(v45) do
			if v48 ~= l__Running__44 then
				v48.Playing = false;
				u7[v48] = nil;
			end;
		end;
		v5.Running.Playing = true;
		u7[v5.Running] = true;
	end;
	v11[Enum.HumanoidStateType.Climbing] = function()
		local l__Climbing__49 = v5.Climbing;
		if math.abs(p3.Velocity.Y) > 0.1 then
			l__Climbing__49.Playing = true;
			local v50 = {};
			for v51, v52 in pairs(u7) do
				v50[v51] = v52;
			end;
			for v53 in pairs(v50) do
				if v53 ~= l__Climbing__49 then
					v53.Playing = false;
					u7[v53] = nil;
				end;
			end;
		else
			local v54 = {};
			for v55, v56 in pairs(u7) do
				v54[v55] = v56;
			end;
			for v57 in pairs(v54) do
				if v57 ~= nil then
					v57.Playing = false;
					u7[v57] = nil;
				end;
			end;
		end;
		u7[l__Climbing__49] = true;
	end;
	v11[Enum.HumanoidStateType.Seated] = function()
		local v58 = {};
		for v59, v60 in pairs(u7) do
			v58[v59] = v60;
		end;
		for v61 in pairs(v58) do
			if v61 ~= nil then
				v61.Playing = false;
				u7[v61] = nil;
			end;
		end;
	end;
	v11[Enum.HumanoidStateType.Dead] = function()
		local v62 = {};
		for v63, v64 in pairs(u7) do
			v62[v63] = v64;
		end;
		for v65 in pairs(v62) do
			if v65 ~= nil then
				v65.Playing = false;
				u7[v65] = nil;
			end;
		end;
		local l__Died__66 = v5.Died;
		l__Died__66.TimePosition = 0;
		l__Died__66.Playing = true;
	end;
	local v67 = {
		[v5.Climbing] = function(p4, p5, p6)
			p5.Playing = p6.Magnitude > 0.1;
		end, 
		[v5.FreeFalling] = function(p7, p8, p9)
			if not (p9.Magnitude > 75) then
				p8.Volume = 0;
				return;
			end;
			p8.Volume = math.clamp(p8.Volume + 0.9 * p7, 0, 1);
		end
	};
	v67[v5.Running] = function(p10, p11, p12)
		local v68 = false;
		if p12.Magnitude > 0.5 then
			v68 = p2.MoveDirection.Magnitude > 0.5;
		end;
		p11.Playing = v68;
	end;
	local v69 = {
		[Enum.HumanoidStateType.RunningNoPhysics] = Enum.HumanoidStateType.Running
	};
	local v70 = {};
	local u8 = v69[p2:GetState()] or p2:GetState();
	local u9 = p2.StateChanged:Connect(function(p13, p14)
		p14 = v69[p14] and p14;
		if p14 ~= u8 then
			local v71 = v11[p14];
			if v71 then
				v71();
			end;
			u8 = p14;
		end;
	end);
	local u10 = l__RunService__2.Stepped:Connect(function(p15, p16)
		for v72 in pairs(u7) do
			local v73 = v67[v72];
			if v73 then
				v73(p16, v72, p3.Velocity);
			end;
		end;
	end);
	local u11 = nil;
	local u12 = nil;
	local u13 = nil;
	u11 = p2.AncestryChanged:Connect(function(p17, p18)
		if not p18 then
			u9:Disconnect();
			u10:Disconnect();
			u11:Disconnect();
			u12:Disconnect();
			u13:Disconnect();
		end;
	end);
	u12 = p3.AncestryChanged:Connect(function(p19, p20)
		if not p20 then
			u9:Disconnect();
			u10:Disconnect();
			u11:Disconnect();
			u12:Disconnect();
			u13:Disconnect();
		end;
	end);
	u13 = p1.CharacterAdded:Connect(function()
		u9:Disconnect();
		u10:Disconnect();
		u11:Disconnect();
		u12:Disconnect();
		u13:Disconnect();
	end);
end;
l__Players__1.PlayerAdded:Connect(function(p21)
	local function v74(p22)
		if not p22.Parent then
			u3(p22.AncestryChanged, p21.CharacterAdded);
		end;
		if p21.Character ~= p22 or not p22.Parent then
			return;
		end;
		local v75 = p22:FindFirstChildOfClass("Humanoid");
		while p22:IsDescendantOf(game) and not v75 do
			u3(p22.ChildAdded, p22.AncestryChanged, p21.CharacterAdded);
			v75 = p22:FindFirstChildOfClass("Humanoid");		
		end;
		if p21.Character ~= p22 or not p22:IsDescendantOf(game) then
			return;
		end;
		local v76 = p22:FindFirstChild("HumanoidRootPart");
		while p22:IsDescendantOf(game) and not v76 do
			u3(p22.ChildAdded, p22.AncestryChanged, v75.AncestryChanged, p21.CharacterAdded);
			v76 = p22:FindFirstChild("HumanoidRootPart");		
		end;
		if v76 and v75:IsDescendantOf(game) and p22:IsDescendantOf(game) and p21.Character == p22 then
			u6(p21, v75, v76);
		end;
	end;
	if p21.Character then
		v74(p21.Character);
	end;
	p21.CharacterAdded:Connect(v74);
end);
local v77, v78, v79 = ipairs(l__Players__1:GetPlayers());
while true do
	v77(v78, v79);
	if not v77 then
		break;
	end;
	v79 = v77;
	local function v80(p23)
		if not p23.Parent then
			u3(p23.AncestryChanged, v78.CharacterAdded);
		end;
		if v78.Character ~= p23 or not p23.Parent then
			return;
		end;
		local v81 = p23:FindFirstChildOfClass("Humanoid");
		while p23:IsDescendantOf(game) and not v81 do
			u3(p23.ChildAdded, p23.AncestryChanged, v78.CharacterAdded);
			v81 = p23:FindFirstChildOfClass("Humanoid");		
		end;
		if v78.Character ~= p23 or not p23:IsDescendantOf(game) then
			return;
		end;
		local v82 = p23:FindFirstChild("HumanoidRootPart");
		while p23:IsDescendantOf(game) and not v82 do
			u3(p23.ChildAdded, p23.AncestryChanged, v81.AncestryChanged, v78.CharacterAdded);
			v82 = p23:FindFirstChild("HumanoidRootPart");		
		end;
		if v82 and v81:IsDescendantOf(game) and p23:IsDescendantOf(game) and v78.Character == p23 then
			u6(v78, v81, v82);
		end;
	end;
	if v78.Character then
		v80(v78.Character);
	end;
	v78.CharacterAdded:Connect(v80);
end;

