Suppose $k$ is an integral domain, $\Lambda$ is a commutative group, $k[\Lambda]$ is the corresponding group ring and $\text{Diag}(\Lambda) = \text{Spec}(k[\Lambda])$ is the diagonalizable group scheme. Prove that the character group $X(\text{Diag}(\Lambda))$ of $\text{Diag}(k[\Lambda])$ is isomorphic to $\Lambda$. Here $X(G) := \text{Hom}(G, G_m)$.
I got stuck on this problem, so I would really appreciate if anyone can give me any hint.
What I tried so far:
$X(\text{Spec}(k[\Lambda])) = \text{Hom}(\text{Spec}(k[\Lambda]), G_m) \cong \text{Hom}(k[X, 1/X], k[\Lambda])$.
Any $\varphi \in \text{Hom}(k[X, 1/X], k[\Lambda])$ can be identified with $\varphi(X) \in k[\Lambda]$. So it would be done if we can prove that $\varphi(X) \in \Lambda$. I guess the fact that $\varphi(X)$ must be invertible and $k$ is a domain should be used here, but I still can't prove it.