You can use the tokenAt(text, index, seperator) expression to split up strings.
tokenAt("SetLives 10", 0, " ") = "SetLives"
and
tokenAt("SetLives 10", 1, " ") = "10"
So:
if tokenAt(input.Text, 0, " ") = "SetLives"
then set lives to int(tokenAt(input.Text, 1, " "))