I need help with something

How to make a functional cash register in a chat room that can be stolen and every 5 seconds 1 dollar is added and when it is touched and it is received how much money is there and the whole process is repeated

if you still want to make this you can friend me and I can help in-game because this would be hard to explain without being there.