I see where you're coming from, but it's a flawed premise. Moral codes begin with individuals, who group to form societies, whose combined morality is used to form a societal moral code. Laws, for example.
then that puts them in a slightly better mood, which changes their day, the way they interact with ppl and thus changes their life?? its a hypothetical but i think its highly possible, in fact I've seen it happen. did that change your mind?