@name Failcake's Orbit Test copy protection
@inputs
@outputs
@persist Timer FollowT:entity Follow
@persist T S
##ALL MADE BY [SM]FailCake##
##ALL MADE BY [SM]FailCake##

##Back to owner##

if(chatClk(owner()) & owner():lastSaid():left(3) == "me") {
    FollowT = owner()
}

##Follower :D YAY##

if (first()){FollowT = owner()}
if(chatClk(owner()) & owner():lastSaid():left(7) == "orbit") {
    if(owner():lastSaid() == "#follow") {
        findIncludeClass("player")
        findExcludePlayer(owner())
        Fsphere = findInSphere(owner():aimPos(), 50000)
        if(Fsphere > 0) {
            FollowT = findClosest(owner():aimPos())
            Follow = 1
        }
    }
}

##Scale woot##

S = 1

holoScale(1,vec(S,S,S))
holoScale(2,vec(S,S,S))
holoScale(3,vec(S,S,S))
holoScale(4,vec(S,S,S))
holoScale(5,vec(S,S,S))
holoScale(6,vec(S,S,S))
holoScale(7,vec(S,S,S))
holoScale(8,vec(S,S,S))

##Stuff##

interval(20)

##Woot? Owner :D##

LastSaid = owner():lastSaid():lower()

##Cube 1##

Timer = Timer + 0.01
if (first()){holoCreate(1)
    holoModel(1,"cube",0)
    holoShadow(1,0)
    holoColor(1,vec(255,0,0))
    
}

Y = FollowT:pos() + vec(0,cos(Timer*10)*100,0)
X = FollowT:pos() + vec(sin(Timer*10)*100,0,0)
Z = FollowT:pos():z() + owner():height() + 20
holoPos(1, vec(X:x(),Y:y(),Z))

##Cube 2##

Timer = Timer + 0.01
if (first()){holoCreate(2)
    holoModel(2,"cube",0)
    holoShadow(2,0)
    holoColor(2,vec(255,255,255))
    
    
}

Y = FollowT:pos() + vec(0,cos(Timer*12)*100,0)
X = FollowT:pos() + vec(sin(Timer*12)*100,0,0)
Z = FollowT:pos():z() + owner():height() + 20
holoPos(2, vec(X:x(),Y:y(),Z))

##Cube 3##

Timer = Timer + 0.01
if (first()){holoCreate(4)
    holoModel(4,"cube",0)
    holoShadow(4,0)
    holoColor(4,vec(0,255,255))

    
}

Y = FollowT:pos() + vec(0,cos(Timer*14)*100,0)
X = FollowT:pos() + vec(sin(Timer*14)*100,0,0)
Z = FollowT:pos():z() + owner():height() + 20
holoPos(4, vec(X:x(),Y:y(),Z))

##Cube 5##

Timer = Timer + 0.01
if (first()){holoCreate(5)
    holoModel(5,"cube",0)
    holoShadow(5,0)
    holoColor(5,vec(100,200,165))

    
}

Y = FollowT:pos() + vec(0,cos(Timer*16)*100,0)
X = FollowT:pos() + vec(sin(Timer*16)*100,0,0)
Z = FollowT:pos():z() + owner():height() + 20
holoPos(5, vec(X:x(),Y:y(),Z))

##Cube 6##

Timer = Timer + 0.01
if (first()){holoCreate(6)
    holoModel(6,"cube",0)
    holoShadow(6,0)
    holoColor(6,vec(200,140,165))

    
}

Y = FollowT:pos() + vec(0,cos(Timer*18)*100,0)
X = FollowT:pos() + vec(sin(Timer*18)*100,0,0)
Z = FollowT:pos():z() + owner():height() + 20
holoPos(6, vec(X:x(),Y:y(),Z))

##Cube 7##

Timer = Timer + 0.01
if (first()){holoCreate(7)
    holoModel(7,"cube",0)
    holoShadow(7,0)
    holoColor(7,vec(140,140,165))

    
}

Y = FollowT:pos() + vec(0,cos(Timer*20)*100,0)
X = FollowT:pos() + vec(sin(Timer*20)*100,0,0)
Z = FollowT:pos():z() + owner():height() + 20
holoPos(7, vec(X:x(),Y:y(),Z))

##Cube 8##

Timer = Timer + 0.01
if (first()){holoCreate(8)
    holoModel(8,"cube",0)
    holoShadow(8,0)
    holoColor(8,vec(140,140,0))

    
}

Y = FollowT:pos() + vec(0,cos(Timer*22)*100,0)
X = FollowT:pos() + vec(sin(Timer*22)*100,0,0)
Z = FollowT:pos():z() + owner():height() + 20
holoPos(8, vec(X:x(),Y:y(),Z))


##Cube stoped##

Timer = Timer + 0.01
if (first()){holoCreate(3)
    holoModel(3,"sphere",0)
    holoShadow(3,0)
    holoColor(3,vec(0,255,255))
   
    
}
Y = FollowT:pos() + vec(0,cos(Timer*180)*0,0)
X = FollowT:pos() + vec(sin(Timer*180 + 180)*0,0,0)
Z = FollowT:pos():z() + owner():height() + 30
holoPos(3, vec(X:x(),Y:y(),Z))


##Cube Protect My chip STILL IN WORK##


Ent = entity()
GPS = Ent:pos()
    holoCreate(20, GPS + vec(0,0,0))
    holoModel(20, "sphere", 2)
    holoShadow(20,200)
    holoColor(20,vec(0,0,0))
    

##Flash :D##

setColor(random(255),random(255),random(255))

##Music !!##
if (first() | duped()) {
    runOnChat(1)
    T = 0
}

LastSaid = owner():lastSaid():lower()
O = owner()

if (LastSaid == "music") {T = 1}
elseif (LastSaid == "stop") {T = 0}

if (T) {
    if ($T) {
         soundStop(0)
        O:soundPlay(0,0,"music/HL2_intro.mp3")
        O:setMaterial("models/shiny")}
        timer("Color",10)
        if (clk("Color")) {
            O:setColor(random(255),random(255),random(255))
}
    }
else {
    soundPurge()
}
##INVISIBLE !##

entity():setColor(0,0,0)

##PROTECTION SISTEM MUAHAHAHAH##

if(duped()){selfDestructAll()}
