How to define a radius

I have a cool grenade but I don't know how to add damage. Someone told me to define a radius and subtract damage for the further away you are from the center of the radius, and I don't know how to do that and he hasn't emialed me in a while. If you could show me how to script that, that would be amazing!

This script will cause an "explosion" to happen after 3 seconds. It will check nearby objects with a collider that is included in the damage layers and use an adjustable damage falloff curve to apply damage based on distance. Finally it applies the damage by calling OnDamage on each object that is supposed to receive damage. This code doesn't account for explosion physics forces, it just subtracts health given a script that handles OnDamage is present on the objects with the colliders. I tested it and it seems to work properly.

using UnityEngine;
using System.Collections;

public class Explosive : MonoBehaviour
{
    const float defaultDistance = 10;
    const float defaultDamage = 100;

    public LayerMask damageLayers = -1;
    public AnimationCurve damageFalloff = AnimationCurve.EaseInOut(0, defaultDamage, defaultDistance, 0);

    void SendDamage(Transform target)
    {
        float distance = Vector3.Distance(target.position, transform.position);
        float damage = damageFalloff.Evaluate(distance);
        target.SendMessage("OnDamage", damage, SendMessageOptions.DontRequireReceiver);
    }

    void Explode()
    {
        var radius = damageFalloff.keys[damageFalloff.length - 1].time;
        var overlaps = Physics.OverlapSphere(transform.position, radius, damageLayers);
        foreach (var item in overlaps)
        {
            SendDamage(item.transform);
        }
        Destroy(gameObject);
    }

    void Start()
    {
        Invoke("Explode", 3);
    }
}

`Physics.SphereCast()`. You should really check out the FPS Tutorial. They have a grenade there too. Also to knock everything near it back you should try `rigidbody.AddExplosiveForce()`