Hello I was wondering if there is any way to reduce the lag this skript causes
Code:
on any movement:
loop all players in radius 1 of the player:
if loop-player is "&bGuard":
if player has 1 sugar named "{@c}":
teleport player to location at {@resetlocation} in world "world"
remove all sugar named "&fCocaine" from player's inventory
message "&cAll of your {@c} &chas been confiscated from your inventory!"
if player has 1 nether wart named "{@m}":
teleport player to location at {@resetlocation} in world "world"
remove all nether wart named "{@m}" from player's inventory
message "&cAll of your {@m} &chas been confiscated from your inventory!"
if player has 1 wheat named "{@w}":
teleport player to location at {@resetlocation} in world "world"
remove all wheat named "{@w}" from player's inventory
message "&cAll of your {@w} &chas been confiscated from your inventory!"