Killing Tux is not very difficult to do. You just have to set the script of the block to sector.Tux.kill(true). If you only want to hurt him sector.Tux.kill(false) works.
Setting the block to a badguy is a little more difficult, because you can't do it in the editor. You have to edit the level file in a text editor. You want to find the bonus block you want to change, and set contents to "custom" then add a new line with the badguy in. For example, for an Iceblock it should look something like this:
- {l Code}: {l Select All Code}
(bonusblock
(sprite "images/objects/bonus_block/bonusblock.sprite")
(x 189.3336639)
(y 384.616272)
(contents "custom")
(mriceblock)
)
If you have any more questions or need more help please ask me.