For one of my businesses I need a command for the command block that asks a question and then has to click on it in the chat. E.g.: How much money do you want to raise:
1
5
20th
And then he has to spend something depending on the answer.
Have a look at MCStacker.
This is of course possible, for this I mostly use https://www.minecraftjson.com/. Here you can create text in any color. If you now go to Clickevent → Run Command below, you can execute a command, such as an entry in a scoreboard.
Here is an example command:
/ tellraw @p ["", {"text": "How much money do you want to give away?:", "bold": true, "italic": true, "color": "gold"}, {"text": "[1]", "bold": true, "italic": true, "color": "dark_green", "clickEvent": {"action": "run_command", "value": "/ say You took one! "}}]
If you press [1], "You took one!" issued in chat