If you're looking to change the global system volume, you can use the "{STATE_SYSVOL}" token to get the current level:
Begin Text Compare : [{STATE_SYSVOL}] Equals '20'
Set system audio volume to [50]
Else
Set system audio volume to [20]
End Condition
This will toggle between the two states.
Note that this checks the exact value, which is why it checks for 20; If the volume is not currently 20, it will make it 20. I.E. it defaults to the lower setting to prevent going too loud.
You can also convert the token to an integer so you can use non-exact values(In case you're also adjusting the volume manually, so it wouldn't just be those two values):
Set integer [STATE_SYSVOL] value to the converted value of {STATE_SYSVOL}
Begin Integer Compare : [STATE_SYSVOL] Is Greater Than 35
Set system audio volume to [20]
Else
Set system audio volume to [50]
End Condition