Green’s Dictionary of Slang

nut role n.

[nut n.2 (1) + SE role]

(US black) a pretence of insanity or stupidity, usu. to avoid something.

[US]H.E. Roberts Third Ear n.p.: nut role n. dissembling or acting crazy for a purpose; e.g. I played the nut role on him and got my way.

In phrases

play the nut role (v.) (US black)

1. to pose as a shambling incompetent in order to swindle or otherwise trick a possible victim.

[US]R. Klein Jailhouse Jargon and Street Sl. [unpub. ms.].

2. to pretend to madness.

[US]Bentley & Corbett Prison Sl. 50: Nut Role [...] A person plays a nut role in certain situations to gain an advantage or achieve a specific goal.
West’s Federal Supplement First Series 872: I had to play the nut role or they would have sent me to prison.
W.A. Heisler Santa’s Little Helpers 33: Just play the nut role. Works every time. Six months in the hospital and I’m free as a bird.