D6 dice pool from 0 to 6 where resolving 0 is rolling 2 dice and counting the lower result only. Rolling 5 or 6 means a hit. Rolling 1 is a mishap. Degrees of Success:

 - Failure: no hits at all  
 - Mixed Success: only 1 hit 
 - Basic Success: at least 2 hits
 - Critical Success: at least 2 dice showing "6" 
 
For this time rolling more than 2 hits will not count so no need to show that on anydice.  

Now the players can take a risk and push the roll, rerolling all the dice that are not "1" or "hit" (5-6). The requirement is to have at least 1 hit in the initial roll. After the reroll, hits may increase for a better overall result; or if they scored no hits with the reroll, they lose a hit from the initial roll which can make the overall result worse. I need to see that just like in games like Vaesen where a chart shows the chance of success scaling with the number of dice but also the chance when pushing the roll.  

I tried to do something but couldn't do well unfortunately.

<pre><code>
function: push ROLL:s {
 H:0 \number of hits\
 C:0 \number of crits\
 loop X over {1..#ROLL} {
  if X@ROLL>4 {H:H+1 if X@ROLL=6 {C:C+1}}
 }
 result: C*10+H \to send both crit and hit numbers?\
}

function: make ROLL:s TBP:n {
 H:0 \number of hits\
 M:0 \number of mishaps\
 B:0 \number of blanks\
 C:0 \number of crits\
 loop X over {1..#ROLL} {
  if X@ROLL>4 {H:H+1 if X@ROLL=6 {C:C+1}}
  else if X@ROLL>1 {B:B+1}
  else if X@ROLL=1 {M:M+1}
 }
 if TBP=1 {
  T:[push Bd6]
  C:C+(T/10)
  H:H+(T-((T/10)*10))
 }
 
 if H>2 {H:2}
 if C>1 {result:3}
 else {result:H}
}
</code></pre>
Then when I try to output it introduces this error;  
### Calculation error ###
Boolean values can only be numbers, but you provided "d{0..0}".
Depending on what you want, you might need to create a function.  

Any help would be appreciated. I feel like there is a better way but I can't see it apparently.