payto_command_payto: debug: false type: command name: payto usage: /payto (amount) description: Pays the player you're looking at. permission: essentials.pay tab completions: 1: <<>amount<>> script: - if != player: - narrate "<&c>Please run this command as a player." - stop - if <= 0: - narrate "<&c>Please enter an amount to pay!" - stop - define amount - if !: - narrate "<&c>You must enter a number to pay!" - stop - if < : - narrate "<&c>You don't have ." - stop - define target - if <[target]> == null: - narrate "<&c>Please look at a player to send money to." - stop - if <[target].is_npc>: - narrate "<&c>Please look at a player to send money to." - stop - clickable usages:1 until:1m save:pay: - execute as_player "pay <[target].name> <[amount]>" - narrate format:formats_prefix "<&7>Would you like to pay <&6><[amount].as_money><&7> to <&6>]>" - narrate "<&l>[CLICK HERE]].on_click[]>"