The film opens with a shot of a man swimming in a pool shaped like a hundred dollar bill. The man climbs out of the pool: it's Arthur Shaw (Alan Alda). Flash to Josh Kovacs (Ben Stiller) making coffee in his rundown Queens apartment. He is playing chess online. Back to Arthur Shaw - he's also playing chess online, presumably against Josh. Back to Josh. He is on his way to work, walking through a trashy neighborhood. A bunch of black gangsters are standing on the sidewalk, and one of them starts to heckle Josh. This is Slide (Eddie Murphy).
Josh takes the subway to work. He is the general manager of The Tower, an ultra fancy apartment complex. He goes outside to greet Mr. Shaw, and they banter as Josh reminds him of a potential guest conflict with Shaw's upcoming dinner party. Shaw says he is purchasing a hotel in St. Barts, and he wants to steal Josh to be general manager of that hotel. "And one more thing," he says, "Checkmate," referencing their online chess match.
Josh makes the rounds of The Tower. He chats with a receptionist who is studying for the bar exam and with a Jamaican maid named Odessa (Gabourey Sidibe) who says she needs to get married before her work visa expires. He also meets the new elevator operator Enrique (Michael Pena). Josh tells Enrique that The Tower is the most expensive real estate in Manhattan, and what the residents are really paying for is the staff and their services. They do anything and everything for the residents, and they never accept tips.
Josh also covers for the concierge Charlie (Casey Affleck), who is his brother-in-law. Charlie was at the hospital with Josh's sister who is about to have a baby. He is on thin ice at work, and he tries to prove his worth by giving flowers to Mrs. Jin for Chinese New Year.
Finally, the other building manager Mr. Simon (Judd Hirsch) tells Josh that he has to go evict Mr. Fitzhugh (Matthew Broderick) because the people from the bank are coming the next day to repossess the apartment. Josh goes to Mr. Fitzhugh's apartment and sees that it is empty inside, except for a few children's drawings and a tent. Mr. Fitzhugh says he has nothing, he worked for Merrill Lynch, and when the financial crisis hit he lost all his money, his car, and now even his wife and kids. Josh feels bad for him and says that he can stay a little longer because tomorrow the elevators will be "out of order," so the people from the bank won't be able to come up.
Back to Mr. Shaw. He is chatting with Enrique, asking him where he would get the fixings for the best possible burger. He likes Enrique's answers and he tells Josh to take him off probation, and make him a full-time employee.
As Josh is leaving work that night, he talks to the doorman Lester (Stephen Henderson). Lester is excited because he is finally about to retire.
The next morning on his way to work, Josh sees Slide again. He is being tossed out of some girl's apartment and she is screaming at him for cheating on her.
Back at the tower, Josh notices that a black sedan has been parked outside for two days now. He sees some men get out of the sedan and notices that one of them is wearing a gun. He starts calling for everyone to lock down The Tower because he thinks they're being robbed. Looking on the video monitors he notices that a white delivery van has pulled up, and Mr. Shaw is being hustled inside. He decides that Mr. Shaw is actually being kidnapped. He runs outside to chase after the delivery van. As he is running, someone clotheslines him. The female FBI agent who knocked him down yells at him to stay still - this is Agent Denham (Tea Leoni). FBI agents pull Shaw out of the van, and Agent Denham explains that he was not being kidnapped, he was attempting to flee. As Shaw is led away, he calls to Josh to turn off the heater and cover the pool, because he hates wasting money.
News reports indicate that Shaw has been charged with securities fraud, and all his assets are frozen. Josh meets with the employees of The Tower to assure them that Shaw is innocent, and they shouldn't panic. Shaw was on the board of The Tower, and Josh asked him to invest the pensions of all the employees. They ask how much of their money is left, and Josh says that the reporters say it's all gone, but the employees should be patient and stay positive. The employees heard that when Shaw was arrested he only had $600 on him, and they blame Josh for losing all their money.
Shaw is released on bail, but put under house arrest in his penthouse apartment of The Tower, with FBI officers standing guard. When Agent Denham brings him up to his apartment, she sees a '63 Ferrari driven by Steve McQueen in his living room. She says it will be sold at auction along with all Shaw's other belongings, but he says, "Only if I'm guilty. I'm not." He asks Josh to handle all his food so none of the other employees will spit in it, and offers Josh a tip. Josh says they don't accept tips.
In the elevator riding down, Denham asks Josh why he didn't talk back to Shaw after he stole from the employees. Josh says he is just doing his job as general manager. Josh watches as Agent Denham searches through the trash for evidence against Shaw. They argue about whether Shaw is guilty or not. Josh doesn't want to believe it.
Walking home, Josh sees Slide being arrested. Slide yells for Josh to call his friend Rita to post bail.
Cut to Lester, the doorman. Lester looks extremely upset. The train is pulling into the station, and he steps in front of it.
Cut to Josh at the hospital. Charlie is there, and he explains that Lester tried to jump in front of the train, but an off-duty cop pulled him back. Josh goes to talk to Lester, and Lester explains that not only did he lose his pension, he also gave his entire life savings to Shaw to invest a few months earlier. Josh says, "He will pay you back every penny, I promise."
Back at The Tower, Josh sees Mr. Fitzhugh carrying his last box of belongings down in the elevator. He is being evicted. Josh asks how long Mr. Shaw would have known that he was going to lose all his investors' money. Mr. Fitzhugh says that he knew for months, maybe even a year. But he kept accepting money from people like Lester to keep up appearances, to pay for his parties.
Josh is furious, and he goes up to the penthouse to confront Shaw. Enrique and Charlie follow him. Josh asks Shaw why he took Lester's money when he knew he would lose it. Shaw keeps defending himself, and he doesn't even ask if Lester is okay after his suicide attempt. Josh grabs a golf club and starts smashing the windshield of the '63 Ferrari while screaming at Shaw. When he is finished, Shaw says, "Aren't you forgetting something? My breakfast order."
Mr. Simon is pissed at Josh, and he fires Josh, Enrique, and Charlie on the spot, even though Josh tries to take all the blame. The employees gather in the lobby to watch them leave. Outside, Charlie is angry at Josh and says Josh always wanted to fire him anyway. Josh says that Charlie wasn't very good at his job. Charlie says, "What about how happy I made Mrs. Jin on Chinese New Year?" Josh says "Mrs. Jin is Korean."
Josh is drinking in a bar, and Agent Denham comes in to talk to him. Josh tries to give her Shaw's travel schedule and guest lists for evidence, but she says she already has all that. Also, when the bank confiscates all his belongings and sells them, the employees still won't get their money back, because they were Shaw's smallest account. She offers to get drunk with Josh to cheer him up, and tells him that she saw the tape of him beating the Ferrari, and it was "badass." Once they are both drunk, she confesses that the FBI haven't found Shaw's safety net. Shortly before his arrest he took $20 million out of the bank, and they haven't found it. She jokes that Josh should "storm the castle with pitchforks" to get back at Shaw.
Josh sneaks back into The Tower to get some of his old notebooks. He looks up some notes he took about Shaw. Then Josh finds Enrique, who is working at a fast food restaurant, Mr. Fitzhugh, who is staying at a crummy motel, and Charlie, who is working at a kiddie amusement park. He gathers them together to tell them his plan. He knows that Shaw bought a safe a few months earlier, and he thinks that he hid that safe in the wall in his apartment, (when Shaw remodeled, he changed everything except that wall). He wants to rob the safe. Enrique is interested, and he knows electrical engineering. Mr. Fitzhugh is interested too. Charlie doesn't want to get involved, and he says they don't know anything about stealing. Josh says he knows someone who does.
Josh bails Slide out of jail. As he drives him away from Rikers, he tries to make awkward smalltalk. Slide is suspicious and jams his foot down on the gas until Josh admits that he wants Slide to help him with a robbery. Slide is still suspicious, and Josh reveals that they used to go to daycare together. Slide says, "I remember you - you were Seizure Boy!" Josh tells Slide the score is $20 million, and Slide gets real interested.
Slide, Josh, Enrique, Mr. Fitzhugh, and Charlie meet in the mall food court. Slide is not impressed with his cohorts, and he demands that they leave their wallets on the table and go steal $50 worth of merchandise to prove their worth. Josh steals underwear and a scented candle from Victoria's Secret, Mr. Fitzhugh steals a sweater from the Gap by cutting out the security tag, Enrique gets sneakers, and Charlie spits a pair of earrings out of his mouth. Slide says, "Well I stole $264 in cash - rule #1, never give a thief your wallet!"
Slide takes them up on the roof of his building and leaves them outside with bobby pins to pick the lock. Then they go to Josh's apartment to study all the security they're going to have to bypass. Finally, they meet at the restaurant across from The Tower to study the FBI surveillance of Shaw's apartment. They suffer a setback when Enrique admits that his electrical engineering education was only online, and he accidentally buys ski hats instead of ski masks. Also, the team objects to Josh's plan of giving the money to Slide to hold because he has no connection to The Tower. Slide pulls out a gun, and Josh says no guns allowed during the robbery.
While they are planning, Agent Denham shows up at Josh's apartment with two cops. She says they don't have enough evidence against Shaw, and he is going to walk next week. Also, Shaw says he wants an apology from Josh or he will press charges for the attack on his car.
Denham takes Josh up to Shaw's apartment, where Shaw is playing chess alone. Shaw tells Josh about the most famous chess move of all time, 23 Queen G3 or "The Marshall Swindle," where the Queen is sacrificed for the win. Josh is supposed to apologize, so he says "I will find a way to make things right, to pay you back." Shaw taunts Josh by saying even if he can't be a manager anymore, maybe he can be a doorman. Also, he should go home and practice chess. Shaw says "Anyone can sacrifice a Queen. The trick is getting away with it."
As they leave, Agent Denham gives Josh a present, a tape of his attack on Shaw's Ferrari. Josh asks Denham to go for dinner with him on Saturday.
Back at the apartment, Slide says there is a problem. He can't open Shaw's safe - Slide never actually breaks into people's houses, he just steals the satellites off their balconies. Josh goes to Odessa instead, the Jamaican maid. Her father was a locksmith, and she says she can open the safe.
As the team continues surveillance of the tower, Josh sees Charlie going inside. When he comes out again, Charlie admits that Mr. Simon called him and offered him Josh's old job, and Charlie accepted. With the baby coming, he wants steady work, and he doesn't want to do the robbery. In fact, if he sees any of them near The Tower, he'll call the police and report them.
Meanwhile, Odessa is showing Slide how she's going to crack the safe. As she works, she flirts with him and asks him if he's married. Slide says no, and flirts back.
Agent Denham meets with Shaw and his lawyer. Shaw's appointment with the judge has been moved up. Shaw is going to get off and then press charges against Josh and the others. Denham calls Josh to tell him that he will be in jail by the weekend. Josh hangs up and tells the others, "It worked. We're good for Thanksgiving."
It's Thanksgiving, and Charlie is reading a motivational speech to his new employees. Enrique is riding the subway so he can swipe Charlie's wife's cellphone. Agent Denham is taking Shaw to the courthouse. The Macy's Thanksgiving Day Parade is in full swing in the street outside. The team is gathered in the restaurant across from The Tower, but Slide is missing. Josh sees him crossing the street, entering The Tower, and dressed in Josh's suit. Josh says that Slide learned how to open the safe from Odessa, and now he's gone rogue.
The team sends Charlie a fake text that his wife is having the baby, and he runs off to the hospital. The staff pours out of The Tower to see their favorite parade float, Snoopy. Security is distracted looking at French Playboy. Odessa brings in a fake birthday cake to occupy the remaining employees.
Slide is talking to Mr. Simon, pretending to be from the bank. He asks Mr. Simon to take him upstairs to view Mr. Fitzhugh's old apartment. The team is supposed to be taking the elevator at the same time, so they run up the stairs instead. Slide asks Mr. Simon to show him the closet, then locks Mr. Simon inside.
There's an FBI agent posted outside Shaw's penthouse. Odessa tries to feed him drugged cake, but he's allergic to chocolate and won't eat any, so she knocks him out with her cleaning cart instead. Meanwhile, Enrique sees Slide in the elevator and uses the manual controls to shut it down. Slide climbs out the top of the elevator and ascends a ladder to the penthouse instead.
Josh, Enrique, and Mr. Fitzhugh enter the penthouse. They use sledgehammers to bust open the wall and find the safe. Slide shows up and pulls a gun on them, telling them to get away from the safe. Odessa comes in behind him with her own gun and disarms him. She starts opening the safe.
Charlie comes back from the hospital. He has realized the text was fake, and something is going on.
At the courthouse, Agent Denham finds out the judge is on vacation, and she too realizes something is amok.
Odessa opens the safe and everybody gasps. It is empty. Slide is pissed, and he tries to grab his gun back from Mr. Fitzhugh. They struggle and the gun goes off, narrowly missing Josh's head and punching a hole in the hood of Shaw's '63 Ferrari. Josh walks over to the Ferrari. The paint has been chipped, and gold is showing through. He peels off more paint, and realizes that the entire car is made of solid gold. Mr. Fitzhugh estimates the car weighs 2000 lbs and is worth about $43 million.
The crew decides they should steal the car, but they don't know how to move it. Enrique goes up on the roof and sees a window-washing apparatus with pulley. He grabs the controls and lowers the window-washing platform outside the penthouse window.
Agent Denham and the other FBI officers are headed back to The Tower. She says, "Mr. Shaw, I think you're being robbed."
The crew uses the window-washing cable to hook the Ferrari and pull it out the window. The car is dangling from the roof, but everybody on the street below is watching the parade and no one looks up. The FBI officer is starting to wake up outside Shaw's apartment. The team is lowering the car to Mr. Fitzhugh's old apartment because the bank has removed the doors and they will be able to get the car out, but Mr. Fitzhugh is too scared to pull the car in the window.
The FBI agent starts banging on the door of Shaw's apartment. Slide is scared and wants to surrender, but Josh climbs out the window and starts sliding down the cable above the car. Slide follows him. Mr. Fitzhugh mans up and ties a rope to his leg so he can lean out and grab the car. The momentum of the swinging car pulls him out the window, and he dangles from the bottom of the car. Josh yells for him to grab the rope, which is hanging out the window. Mr. Fitzhugh tries, but he slips and falls. As he falls, Charlie appears to grab his hand and save him.
Agent Denham and the other officers are blocked by the parade.
Josh and Side rock the Ferrari so it swings nearer the window, and Charlie and Mr. Fitzhugh pull it inside. However, though the car will fit through the doorway, it won't fit in the elevator. They lower the elevator manually and put the car on top of the elevator instead. Right after they do this, Agent Denham, Shaw, and the other officers call for the elevator and get inside. They ride it all the way back to the penthouse with the car and the thieves on top of the elevator.
Josh calls Lester and asks him to get Slide's truck. Meanwhile, Agent Denham takes Shaw into his apartment, and they see the Ferrari is missing. She also notices the empty safe, which is a violation of Shaw's parole since he didn't disclose the existence of the safe. She arrests him to take him back to jail. Shaw is hollering about his Ferrari, and she looks at the video monitors and sees Lester speeding away in the truck. The FBI chases Lester through the parade and corner him. But when they open up the back of the truck, it's empty.
The FBI tracks down Mr. Fitzhugh, Charlie, Odessa, Enrique, and Josh. They are all taken to jail in the same van as Shaw. Shaw says "Where's my car?" He taunts them about being working stiffs. Josh says, "I found your ledger. I'm sacrificing my queen." Shaw is scared, and he offers them a deal for ten times the car's value. Enrique says, "Sorry, we don't accept tips." Josh says "Checkmate."
In the interrogation room, the receptionist who was studying for the bar exam shows up. She's a lawyer now, and she's representing the crew. She has the ledger, and she offers it to the FBI in exchange for the release of her clients. The FBI says they will let everyone go, but not Josh. Someone has to be convicted, and as a first time offender, he'll only get 2 years. Josh accepts.
Odessa, Slide, Mr. Fitzhugh, and Enrique meet on the roof of The Tower. They roll back the cover off the pool shaped like a $100 bill. The car was in the pool the whole time. Flash to Charlie at the hospital with his wife and new baby. Flash to Shaw being shown to "the penthouse," his maximum security jail cell. Flash to various Tower employees, all receiving packages from UPS. The employees open the packages, and each one has been sent a solid gold car part. They cheer and hug their families. Last of all is Lester, who holds up the gold steering wheel.
The final shot is Josh. He's standing in a jail cell, but he's smiling.
You can send in your spoiler to other movies by going here.