How do you remove half of the players cash by JUST pressing a button?

I’m working on my first Gimkit game (I decided to go with a Find the Button game) and is a little bit of a beginner but I’m trying to find out how to make a button that removes half of the players cash for my game. Like you know how in Diamond Rush, sometimes the blocks removes half or %50 of your diamonds? I want to do the same but with a button and cash. I’ve been searching it up on YouTube but I couldn’t find any, and I tried doing some research on google but nothing worked :expressionless_face:. Can someone try to help out please?

1 Like

Ok, this one is kinda difficult.

Are you using an item or a property?

1 Like

What do you mean by that?

1 Like

Do they have the physical money item, or are you using a property device.

1 Like

I think its the physical money item.

1 Like

I’d suggest switching to a property, since it may not be possible to do with an item.

You can do it with a property with this code.


i dont have much experience with inv managers but i dont think you can halve items with them. dont quote me on that tho

2 Likes

Alright, I’ll give it a try. Thank you!

2 Likes

shouldn’t you use inventory manager for this?

oh, I was wrong, I just looked in the inventory manager and realized that there is nothing there that I thought was there

3 Likes

I think this might be a bit complicated for a Gimkit beginner but I’ll try my best. First you get a button, an item granter, a property, and an item inventory manager. Make the inventory item manager cash and the property called cash. Make the inventory item update the property cash. Wire the button to the item granter (which should grant 1 cash) and do a block on wire pulse and make the code like this:
Grant player selected item(custom amount)
amount: get property “cash” :divide: 2 :minus: get property “cash”
Now It will take away half of their money.

P.S. Sorry I couldn’t add pictures.

2 Likes

Thanks for the advice! I’ll give it a shot. ^^

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.