@name FailCake HolyBook V1
@inputs 
@outputs [Ang Base]:angle Float:vector Down
@persist TM R O:entity TM2 R2 ANG Speed Length Timer
@trigger all
@model models/props_lab/bindergraylabel01b.mdl
runOnTick(1)

E = entity()
if(first()){
Close = 0
hint("Made by FailCake",7)
Length = 15 // modify to the map =P
#-40
E:setColor(60,60,60,255)
E:setMaterial("models/props_lab/xencrystal_sheet")
E:setTrails(10,10,3,"trails/laser",vec(255,255,255),255)    
R = 0
TM = 0
TM2 = 0
}

#sprites/heatwave
#sprites/glow04_noz
holoCreate(1)
holoModel(1,"icosphere3")
holoPos(1,E:toWorld(vec(0,0,5)))
holoColor(1,vec(255,255,255))
holoScale(1,vec(3,3,3))
holoParent(1,E)
holoMaterial(1,"sprites/heatwave")

holoCreate(2)
holoModel(2,"icosphere3")
holoPos(2,E:toWorld(vec(0,0,5)))
holoColor(2,vec(255,255,255))
holoScale(2,vec(2,2,2))
holoParent(2,E)
holoMaterial(2,"sprites/heatwave")

Holy=array()
Holy:setString(1,"vo/ravenholm/monk_rant01.wav")
Holy:setString(2,"vo/ravenholm/monk_rant02.wav")
Holy:setString(3,"vo/ravenholm/monk_rant03.wav")
Holy:setString(4,"vo/ravenholm/monk_rant04.wav")
Holy:setString(5,"vo/ravenholm/monk_rant05.wav")
Holy:setString(6,"vo/ravenholm/monk_rant06.wav")
Holy:setString(7,"vo/ravenholm/monk_rant07.wav")
Holy:setString(8,"vo/ravenholm/monk_rant08.wav")
Holy:setString(9,"vo/ravenholm/monk_rant09.wav")
Holy:setString(10,"vo/ravenholm/monk_rant10.wav")
Holy:setString(11,"vo/ravenholm/monk_rant11.wav")
Holy:setString(12,"vo/ravenholm/monk_rant12.wav")
Holy:setString(13,"vo/ravenholm/monk_rant13.wav")
Holy:setString(14,"vo/ravenholm/monk_rant14.wav")
Holy:setString(15,"vo/ravenholm/monk_rant15.wav")
Holy:setString(16,"vo/ravenholm/monk_rant16.wav")
Holy:setString(17,"vo/ravenholm/monk_rant17.wav")
Holy:setString(18,"vo/ravenholm/monk_rant18.wav")
Holy:setString(19,"vo/ravenholm/monk_rant19.wav")
Holy:setString(20,"vo/ravenholm/monk_rant20.wav")
Holy:setString(21,"vo/ravenholm/monk_rant21.wav")
Holy:setString(22,"vo/ravenholm/monk_rant22.wav")
Holy:setString(23,"vo/ravenholm/exit_salvation.wav")
Holy:setString(24,"vo/ravenholm/madlaugh01.wav")
Holy:setString(25,"vo/ravenholm/madlaugh02.wav")
Holy:setString(26,"vo/ravenholm/madlaugh03.wav")
Holy:setString(27,"vo/ravenholm/madlaugh04.wav")

TM+=0.01
if(TM == 0.1){
R++
holoEntity(1):soundPlay(7331,9999,Holy:string(R))
soundVolume(7331,999999)
soundPitch(7331,100)
}
if(TM >= 6){
if(R <= 27){
R++
}else{
R = 0
}
TM = 0    
}

E:setMass(100)
P = E:angles():roll()
V = E:elevation(entity():pos())
Ang=angnorm(ang(0,ANG*2,0) - E:angles())*30
Base = ang(P,P,P)*5
Float = (vec(E:pos():x(),E:pos():y(),Length*4)-E:pos())
E:applyAngForce(Ang*5 + $Ang*50)
E:applyForce(Float*800+$Float*800)


if(duped()){selfDestructAll()}
if(duped()){selfDestructAll()}

####################################################################
## Do not rename the E2 or remove the hint("Made by Failcake",100)##
####################################################################