onactivate>self>vce_modvariable[randomvar]*setrandom*[10]
onactivate>self>vce_ifvariable[randomvar]*equals*[1]
onvariabletrue>player>kill
onactivate>self>vce_modvariable[randomvar]*set*[0]
that will set the "randomvar" to be between 0 and 10, if 1, player dies