After creating the objective with this command: "/scoreboard objectives add <Credits> stat.killEntity.Zombie" It makes it so when ever I kill a zombie it gives me 1 "credit" - If possible I would like it so when I click a sign it checks to make sure I have at least X credits and if that is true it will give me a certain item and subtract the used credits. If this is non achievable with signs i would love to know how to do it with commandblocks instead! I would really appreciate some help!
I use a button but I have this exact thing in my realm. The code for the blocks is /testfor @p[score_money_min=1000] for the single block for the double blocks its /give @p diamond 1 and /scoreboard players remove @p money 1000 The sell button isn't functional yet, have to wait for 1.8
Thats not exactly what im looking for - Im trying to see if theres a way to do something like /testfor @p[stat.killEntity_min=1] and the if that is true it would output a redstone signal that would the pover a command that would remove 1 credit from @p
Make a sign with this: /seblock ~ ~ ~ sign Rotation {Text2:"{text:\"Sign message\",clickEvent:{action:run_command,value:\"/setblock X Y Z\"}}"}
Then set a block next to a command block, and set the block back to air. Then you can give everyone with a max/min credit score the amount the item, then subtract the amount of credits from their credit score.
1. Create the objectives
/scoreboard objectives add zombiekills stat.killEntity.Zombie Zombie_Kills
/scoreboard objective add credit dummy Credits
2. aggregate scores
Create a clock, link it to a comparator
make a CB with code /scoreboard players add @p[score_zombiekills_min=1] credit 1
then link a comparator to that block pointing toward another CB with the code
/scoreboard players remove @p[score_zombiekills_min=1] zombiekills 1
Then make the shop as explained before just replace money with credit and voila exactly what you need
Then set a block next to a command block, and set the block back to air. Then you can give everyone with a max/min credit score the amount the item, then subtract the amount of credits from their credit score.