-- Decompiled with the Synapse X Luau decompiler.

local l__Players__1 = game:GetService("Players");
local l__ReplicatedStorage__2 = game:GetService("ReplicatedStorage");
local l__RunService__3 = game:GetService("RunService");
local l__Assets__4 = l__ReplicatedStorage__2.Assets;
local v5 = _G.require("Math");
local v6 = l__RunService__3:IsClient();
local v7 = {};
local u1 = _G.require("Spring");
local u2 = {
	__index = v7
};
function v7.new()
	local v8 = {
		distance = 0, 
		camera = workspace.Camera, 
		springs = {}, 
		offStateConnections = {}, 
		onStateConnections = {}, 
		active = false
	};
	v8.springs.sway = u1.new((Vector3.new()));
	v8.springs.sway.s = 24;
	v8.springs.sway.d = 0.8;
	v8.springs.bobbing = u1.new((Vector3.new()));
	v8.springs.bobbing.s = 24;
	v8.springs.bobbing.d = 0.9;
	v8.springs.impact = u1.new((Vector3.new()));
	v8.springs.impact.s = 10;
	v8.springs.impact.d = 0.7;
	function v8.getBreathing(p1)
		local v9 = os.clock() * 6;
		local v10 = 2 * (1.2 - p1);
		return CFrame.new(math.cos(v9 / 8) * v10 / 128, -math.sin(v9 / 4) * v10 / 128, math.sin(v9 / 16) * v10 / 64);
	end;
	return setmetatable(v8, u2);
end;
local u3 = _G.require("Player");
local u4 = { "Jumping", "PlatformStanding", "Ragdoll", "Seated", "FallingDown", "FreeFalling", "GettingUp", "Swimming", "Climbing" };
local u5 = { "Running" };
function v7.reset(p2)
	task.spawn(function()
		while true do
			l__RunService__3.RenderStepped:Wait();
			if u3.character then
				break;
			end;		
		end;
		for v11, v12 in pairs(u4) do
			table.insert(p2.offStateConnections, u3.humanoid[v12]:Connect(function()
				p2.active = false;
			end));
		end;
		for v13, v14 in pairs(u5) do
			table.insert(p2.onStateConnections, u3.humanoid[v14]:Connect(function(p3)
				p2.active = p3 > 1;
			end));
		end;
		p2.viewmodel = nil;
		p2.animations = {};
		for v15, v16 in pairs(p2.camera:GetChildren()) do
			if not (not v16:IsA("Model")) and v16.Name == "Viewmodel" or v16.Name == "BodyViewmodel" then
				v16:Destroy();
			end;
		end;
		p2.viewmodel = l__ReplicatedStorage__2.Assets.Framework.Viewmodel:Clone();
		p2.viewmodel.PrimaryPart = p2.viewmodel:FindFirstChild("ViewmodelRootPart");
		p2.viewmodel.PrimaryPart.Anchored = true;
		p2.bodyViewmodel = l__ReplicatedStorage__2.Assets.Framework.BodyViewmodel:Clone();
		p2.bodyViewmodel.PrimaryPart = p2.bodyViewmodel:FindFirstChild("ViewmodelRootPart");
		p2.bodyViewmodel.PrimaryPart.Anchored = true;
		for v17, v18 in pairs(p2.bodyViewmodel:GetDescendants()) do
			if v18:IsA("BasePart") then
				v18.CollisionGroup = "Viewmodel";
				v18.CastShadow = false;
			end;
		end;
		for v19, v20 in pairs(p2.viewmodel:GetDescendants()) do
			if v20:IsA("BasePart") then
				v20.CollisionGroup = "Viewmodel";
				v20.CastShadow = false;
			end;
		end;
		p2.viewmodel.Parent = p2.camera;
		p2.bodyViewmodel.Parent = p2.camera;
		local l__Animator__6 = p2.viewmodel.Humanoid:WaitForChild("Animator", 0.5);
		local l__Animator__7 = p2.bodyViewmodel.Humanoid:WaitForChild("Animator", 0.5);
		u3.humanoid.Animator.AnimationPlayed:Connect(function(p4)
			if not p2.animations[p4] then
				p2.animations[p4] = { l__Animator__6:LoadAnimation(p4.Animation), l__Animator__7:LoadAnimation(p4.Animation) };
			end;
		end);
	end);
