variables: {safeloce} = 10 command /radiation safe : trigger: set {safeloce} to arg 1 set {srodekr} to location of player on player move: if distance between the player and {srodekr} is bigger than {safeloce}: create bossbar titled "&cRadiacja" and id "radiacja" for player with progress 100 with colors red apply potion of wither of tier 3 to player for 3 second if distance between the player and {srodekr} is smaller than {safeloce}: remove bossbar "radiacja" wait 3 seconds remove wither from player