interval(10)
O = owner()

if(first()) {
    holoCreate(1,entity():pos()+vec(0,0,60),vec(1))
    function number checkLPI(H) {
        local Holo = holoEntity(H)
        local Vec = (O:shootPos()+(Holo:up():dot(Holo:pos()-O:shootPos()))/(Holo:up():dot((O:shootPos()+O:eye())-O:shootPos()))*((O:shootPos()+O:eye())-O:shootPos()))
        
        local Min = Holo:pos()-(holoScaleUnits(holoIndex(Holo))/1.01)
        local Max = Holo:pos()+(holoScaleUnits(holoIndex(Holo))/1.01)
        
        return Vec:x() > Min:x() & Vec:x() < Max:x() & Vec:y() > Min:y() & Vec:y() < Max:y() & Vec:z() > Min:z() & Vec:z() < Max:z()
    }
}
Person = owner()

if(changed(Person:keyUse()) & Person:keyUse() & checkLPI(1)) {
    propSpawn("models/Gibs/HGIBS.mdl",0)
}
