execute run loot spawn ~ ~ ~ loot 1_splatus:ultris/other/randomize_8
execute store result score @s ultris_randomizer_output run data get entity @e[distance=..0.01,type=item,limit=1] Item.tag.UltrisRandomizerOutput
execute run kill @e[distance=..0.01,type=item,limit=1]

#randomized directions
execute if score @s ultris_randomizer_output matches 1 as @e[distance=..2,sort=nearest,limit=1,type=marker,tag=ultris_book_follow] at @s run tp @s ~ ~ ~ 0 -60 
execute if score @s ultris_randomizer_output matches 2 as @e[distance=..2,sort=nearest,limit=1,type=marker,tag=ultris_book_follow] at @s run tp @s ~ ~ ~ 45 -60 
execute if score @s ultris_randomizer_output matches 3 as @e[distance=..2,sort=nearest,limit=1,type=marker,tag=ultris_book_follow] at @s run tp @s ~ ~ ~ 90 -60 
execute if score @s ultris_randomizer_output matches 4 as @e[distance=..2,sort=nearest,limit=1,type=marker,tag=ultris_book_follow] at @s run tp @s ~ ~ ~ 135 -60 

execute if score @s ultris_randomizer_output matches 5 as @e[distance=..2,sort=nearest,limit=1,type=marker,tag=ultris_book_follow] at @s run tp @s ~ ~ ~ 180 -60 
execute if score @s ultris_randomizer_output matches 6 as @e[distance=..2,sort=nearest,limit=1,type=marker,tag=ultris_book_follow] at @s run tp @s ~ ~ ~ 225 -60 
execute if score @s ultris_randomizer_output matches 7 as @e[distance=..2,sort=nearest,limit=1,type=marker,tag=ultris_book_follow] at @s run tp @s ~ ~ ~ 270 -60 
execute if score @s ultris_randomizer_output matches 8 as @e[distance=..2,sort=nearest,limit=1,type=marker,tag=ultris_book_follow] at @s run tp @s ~ ~ ~ 315 -60 
