I want to make something like a flute that changes its tone from 0.5 to 2 depending on the player's camera angle
Code:
on rightclick with echo shard:
set {_pitch} to player's pitch
set {angle} to {_pitch} / 45
loop players within 16 blocks of player:
play sound "minecraft:block.note_block.flute" with volume 1000 with pitch {angle} to loop-player
message "%{angle}%"