Set antialiasing in game

In-game properties I have anti-aliasing for 3D set to always but I want to make a checkbox ingame so you can disable anti-aliasing is there any way to do that?