Hello! Im making a skript that prevents players from breaking/placing blocks, They are allowed to place blocks on red-hardened-clay. But now i wanted to add so you can place ladders only on yellow-hardened-clay, How can i add that to my current skript?
Code:
Code:
Code:
command /toggleblockbreaking:
permission: tbb.toggle
trigger:
if {%player%.SBB} is 0:
set {%player%.SBB} to 1
message "{@ServerPrefix} » &aYou can now break blocks."
stop
if {%player%.SBB} is 1:
set {%player%.SBB} to 0
message "{@ServerPrefix} » &cYou can now not longer break blocks."
stop
command /tbb:
permission: tbb.toggle
trigger:
if {%player%.SBB} is 0:
set {%player%.SBB} to 1
message "{@ServerPrefix} » &aYou can now break blocks."
stop
if {%player%.SBB} is 1:
set {%player%.SBB} to 0
message "{@ServerPrefix} » &cYou can now not longer break blocks."
stop
# Stops-block-breaking
on block break:
if {%player%.SBB} is 0:
message "{@ServerPrefix} » &cYou are not allowed to break blocks!"
cancel event
stop
if {%player%.SBB} is 1:
message "{@ServerPrefix} » &aYou broke this block with succes!"
stop
on block place:
if block under event-block is not red hardened clay:
if {%player%.SBB} is 0:
message "{@ServerPrefix} » &cYou are not allowed to place blocks!"
cancel event
stop
if {%player%.SBB} is 1:
chance of 75%:
message "{@ServerPrefix} » &aYou placed this block with succes!"
stop
chance of 25%:
cancel event
message "{@ServerPrefix} » &c&nThis block has made an error. Please try again."
stop