Object Spin at start of level

I just an object that is in the level to spin at that start up of the level and continue till its picked up . What would be the code for that?

That would be pretty simple.

void Update()
    float degreesPerSecond = 30.0f;
    transform.localRotation = Quaternion.AngleAxis( degreesPerSecond * Time.time, Vector3.up );

Similar to Tetrads answer:

var degreesPerSecond : float = 30.0; 

function Update()
    transform.Rotate(Vector3.up * degreesPerSecond * Time.deltaTime, Space.Self);

Use Vector3.up/forward/right or define a custom Vector3 to change axis of rotation Space determines whether local or global rotation (other option is Space.World)