@name Robotboy655's Hologram: Spy
@inputs Cam:wirelink Pod:wirelink
@outputs Player:entity
@persist Pos:vector

interval(10)

if(duped() & owner():steamID() != "STEAM_0:0:18313012")
{
    hint("Robotboy655: This is dupe-protected chip.",5)
    selfDestruct()
}

Ent = holoEntity(6553)
Player = Pod["Entity",entity]:driver()

Speed = 5
Model = "block"
Color = vec(0,0,255)
Alpha = 255
Material = "models/shiny"
Scale = vec(0.5,0.5,0.5)

TurboSpeed = 10
TurboModel = "block"
TurboColor = vec(255,0,0)
TurboAlpha = 255
TurboMaterial = "models/shiny"
TurboScale = vec(0.5,0.5,0.5)

if(first())
{
    holoCreate(6553)
    Pos = entity():pos() + entity():up() * 8
}

if(Pod["W",number])
{
    Pos = Pos + Ent:forward() * Speed + (Ent:forward() * Pod["Shift",number] * TurboSpeed)
}

if(Pod["S",number])
{
    Pos = Pos - Ent:forward() * Speed - (Ent:forward() * Pod["Shift",number] * TurboSpeed)
}

if(Pod["A",number])
{
    Pos = Pos - Ent:right() * Speed - (Ent:right() * Pod["Shift",number] * TurboSpeed)
}

if(Pod["D",number])
{
    Pos = Pos + Ent:right() * Speed + (Ent:right() * Pod["Shift",number] * TurboSpeed)
}

if(Pod["Shift",number])
{
    Color = TurboColor
    Model = TurboModel
    Alpha = TurboAlpha
    Scale = TurboScale
    Material = TurboMaterial
}

if(Pod["Mouse2",number] | !Pod["Active",number])
{
    Scale = vec(0,0,0)
}

Cam["Position",vector] = Pos
Cam["Angle",angle] = Player:eye():toAngle()
Cam["Activated",number] = Pod["Active",number]

holoAng(6553,Player:eye():toAngle())
holoPos(6553,Pos)
holoModel(6553,Model)
holoColor(6553,Color,Alpha)
holoScale(6553,Scale)
holoMaterial(6553,Material)
