How to Create a Money Transferring System -Tutorial Series #003

Commands:

Donate Box Open:

/testforblock ~+1 ~ ~+2 unpowered_comparator
COMPARATOR
/fill 27 4 0 27 5 -2 air

Donate Box Occupied:

/testfor @a[x=24, y=4, z=-1, r=4]
COMPARATOR
/fill 27 4 0 27 5 -2 barrier

Donate x10:

/scoreboard players set @a[x=24, y=4, z=-1, r=4] Donate 10
setblock 34 4 -6 redstone_block
/setblock 35 4 -10 redstone_block
/setblock 36 4 -6 unpowered_comparator 1
/setblock 38 4 -4 unpowered_comparator 1

Donate x1:

/scoreboard players set @a[x=24, y=4, z=-1, r=4] Donate 1
setblock 34 4 -6 redstone_block
/setblock 35 4 -10 redstone_block
/setblock 36 4 -6 unpowered_comparator 1
/setblock 38 4 -4 unpowered_comparator 1

Leave:

tp @p 31 4 -1

Leave a Reply