################
# > Prezzie: A holographic present for fun.
# > How to use: Spawn it and enjoy the fully randomated holographic present! Perfect for birthdays.
################

@name PREZZIE
@persist Scale BoxColour:vector RibbonColour:vector A I

Scale=random(0.3,1.5)
BoxColour=vec(random(255),random(255),random(255))
RibbonColour=vec(random(255),random(255),random(255))

interval(10)

if (first()|duped()) {
    holoCreate(0)
    holoScale(0,vec(3,3,3)*Scale)
    holoColor(0,BoxColour)
    holoPos(0,entity():pos()+vec(0,0,18)*Scale)
    holoParent(0,entity())
    holoCreate(1)
    holoScale(1,vec(3.1,0.5,3.1)*Scale)
    holoColor(1,RibbonColour)
    holoPos(1,entity():pos()+vec(0,0,18)*Scale)
    holoParent(1,entity())
    holoCreate(2)
    holoScale(2,vec(0.5,3.1,3.1)*Scale)
    holoColor(2,RibbonColour)
    holoPos(2,entity():pos()+vec(0,0,18)*Scale)
    holoParent(2,entity())
    holoCreate(3)
    holoModel(3,"torus3")
    holoPos(3,entity():pos()+vec(0,5,42)*Scale)
    holoAng(3,entity():angles()+ang(55,-90,0))
    holoScale(3,vec(1.5,0.7,0.7)*Scale)
    holoColor(3,RibbonColour)
    holoParent(3,entity())
    holoCreate(4)
    holoModel(4,"torus3")
    holoPos(4,entity():pos()+vec(0,-5,42)*Scale)
    holoAng(4,entity():angles()+ang(55,90,0))
    holoScale(4,vec(1.5,0.7,0.7)*Scale)
    holoColor(4,RibbonColour)
    holoParent(4,entity())
}

A+=1
holoColor(0,hsv2rgb(A%360,1,1))
