I dont know how to lua script but i need help

I have Dark Rp and can add jobs and stuff like that. I just want one thing that is if some one die i want him/her to turn back into a citizen again so that it would be like real life. Well i dont know how to do it and would really appreciate it if some one can script it for me or can put me on a starting line. I am new to this and i know that it is hard. Please any one that wont care doing it for me or at leaste help me make it just help me please and thank you.

Thank you

(User was banned for this post ("Wrong forum" - mahalis))

Offtopic: If you die,you’re DEAD. You won’t “come back as a citizen” in real life.
Ontopic: Insta-demote code copy-paste perphaps…?

hook.Add(“PlayerDeath”, “Citizen”, function(ply) ply:SetTeam(WHATEVER_CITIZEN_TEAM_IS) end)

So in other words this is a request thread.

Thank you one problem where do i put the coding

You could have had the result sooner if you added where do i put the code in the o.p