Your best odds here would be to buy something akin to an airsoft gun that looks like the real thing. Call the cops on yourself pretending to be your neighbor, claiming shit like "i think i heard a gunshot from my neighbor's apartment". Wear a white shirt and pour something red on it to make it look like you're covered in blood. When they show up they'll be on edge, and the only way you can probably pull this off is by very quickly pulling out the fake gun and aiming at them so they have little time to react. Even then you run the risk of getting tasered. In this given scenario they have more interest in neutralizing a threat that seems to have already killed someone, not just disarm you and put you in cuffs.
Now, if you fail this, I'm not actually sure what the consequences would be. Because you don't actually have a real gun so there was no real threat. If you run at them with a knife, that's a real threat. And you didn't actually hurt anyone and the blood was fake. You'd probably get a short sentence into a really long sentence in the crazy house and a massive fine.
When a cop shoots you, at that point they're absolutely not trying to just disarm you. Cops are trained that, when they actually resort to using their firearm, they will mag dump their entire magazine into your center of mass. Since they come in pairs you can assume that you'll be leaded with like 20+ rounds.