My code:
variables:
{income::%player%} = 0
command /gens:
description: Lists generators
permission: list.gens
trigger:
open chest with 1 row named "&cGens" to player
wait 1 tick
format slot 0 of player with grass named "Grass gen" with lore "+1 income" to close then run "incomeadd 1 to 'player'"
wait 1 tick
make the player execute "/pay AustinJason 100"
command /incomeadd <money> <player>:
description: adds income
permission: income.add
trigger:
add arg-1 to {income::%player%}
every second in "world":
add {income::%player%} to balance of all players #<=Here
variables:
{income::%player%} = 0
command /gens:
description: Lists generators
permission: list.gens
trigger:
open chest with 1 row named "&cGens" to player
wait 1 tick
format slot 0 of player with grass named "Grass gen" with lore "+1 income" to close then run "incomeadd 1 to 'player'"
wait 1 tick
make the player execute "/pay AustinJason 100"
command /incomeadd <money> <player>:
description: adds income
permission: income.add
trigger:
add arg-1 to {income::%player%}
every second in "world":
add {income::%player%} to balance of all players #<=Here