execute as @a at @s run execute as @e[tag=Occupied,distance=0..1] run execute as @a[scores={sneakStatus=6..},distance=0..1] at @s run scoreboard players set @s sneakStatus 0

#execute as @a[team=hunter,scores={killerType=1..4}] at @s 
execute as @s at @s run execute unless entity @a[distance=0.1..2] run execute as @s at @s if score @s playerMaxInv > @s inventorySlot run execute if score @e[tag=invCore,limit=1] invTimeReset > @e[tag=systemSetting,limit=1] blockInvReset run execute as @e[tag=Occupied,distance=0..1,limit=1] run execute as @a at @s anchored eyes facing entity @e[sort=nearest,limit=1,tag=Occupied] eyes anchored feet positioned ^ ^ ^1 rotated as @s positioned ^ ^ ^-1 if entity @s[distance=..0.3] run execute as @s at @s run execute as @e[tag=Occupied,sort=nearest,limit=1] at @s run title @a[distance=0..2,sort=nearest,limit=1,scores={fullInventory=0}] actionbar [{"text":"[Hold] sneak button to pick up ","color":"yellow"},{"selector":"@s"}]

#execute as @a[team=hunter,scores={killerType=5}] at @s run 
execute as @s at @s run execute unless entity @a[distance=0.1..2] run execute as @s at @s unless score @s playerMaxInv > @s inventorySlot run execute if score @e[tag=invCore,limit=1] invTimeReset > @e[tag=systemSetting,limit=1] blockInvReset run execute as @e[tag=Occupied,distance=0..1,limit=1] run execute as @a at @s anchored eyes facing entity @e[sort=nearest,limit=1,tag=Occupied] eyes anchored feet positioned ^ ^ ^1 rotated as @s positioned ^ ^ ^-1 if entity @s[distance=..0.3] run execute as @s at @s run execute as @e[tag=Occupied,sort=nearest,limit=1] at @s run title @a[distance=0..2,sort=nearest,limit=1,scores={fullInventory=1}] actionbar [{"text":"Can't pick this item up. ","color":"red"},{"selector":"@s","strikethrough":true}]

execute as @s at @s run execute if entity @a[distance=0.1..2] run execute as @s at @s if score @s playerMaxInv > @s inventorySlot run execute if score @e[tag=invCore,limit=1] invTimeReset > @e[tag=systemSetting,limit=1] blockInvReset run execute as @e[tag=Occupied,distance=0..1,limit=1] run execute as @a at @s anchored eyes facing entity @e[sort=nearest,limit=1,tag=Occupied] eyes anchored feet positioned ^ ^ ^1 rotated as @s positioned ^ ^ ^-1 if entity @s[distance=..0.3] run execute as @s at @s run execute as @e[tag=Occupied,sort=nearest,limit=1] at @s run title @a[distance=0..2,sort=nearest,scores={fullInventory=0}] actionbar [{"text":"You can't pick this up when the player are nearby. ","color":"red"}]

#execute as @s at @s run execute unless entity @a[distance=0.1..2] run execute as @s at @s unless score @s playerMaxInv > @s inventorySlot run execute if score @e[tag=invCore,limit=1] invTimeReset > @e[tag=systemSetting,limit=1] blockInvReset run execute as @e[tag=Occupied,distance=0..1,limit=1] run execute as @a at @s anchored eyes facing entity @e[sort=nearest,limit=1,tag=Occupied] eyes anchored feet positioned ^ ^ ^1 rotated as @s positioned ^ ^ ^-1 if entity @s[distance=..0.3] run execute as @s at @s run execute as @e[tag=Occupied,sort=nearest,limit=1] at @s run title @a[distance=0..2,sort=nearest,scores={fullInventory=1}] actionbar [{"text":"You can't pick this up when the player are nearby. ","color":"red"}]
