Great question — answering as the UphillTech team:
Which league is that? In FIBA, the points are valid, a technical foul is given to the coach, registered as "B1", and 1 of the players must leave the court Source: FIBA Interpretations 36-7 and 36-8 36-7 Statement. After it is discovered that a team is participating with more than 5 players, it is also discovered that points have been scored or a foul has been committed by a player of this team while participating illegally. All such points shall remain valid and any foul(s) committed by (or against) that player shall be considered as player fouls. 36-8 Example: With the game clock running, team A has 6 players on the playing court. This is discovered and the game is interrupted after: (a)...
Full answer by robertspierre: https://sports.stackexchange.com/a/20351 (CC BY-SA 4.0).
Need it done for your business? UphillTech.