Cookie Thread Act 1: A Cookie in Time

I hate you.

1 Like

Magnus to bear hatred in his heart???

No, magnus is a wolf.

1 Like

Correction:

Magnus is probably a wolf, but is definitely not a bear.

1 Like

I’m a what?

You’re a

part of my walls

1 Like

Exactly, wolves are kind individuals.

OH MY GOD I FORGOT ABOUT COOKIE THREADS
I LOVED THEM

3 Likes

im gonna be the 1000th poster btw and I fully expect a cookie in the mail, I prefer like the chewy choclate chip kind but oreos are great too, anything u can dunk in milk

4 Likes

I already have it, too bad.
(sent from the future)

1 Like

Cool, cookie thread :ayaya:

1 Like

Are you guys ready to see how Silviu blabbers about coding jargon? Yes you are ready to see coding jargon

1 Like

Look at this fancy invention! It’s a slot macchine. How does it work? You click the screen and the screen darkens and the dots suddenly light up showing if you have a 3-way match.

1 Like

3 Likes

Roblox moment

1 Like

Now make slot machine with rotating wheels

1 Like

What is Debounce?

Debounce is a short cooldown applied so people don’t click-spam causing bad bugs. In this context if I didn’t add it to the slot machine then you would infinitely click the screen an amount of time confusing the heck out of the visual aspects.

What is a variable?

Variables as broadest as possible are codenames that are reused within the same script as much as needed.

Do you want to modify the transparency of a specific door part? You have to target the specific block and its property.
image

Do you want to create a variable that has no relevancy to any target block or property? Those are mostly used to calculate weapon damage, adding debounce and only exist within its own script.

What are properties on Roblox?

image

Properties does not have as much coding jargon as you’d expect, it literally modifies everything that is going on with that block.

What is Neon as a material?

Neon as a material is specifically the texture you can add to a block, it makes the block very bright visually and it makes you see it in the darkness. However it does not light up the surronding, that’s a separate block!
Plastic material
image
Neon material
image

Firstly, we add a variable to add a cooldown so it blocks the slot machine script from working if it’s already turned on.
Retroblox (game on roblox that allows me to code script games) allows me to directly add leaderstats (for example how money you have), so I made it summon the currency I am using for the game “Cing” and then specifically summon how much Cing the player has.

After we check whenever the player has passed the “too poor?” check, we turn the cooldown on so the player can’t click on the screen when the slot machine is now in the middle of something!

So what happens? We turn the screen black so it looks visually appealing because that’s how we keep the gamblers flowing! After that from left-to-right, each section will wait half a second, rand a number from 1 to 3 with RNG block.
Red - 1
Blue - 2
Green - 3
Whatever the RNG lands on, it will give its own dot on the screen one of the colors stated above and change its material to Neon.
So how do we calculate a jackpot?


We give it a click detector event block. In its current state it waits for the dots to brighten up and then calculate if we hit a jackpot.
Red-Red-Red | Blue-Blue-Blue | Green-Green-Green
And then it rewards the player with 435 Cing because it’s cheaper than giving them 10x50! Casinos have to earn their money somehow, folks.

image
This section waits 3 seconds, very enough to calculate whenever the player calculated a jackpot. It will the screen color back to purple and the dots back to the RGB formation and then it will turn off the cooldown signifying that it’s ready to be clicked again.

1 Like
Okay okay Silviu how does it look in practice?

In no particular order, here’s a blue jackpot which considerably inflated my Cing stat until I waste them all by crippling gambling addiction!
Blue Jackpot!


Red Jackpot!

Waiting for it to roll…

Here’s me almost going bankrupt if not for a
Green Jackpot!

And here’s the printed receipt
image

1 Like

Also the slot machine keeps shaking like a washing machine each time the dots change because I forgot to disable its physics lmao.

1 Like

So here’s a math quizz y’all.

If each time 3 dots need to be of the same color and the total number of combinations here is 27. What is the chance of landing on a jackpot?

(Risking making a math mistake here to tempt the conversation with a social phenomenon called Cummingham’s Law, those going to law school, you better keep this in your head!!)

1 Like