Custom Attribute that has a limit of 0 to 1?

Is there a way to make a custom Attribute that has a limit of 0 to 1?

Just like how Transparency has a value limit of 0 to 1

Not directly, just check that it’s between 0 or 1 whenever you assign it from a script.