The winner is the first to reach 50, 100 or 150 points (2, 3 or 4 player game). What's a challenge? A Wild Draw Four card can be "legally" played only if the player holds no other cards of the current colour. If the player is challenged and has played the card illegally, they must pick up four cards. If the challenge fails then the challenger must pick up the four cards in addition to two penalty cards.
Me and some friends coded this. They don't have scratch accounts (they coded offline) so I can't mention them but thanks to everyone who made this. This was probably the hardest thing I have had to code, so please like and fave if you like it. I would suggest playing against the AI as it is unlikely that there will be someone else online at the time