Can you show me the coding? I need something like this for my game.