wait()local t=0 for i,o in pairs(root:GetConnectedParts(true))do t=t+o:GetMass()end local i=Instance.new("\086\101\099\116\111\114\070\111\114\099\101",root)i.Name="\071\114\097\118\105\116\121"i.Attachment0=root.RootRigAttachment i.RelativeTo=Enum.ActuatorRelativeTo.World i.ApplyAtCenterOfMass=true i.Force=(196.2*t)*Vector3.new(0,-1,0)humanoid.StateChanged:Connect(function(t,o)if o==Enum.HumanoidStateType.Dead or o==Enum.HumanoidStateType.Physics then i.Enabled=false else i.Enabled=true end end)

wait()

local mass = 0
for _,v in pairs(root:GetConnectedParts(true)) do
	mass = mass + v:GetMass()
end

local vectorForce = Instance.new("VectorForce", root)
vectorForce.Name = "Gravity"
vectorForce.Attachment0 = root.RootRigAttachment
vectorForce.RelativeTo = Enum.ActuatorRelativeTo.World
vectorForce.ApplyAtCenterOfMass = true
vectorForce.Force = 196.2*mass*Vector3.new(0,-1,0)

humanoid.StateChanged:Connect(function(old, new)
	if new == Enum.HumanoidStateType.Dead or new == Enum.HumanoidStateType.Physics then
		vectorForce.Enabled = false
	else
		vectorForce.Enabled = true
	end
end)
