How to make a PVP timer in Minecraft (BEDROCK)

Channel:
Subscribers:
1,440
Published on ● Video Link: https://www.youtube.com/watch?v=Pm97hckNJzI



Category:
Guide
Duration: 9:49
216 views
6


Today I will show you how to make a timer that can be random or set that turns on and off PVP. This can be hooked up to lifesteal or friends or foe types of commands.
COMMANDS:
/scoreboard objectives add Timer dummy

/scoreboard objectives add On dummy

/scoreboard players set @a On 0

/scoreboard players add @a Timer 1

/execute if score @a[c=1] Timer matches 50.. run scoreboard players set @e Timer 0

ARMOUR STAND COMMANDS:
/gamerule pvp true
/setblock ~ ~-2 ~ air
/title @a actionbar PVP ON

ARMOUR STAND 2 COMMANDS:
/gamerule pvp false
/setblock ~ ~-2 ~ air
/title @a actionbar PVP OFF

SET TIMER COMMANDS:
/execute if score @a[c=1] On matches 1 run scoreboard players set @a On 0

execute at @e[type=armor_stand,c=1,name=Random1] run setblock ~ ~2 ~ redstone_block

/setblock ~ ~-2 ~1 air

/setblock ~ ~-3 ~5 blackstone

/execute if score @a[c=1] On matches 0 run scoreboard players set @a On 1

execute at @e[type=armor_stand,c=1,name=Random2] run setblock ~ ~2 ~ redstone_block

/setblock ~ ~-2 ~-1 air

/setblock ~ ~-3 ~-5 blackstone

RANDOM TIMER COMMAND:
execute at @e[type=armor_stand,c=1,name=Random1] run setblock ~ ~2 ~ redstone_block