#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#
#    This function has been created by Skilendarz Group.
#             https://skilendarz.com
#
#      GIVE MAP MAKERS THE CREDIT THEY DESERVE!
#             COPYING IS PROHIBITED!
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

effect give @e[tag=cauldron,limit=1,sort=nearest] minecraft:invisibility 1000000 100 true

#Position
scoreboard players remove @s[scores={kills=6..}] kills 1
scoreboard players operation @s time += @s kills

scoreboard players operation $cos main = @s time
function f:lobby/options/cos/cos

#Multiplier
scoreboard players operation $cos main *= @s kills

scoreboard players set @s pos_y 358000
scoreboard players operation @s pos_y += $cos main
execute at @s[scores={kills=1..}] run tp @s ~ ~1 ~
execute store result entity @s[scores={kills=1..}] Pos[1] double 0.0003 run scoreboard players get @s pos_y
scoreboard players remove @s[scores={time=360..}] time 360

#Rotation
scoreboard players operation @s tick += @s kills
execute store result entity @s Rotation[0] float 1 run scoreboard players get @s tick
tp @e[tag=option_selected_time,distance=..2,limit=1,sort=nearest] @s
scoreboard players remove @s[scores={tick=1440..}] tick 1440
scoreboard players add @s[scores={tick=..1440}] tick 1440