function fWithdrawCrops(b: block, p: player, d: number): set {_type} to tag "autofarm;type;%{_b}%" of nbt of {_b} if {_type} is "wheat": set {_type} to "wheat seeds" if {_type} is "beetroot": set {_type} to "beetroot seeds" set {_amount} to tag "autofarm;drop;%{_b}%" of nbt of {_b} drop {_amount} of {_type} under {_p} set tag "autofarm;drop;%{_b}%" of {_b} to 0 send "&d&lᴀᴜᴛᴏғᴀʀᴍ &8> &aᴡɪᴛʜᴅʀᴀᴡᴇᴅ %{_amount}% ᴄʀᴏᴏᴘs" to {_p} play sound "ENTITY_PLAYER_LVLUP" at volume 0.7 at pitch 0.3 at location of {_p} function fCloseGUI(p: player): close {_p}'s inventory play sound "ITEM_SHIELD_BLOCK" at volume 0.7 at pitch 0.3 at location of {_p}