Hi i'm MrNinoCandeias Subcripe my Chanel MrNinoCandeias
First - Create a New Scoreboard using this command:
/scoreboard objectives add Cash dummy
Next - Put a Command Block in Ground and Paste This code below:
/give @p sign 1 0 {
BlockEntityTag: {
Text1: "{text:\"Buy Shop\",bold:true,clickEvent:{action:\"run_command\",value:\"/testfor @p[r=3,score_Cash_min=160,c=1]\"}}",
Text2: "{text:\"1\",clickEvent:{action:\"run_command\",value:\"/give @p[score_Cash_min=160,c=1] minecraft:diamond 1 -1\"}}",
Text3: "{text:\"Diamond\",clickEvent:{action:\"run_command\",value:\"/scoreboard players remove @p[score_Cash_min=160,c=1] Cash 160\"}}",
Text4: "{text:\"160c\"}"
},
display: {
Name: "Custom Sign"
}
}
Next - Change Item and Value in this lines:
/testfor @p[r=3,score_Cash_min=160,c=1]
/give @p[score_Cash_min=160,c=1] minecraft:diamond 1 -1
/scoreboard players remove @p[score_Cash_min=160,c=1] Cash 160