Need help putting this script into lua

function SpawnedProp(ply, model, ent)
if (!ply:IsAdmin()) then
ent:SetHealth(200)
end
if ent:Health() = 0 then
ent:Remove()
end
end
hook.Add(“PlayerSpawnedProp”, “playerSpawnedProp”, SpawnedProp)

basically iam running darkrp and want to put this script into action but im not sure how and my techie is offline

thankyou