Interestingly, while it is illegal to buy a replica gun (unless you are in a re-enactment club, etc (as mentioned by Mince), it is not illegal to buy an air pistol (or perhaps a rifle) capable of firing up to .22 pellets and using a CO2 cartridge to power it (thereby enabling semi-automatic fire). Yet that pistol could look just like a real gun, even down to a silencer and laser marker. I, myself, have a legal air pistol (like JB's real gun) and a paintball pistol (firing 6mm paintballs or 6mm rubber balls. The latter pistol looks remarkably like a Glock, apart from an extended pistol grip housing the gas cartridge.
As you can see from this picture. The magazine holds 9 balls and is semi-automatic.
Needless to say that to carry either around in public (except in their cases) is against the law. Should one use one in public, one would be charged with having a replica gun (that is if the SWAT team haven't shot you first).
Mine stay firmly at home and are used in the garden at inanimate objects.