No voice chat when you're dead

hello I would like if you are DEAD that you cannot use voice chat can you help me

just write some code that checks if the player is dead, if its true than disable the speaking button ( which should be dynamic as people can change it)

if player == dead then
   disableSpeakingKey();
end

Tokovipe