You also are not using parameter correctly and you haven’t closed all of the parentheses. Also, in the likely case that there is more than one pid for smbd, you aren’t concatenating the results correctly. You’d need to build a script to kill each pid individually.
createfile until EOF
#/bin/sh
{concatenation "%0a" of ("kill " & it ) of pids of processes whose (name of it = "smbd")}
EOF
move __createfile kill-smb.sh
waithidden /bin/sh -c kill-smb.sh