Deluge script execution on new lead creation

Deluge script execution on new lead creation

I need to create a Deluge function that executes on addition of a new lead.

I need the function to inspect two fields from the lead record and set a value in a third field.

How do I go about accomplishing this?