How to create serverside logic in a single player game?

Thanks mate this is perfect .