end;
local l__UserInputService__8 = game:GetService("UserInputService");
function v7.update(p5, p6, p7)
	if p5.camera and p5.viewmodel then
		local v21 = l__UserInputService__8:GetMouseDelta();
		local v22 = u3.firstPerson() and (u3.alive and (u3.ragdolled and not u3.ragdolled.Value));
		local l__FakeCamera__23 = p5.viewmodel:FindFirstChild("FakeCamera");
		if l__FakeCamera__23 then
			local v24 = l__FakeCamera__23.CFrame:ToObjectSpace(p5.viewmodel.PrimaryPart.CFrame);
			if p5.oldCamCF then
				local v25, v26, v27 = v24:ToOrientation();
				local v28, v29, v30 = v24:ToObjectSpace(p5.oldCamCF):ToEulerAnglesXYZ();
				p5.camera.CFrame = p5.camera.CFrame * CFrame.Angles(v28, v29, -v27);
				p5.viewmodel.PrimaryPart.CFrame = p5.viewmodel.PrimaryPart.CFrame * CFrame.Angles(-v28, -v29, v27);
			end;
			p5.oldCamCF = v24;
		end;
		local v31, v32, v33 = pairs(p5.animations);
		while true do
			local v34, v35 = v31(v32, v33);
			if not v34 then
				break;
			end;
			if v34.IsPlaying ~= v35[1].IsPlaying then
				if v34.IsPlaying then
					for v36, v37 in pairs(v35) do
						v37:Play();
					end;
				else
					for v38, v39 in pairs(v35) do
						v39:Stop();
					end;
				end;
			end;
			for v40, v41 in pairs(v35) do
				v41.TimePosition = v34.TimePosition;
				v41:AdjustWeight(v34.WeightCurrent, 0);
				v41:AdjustSpeed(v34.Speed);
			end;		
		end;
		if v22 then
			for v42, v43 in pairs(p5.viewmodel:GetChildren()) do
				if v43:IsA("BasePart") then
					local v44 = u3.character:FindFirstChild(v43.Name);
					if v44 and v44:IsA("BasePart") then
						p5.bodyViewmodel:FindFirstChild(v43.Name).Color = v44.Color;
						v43.Color = v44.Color;
					end;
				end;
			end;
			for v45, v46 in pairs(u3.character:GetChildren()) do
				if v46:IsA("Clothing") and not p5.viewmodel:FindFirstChildOfClass(v46.ClassName) then
					local v47 = v46:Clone();
					v47.Parent = p5.viewmodel;
					v47:Clone().Parent = p5.bodyViewmodel;
				end;
			end;
			local l__p__48 = u3.springs.aim.p;
			local l__p__49 = p5.springs.sway.p;
			local l__p__50 = p5.springs.bobbing.p;
			local l__p__51 = p5.springs.vmPosRecoil.p;
			local l__p__52 = p5.springs.vmRotRecoil.p;
			local v53 = 2.1;
			local v54 = 0.25;
			if l__p__48 > 0.9 then
				v53 = 2;
				v54 = 0.07;
			end;
			local v55 = Vector3.new(math.sin(tick() * 7 * v53) * v54, math.sin(tick() * 4 * v53) * v54, math.sin(tick() * 4 * v53) * v54);
			local v56 = CFrame.new();
			local v57 = CFrame.new(p5.camera.CFrame.Position, p5.camera.CFrame.Position + u3.torso.CFrame.lookVector);
			local v58 = u3.character:FindFirstChildOfClass("Tool") and p5.camera.CFrame or v57;
			local v59 = CFrame.new(0, 0, 1) * p7;
			local l__toolModel__60 = p5.viewmodel:FindFirstChild("toolModel");
			if l__toolModel__60 then
				local l__Attachments__61 = l__toolModel__60:FindFirstChild("Attachments");
				local v62 = l__Attachments__61 and l__Attachments__61:FindFirstChild("Sight");
				local v63 = v62 and v62:FindFirstChild("AimPart") or l__toolModel__60:FindFirstChild("AimPart");
				if v63 then
					p5.aimPoint = (p5.aimPoint or CFrame.new()):Lerp((p5.viewmodel.HumanoidRootPart.CFrame * CFrame.new(0, 1.5, 0)):ToObjectSpace(v63.CFrame * v59):Inverse(), 0.5);
					v56 = v56 * v56:Lerp(p5.aimPoint, l__p__48);
				end;
			end;
			local l__Velocity__64 = u3.humanoidRootPart.Velocity;
			if p5.active then
				p5.springs.bobbing:Impulse(v55 / 25 * p6 * 60 * Vector3.new(l__Velocity__64.X, 0, l__Velocity__64.Z).magnitude);
			end;
			p5.springs.impact:Impulse(l__Velocity__64);
			p5.springs.sway:Impulse((Vector3.new(-v21.Y / 200, -v21.X / 200, v21.X / 250)));
			p5.viewmodel:SetPrimaryPartCFrame(v58:ToWorldSpace(v59));
			p5.viewmodel.PrimaryPart.CFrame = p5.viewmodel.PrimaryPart.CFrame * CFrame.Angles(p5.springs.impact.p.Y * 0.004, 0, 0);
			p5.viewmodel.PrimaryPart.CFrame = p5.viewmodel.PrimaryPart.CFrame * CFrame.Angles(l__p__50.X, l__p__50.Y, 0);
			p5.viewmodel.PrimaryPart.CFrame = p5.viewmodel.PrimaryPart.CFrame * CFrame.new(l__p__51.X, l__p__51.Y, l__p__51.Z);
			p5.viewmodel.PrimaryPart.CFrame = p5.viewmodel.PrimaryPart.CFrame * CFrame.Angles(l__p__49.X, l__p__49.Y, l__p__49.Z);
			p5.viewmodel.PrimaryPart.CFrame = p5.viewmodel.PrimaryPart.CFrame * CFrame.Angles(l__p__52.X, l__p__52.Y, l__p__52.Z);
			p5.viewmodel.PrimaryPart.CFrame = p5.viewmodel.PrimaryPart.CFrame * p5.getBreathing(l__p__48);
			p5.viewmodel.PrimaryPart.CFrame = p5.viewmodel.PrimaryPart.CFrame * v56:Lerp(u3.equipOffset, 1 - u3.springs.equip.p);
			p5.bodyViewmodel:SetPrimaryPartCFrame(v57 * CFrame.new(0, 0, 1.25));
			return;
		else
			p5.bodyViewmodel:SetPrimaryPartCFrame(CFrame.new(0, -100, 0));
			p5.viewmodel:SetPrimaryPartCFrame(CFrame.new(0, -100, 0));
		end;
	end;
end;
return v7;

make some value names more clean and do nothing else (this is roblox lua module script)