How to take a percentage of something

Hello, so a player in my game has 2 int values called, “Arcade Cash” and “Cash”. I have a button where it takes “Arcade Cash” and adds it onto “Cash” but i want it to take 30% of the “Arcade Cash” when adding it onto “Cash”.

im not the best at explaining, so feel free to ask any questions

Assuming I understand your question correctly you could simply use an equation such as this

Cash = (ArcadeCash * 0.3) + Cash

Multiplying by 0.3 is the equivalent of taking 30%.
Same goes for other percentages, just move the decimal back two spots and remove the percent sign.

For example:

10% = 0.1
50% = 0.5
200% = 2.0
1% = 0.01
0.15% = 0.0015