Trying to modify a record. Can't figure it out. Please Help

Trying to modify a record. Can't figure it out. Please Help

Hi all, apologies I know this must seem like a trivial request. I'm trying to create a Deluge script with virtually no knowledge. I've been at it for an hour and not getting anywhere. I know there has to be a simple way to do this. And I cannot spend any more time on it today as I'll get in trouble at work..
In my database I have a field called Credit_Used. It has a drop down option of "Yes" or "No". If the option is No, (which is the default option) then the user can input a numerical value of either 1.0 or 0.5 in the next field called Credit1 for the purposes of scripting.
What I would like is simple. When a user modifys the credit Credit_Used field to Yes I would like the Credit1 field to update itself to "0" or Zero automatically.
I tried
if input.Credit_Used == "Yes" ...................
but thats as far as I can get! I've tried dragging the deluge scripts in there but keep getting errors.
I would like it to read something like ....
if input.Credit_Used == "Yes" then Credit1 == "0"

Is there an easy way to do this?
Do I have to fetch records and then modify them? I got lost there...
Cheers for any help!
Best,
kenimc