EDIT 06/20/2023
As of the same date of this edit, Roblox has officially moved to ban simulated gambling by September 18th, 2023 (in 3 months), which means that all forms of gambling are no longer allowed on the platform. This contrasts the prior stance to which, as long as there was no Robux involved, it could be passable.
The advice in this post is no longer accurate. Please avoid sharing this as an answer. For more information, please see Updating our policy on simulated gambling in the thread Create Experiences for People 17 and Older on Roblox.
Gambling is permitted under the condition that it is impossible to purchase the currency used for it. The currency must be purely earnable by playing the game and completing tasks. All such games must also have an equal chance and a fair algorithm implemented so that the player is not rigged up to lose.
If Robux is involved in any step of the process, it is a violation of the rules and can result in punishment up to the loss of your account. Therefore, you should keep any gambling item separate from Robux-involved items.
If you want to play it very safe, use gambling tokens (a separate currency explicitly for gambling). These tokens can be earned by playing the game and only by playing the game. Such tokens can be one-way exchanged for game currency to buy other things but game currency cannot be used to purchase such tokens.