1. In a mixing bowl, combine melted butter, sugar, and cocoa powder. Add the beaten egg and vanilla extract, and mix well.
2. Stir in graham cracker crumbs, shredded coconut, and walnuts (if using). Press the mixture into an 8x8 inch baking pan. Chill in the refrigerator for 30 minutes.
3. For the custard layer, beat together softened butter, powdered sugar, custard powder, and milk until smooth. Spread over the chilled crust. Chill again for 30 minutes.
4. For the chocolate topping, melt semi-sweet chocolate and butter together in a saucepan over low heat. Spread over the custard layer. Chill until set.