Female Health

Does anyone have a script for female spawning with 100 health instead of 75 when they are not dead etc. that actually works and where to put it? Ive seen alot of post about it, but got more and more confused.

AddEventHandler(“playerSpawned”, function()
local ped = GetPlayerPed(-1)
if GetPedMaxHealth(ped) ~= 200 and not IsEntityDead(ped) then
SetPedMaxHealth(ped, 200)
SetEntityHealth(ped, GetEntityHealth(ped) + 25)
end
end)

Try this