This is similar to a video poker game. It is based on the very common version of Poker known as Jacks or Better. If you have never played Poker, then the game will not make any sense to you. If you want to learn how to play Poker, then you can find the rules on-line.
In this game you place your bets with "gold coins". You begin the game with 100 coins in your stack, and you can keep playing until your stack goes down to zero, at which point you are BROKE. You can bet between 1 and 5 coins before each hand is dealt, and each additional coin increases the payback amount according to the chart.
This scene was made possible because of s_noonan's
Deck Of Cards . I used his basic design of the cards and the logic for shuffling and dealing the cards, but I had to add a ton of math and logic in order to make this a Poker game. I spent MANY hours over a two week period on this scene. I hope you like it.
The script is fairly complex so it may have a bug or two. Please let me know if it does something that you believe it should not do.
Thanks!
UPDATE: Fixed bug that prevented pair of Kings and pair of Aces from registering.
UPDATE: added a "hidden" card with texture of card faces. Hopefully this will cure the problem with some users not seeing the card faces.