CRM Workflow JavaScript

Trying to stop a rule from being accessible more than once so tried a rule similar to this however it doesn't seem to 
show the rule at any point.
var
LeadId = CRM.GetContextInfo("Opportunity","Oppo_LeadId"); if(LeadId == "2"){ Hidden = false; } else { Hidden = true; }

Leadid = 1 when the opportunity is first created and when the "Lead" rule is pressed, i have set leadid
to become 2 which should then stop the rule from showing up again, however it never seems to show...
Anyone have any ideas on this? Thanks!