how do i execute console comands in a function, this is my code
function ocelotbuybuy(p: player):
execute console command "/give %player% minecraft:player_head{display:{Name:"{"text":"Ocelot Pet"}"},SkullOwner:{Id:[I;1044976568,1986609309,-1614770531,1138340903],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTE4Zjc3MzMxYjJjYWI2NGUyYjQzMGZhOGU0MjczZTRkYjdmNzhmY2RmYTRiMWE5YTQxOGFmNDczNzUwNTZlYiJ9fX0="}]}}} 1"
execute console command "/clear %player% diamond{display:{Name:'{"text":"Token","color":"gold","bold":true,"italic":true}'}} 1"
an it doesnt work