How to Make an ATM! Berkian Style!

Hey there users! If you’ve been watching (aka reading), you would know that I made a credit card system a while ago. Well, I decided to add another branch that is kind of related to it, the ATM!

You know the drill, we’ll go through our goals!

Our Goal

  • Make an ATM capable of placing and withdrawing cash.
  • Have it be able to give you hard cash.
  • Create an ID array so the ATM can correctly place money in the correct card.

Let’s get started!

The ATM itself.
Okay, obviously, we need the ATM itself or else, where would you place your money in?
image
Made it myself!
Now, you don’t need to follow, this, if you don’t want to recreate it, use a prop and call it an ATM, it doesn’t matter what you use, so long as you have an ATM.
The Software
Getting a Credit Card
Our first goal will be to make an array of ID’s and have the ATM keep track of them.
For now, we’ll make 3 properties and name them card1, card2, and card3. Make them text properties and have them set to notClaimed. Then, make another property called runThroughCards. This property will help us cycle through the cards when getting our new cards and for the ATM to figure out which card is doing the transaction.

For fun, we’ll make a way for people to get a credit card. Make a button and wire it to a trigger. In the ‘when triggered block’, add this.
image
What this does is that a variable called checkingOpenCards is set to runThroughCards. Then, we run an if/else statement checking if our card property has not been claimed. We concatenate the card and the number value of our variable to be able to make a cycle for the system to go through all the cards. The if checks if the current card property has not been claimed, if your lucky, it updates the property with the player’s name, it then resets the property. So ‘Samantha’ might own Card1, while ‘Jerry’, owns Card2. Our else is in case our card has already been claimed if so, it updates the variable by 1 and calls the trigger again (hence the checkAgain broadcast, make sure your trigger is triggered by it).

You should have this so far.
image

Withdrawing and Depositing
We’ll first make the withdrawing part of the system. Make a button, and call it Withdraw $10?. If you’re smart enough, you should know that we’ll be withdrawing $10. For now, let’s make our ‘bank account’. Make 3 properties called BankAccount1, BankAccount2, and BankAccount3. Make them number properties and place any amount of money in them. Make sure they are not the same, to keep it realistic. Once you are done, make that button we just made in front of the ATM. Wire it to a trigger and put this code in it.


image
This works basically the same as getting a card one. It cycles through the cards, except, it checks which card has your name in it. Then it runs the transaction of ‘removing’ $10 dollars from your account. The only thing that wasn’t mentioned was that it needed to broadcast on giveMoney, which would be received by an item granter that would grant cash, 10 cash to be precise. We also have an else statement in case you don’t have enough money in your account, in which case it would broadcast to a notification or pop-up saying that you can’t do the transaction. The checkAgain2 triggers the trigger, which helps it cycle through the cards.
Depositing
It is the EXACT same as the withdrawal, except you are adding $10 to your bank account. However, we have a checker that is wired to the button. We want it to check if the amount of cash the player has is less than 10, if the check passes, meaning they have less then 10 dollars, broadcast on cannotDoTransaction which would probably open a message saying you don’t have the money to put it in. And if the check fails, which means they have 10 or more, broadcast oncanDoTransaction. Here is a model of how it would technically work.
image
And that should be it! If I missed anything or if something doesn’t work, let me know.

Difficulty
  • 1 :blue_square:
  • 2 :green_square:
  • 3 :green_square:
  • 4 :yellow_square:
  • 5 :yellow_square:
  • 6 :orange_square:
  • 7 :orange_square:
  • 8 :red_square:
  • 9 :red_square:
  • 10 :purple_square:
0 voters
How good was it?
  • 1 :star:
  • 2 :star: :star:
  • 3 :star: :star: :star:
  • 4 :star: :star: :star: :star:
  • 5 :star: :star: :star: :star: :star:
0 voters
12 Likes

ATM (first reply) that’s cool
Love the guide!!! (five stars)

2 Likes

Both ATM looks good and oh my blocks

2 Likes

Agree the ATM looks like a prop (its that good)

3 Likes

Great guide! This might even help me with my game, I just need to swap up some things…

2 Likes

ooh nice gave me an idea city level get 10,000 bucks and an ATM can help store the money

2 Likes

Nice guide. If someone made a heist game like @Jobozo1875’s perfect heist, the r0bber could have to steal the code from a player (or a keycard) and use it to steal the money!

4 Likes

good idea lol someone needs to do that

2 Likes

You could make it a high-tech vault instead where you need to steal the banks card!

1 Like

nice guide @Toothless!
this is great for a bank heist game!
you know the guide gets serious when you reach blocks :laughing:
5 stars!

2 Likes

What’s berkian style

1 Like

You can make a game where you go to different places to steal the world’s $$$

2 Likes

They could just add a dep0sit and a take cash option and change some of the settings of the checker and ask for a keycard

3 Likes

It’s my style, like Clacian style, or Helpian style?
Yes I did Amake

3 Likes

Did you make the atm from barriers?

2 Likes

dont know if I saw it in there but you should add checks

1 Like

Checks as in the checker device or something else?

1 Like

This type of check

Screenshot 2024-10-21 5.13.55 PM

1 Like

Oh that! I didn’t add them. Can ATM’s print those?

1 Like

If you didn’t’t know of them (somehow) brief recap, you give the check to someone and then they turn it into the bank and it takes the amount of money from the origianl persons bank account into the person who was given the checks, bank account.