@name PA Gun
@persist E:entity
@persist P2HI P2HOI P2HC P2HScale P2HBase:entity P2HTable:table
@persist P2H2I P2H2OI P2H2C P2H2Scale P2H2Base:entity P2H2Table:table
@persist Theta Target:vector LocalPos:vector Prop:entity Wait TOF
@model models/sprops/rectangles/size_8/rect_192x192x3.mdl

interval(100)

if(first())
{
    E = entity()
    E:setMaterial("sprops/trans/lights/light_plastic")
    
    #Base for swivel
    holoCreate(0)
    holoAlpha(0, 0)
    holoParent(0, E)
    
    #Gun aim
    holoCreate(1, holoEntity(0):toWorld(vec(0, -78, 68)), vec(), holoEntity(0):toWorld(ang(0, -90, 0)))
    holoParent(1, holoEntity(0))
    
    P2HC = 80
    P2HTI = 0
    P2HOI = 39
    P2HBase = holoEntity(0) #Change to whatever entity you wish
    P2HScale = 1 #Change to whatever scale you'd like your export to be in
    #Model, Material, Skin, Color, Position, and Angle (both position and angle are relative to base)
    P2HTable[7, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0251, -35.9987, 31.5113), ang(0.0005, 90.0044, 0.0005))
    P2HTable[8, array] = array("models/sprops/geometry/fdisc_18.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-37.0736, -77.9994, 70.5088), ang(0.0005, 90.0002, 0.0005))
    P2HTable[9, array] = array("models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-29.9785, 0.0296, 31.5178), ang(-0.0005, 179.707, 0.0005))
    P2HTable[10, array] = array("models/sprops/geometry/fdisc_12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(39.5973, -77.9994, 70.5082), ang(0.0005, 89.9996, 0.0004))
    P2HTable[11, array] = array("models/sprops/prisms/tri/size_3/tprism_12x48.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-0.0182, 42.0059, 7.5035), ang(0.0007, 90.0537, 0.0018))
    P2HTable[12, array] = array("models/sprops/cuboids/height12/size_2/cube_24x24x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-35.9985, 66.001, 7.4997), ang(0.0006, 0.0001, -0.0009))
    P2HTable[13, array] = array("models/sprops/cuboids/height12/size_1/cube_12x24x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-35.9989, 60.0012, 19.4998), ang(0.0005, 0.0058, -0.0006))
    P2HTable[14, array] = array("models/sprops/cuboids/height24/size_3/cube_48x30x24.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-0.0077, -62.9999, 13.5006), ang(-0.0005, -90.0297, -0.0005))
    P2HTable[15, array] = array("models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.005, -35.9711, 67.504), ang(0.0005, 90, 0.0005))
    P2HTable[16, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.0052, -23.972, 67.5039), ang(0.0005, 89.9967, 0.0005))
    P2HTable[17, array] = array("models/sprops/cuboids/height12/size_1/cube_12x24x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0226, -65.9986, 43.5116), ang(-0.0005, -89.9999, -0.0005))
    P2HTable[18, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.0114, -35.9798, 79.5059), ang(0.0005, 89.9947, 0.0005))
    P2HTable[19, array] = array("models/sprops/cuboids/height12/size_1/cube_12x24x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.0086, -77.9995, 55.5082), ang(0.0005, 90.0005, 0.0005))
    P2HTable[20, array] = array("models/sprops/cuboids/height12/size_1/cube_12x48x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-0.0117, 30.0059, 7.5036), ang(0.0005, 0.009, -0.0005))
    P2HTable[21, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.0042, -35.9987, 31.5108), ang(0.0005, 89.9956, 0.0005))
    P2HTable[22, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0169, -23.9977, 43.5151), ang(89.9993, -90.0171, 0))
    P2HTable[23, array] = array("models/sprops/cuboids/height12/size_2/cube_24x24x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-36.0016, -59.9999, 13.5009), ang(-0.0005, 179.9999, -89.9995))
    P2HTable[24, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-29.9477, 12.0296, 31.5177), ang(0.0005, 90.0005, 0.0005))
    P2HTable[25, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0248, 0.0297, 43.5178), ang(0.0005, 90.1498, 0.0005))
    P2HTable[26, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.0093, -71.9997, 31.5082), ang(0.005, -89.9855, -179.9991))
    P2HTable[27, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.005, -47.972, 67.5041), ang(89.9993, -89.9992, 0))
    P2HTable[28, array] = array("models/sprops/cuboids/height12/size_1/cube_12x24x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.0019, -65.9986, 43.5111), ang(-0.0005, -90.0001, -0.0005))
    P2HTable[29, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.0038, -47.9986, 43.5109), ang(0.0005, 89.9802, 0.0005))
    P2HTable[30, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.0054, -11.9722, 55.5037), ang(-89.9991, -90, 0))
    P2HTable[31, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0255, -23.972, 67.5044), ang(0.0005, 90.0033, 0.0005))
    P2HTable[32, array] = array("models/sprops/cuboids/height12/size_1/cube_12x24x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-30.0011, -71.9999, 13.5009), ang(-89.9993, 90.0037, 0))
    P2HTable[33, array] = array("models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.0037, -59.9978, 31.511), ang(0.0005, 0.0001, -0.0004))
    P2HTable[34, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.0106, -59.9994, 67.5081), ang(89.9992, 89.9951, 0))
    P2HTable[35, array] = array("models/sprops/prisms/tri/size_3/tprism_12x24.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(42.0011, -71.9989, 13.5003), ang(-0.0005, -90.0064, -90.0005))
    P2HTable[36, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.0056, -59.9995, 55.5081), ang(0.0005, 90.027, 0.0005))
    P2HTable[37, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0315, -35.9798, 79.5065), ang(0.0005, 90.0052, 0.0005))
    P2HTable[38, array] = array("models/sprops/cuboids/height12/size_2/cube_24x24x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(35.9988, 66.001, 7.4991), ang(-0.0004, 179.9998, 0.0009))
    P2HTable[39, array] = array("models/sprops/cuboids/height12/size_2/cube_24x18x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.0094, -77.9994, 70.5082), ang(89.9993, 179.9972, 0))
    P2HTable[40, array] = array("models/sprops/cuboids/height12/size_2/cube_24x18x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0296, -77.9994, 70.5088), ang(89.9992, 0.0028, 0))
    P2HTable[41, array] = array("models/sprops/cuboids/height12/size_1/cube_12x24x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.029, -77.9995, 55.5088), ang(0.0005, 89.9995, 0.0005))
    P2HTable[42, array] = array("models/sprops/rectangles/size_3_5/rect_30x48x3.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-0.0246, 63.0059, 1.5033), ang(0.0005, 0.0014, -0.0005))
    P2HTable[43, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.0049, -35.9712, 55.504), ang(89.9993, -90.0007, 0))
    P2HTable[44, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0294, -83.9996, 43.5088), ang(-0.0005, -90, 179.9993))
    P2HTable[45, array] = array("models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0152, -11.9977, 43.515), ang(0.0005, 89.9994, 0.0004))
    P2HTable[46, array] = array("models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.0054, -23.9722, 55.5039), ang(0.0005, 90.0001, 0.0005))
    P2HTable[47, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.004, 0.0297, 43.5173), ang(0.0005, 89.8502, 0.0005))
    P2HTable[48, array] = array("models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(29.9945, -11.9977, 43.5145), ang(0.0005, 90.0006, 0.0006))
    P2HTable[49, array] = array("models/sprops/cuboids/height12/size_1/cube_12x48x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.011, -65.9798, 79.5062), ang(0.0005, 90, 0.0005))
    P2HTable[50, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0259, -11.9722, 55.5043), ang(-89.9991, -90, 0))
    P2HTable[51, array] = array("models/sprops/prisms/tri/size_3/tprism_12x24.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(35.999, 72.0002, 19.499), ang(0.0005, 90.0021, 0.0004))
    P2HTable[52, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0302, -71.9997, 31.5087), ang(0.005, -90.0145, 179.9981))
    P2HTable[53, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0254, -35.9712, 55.5045), ang(89.9993, -89.9993, 0))
    P2HTable[54, array] = array("models/sprops/prisms/tri/size_3/tprism_12x48.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-0.0167, 30.006, 19.5036), ang(0.0005, 89.9587, 0.0009))
    P2HTable[55, array] = array("models/sprops/cuboids/height12/size_1/cube_12x48x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.031, -65.9798, 79.5067), ang(0.0005, 89.9999, 0.0005))
    P2HTable[56, array] = array("models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(29.9576, 0.0296, 31.5173), ang(0.0005, 0.293, -0.0005))
    P2HTable[57, array] = array("models/sprops/cuboids/height24/size_1/cube_24x108x24.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(36.0004, 0.0001, 13.4997), ang(0.0005, 90.0016, 0.0006))
    P2HTable[58, array] = array("models/sprops/cuboids/height24/size_3/cube_48x72x24.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-0.0106, -11.994, 13.505), ang(0.0005, 89.9997, 0.0006))
    P2HTable[59, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0253, -47.972, 67.5046), ang(89.9993, -90.0008, 0))
    P2HTable[60, array] = array("models/sprops/cuboids/height12/size_2/cube_24x24x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(36.0018, -59.9999, 13.5002), ang(0.0005, 0, 89.9995))
    P2HTable[61, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0261, -59.9995, 55.5086), ang(0.0005, 89.973, 0.0005))
    P2HTable[62, array] = array("models/sprops/cuboids/height24/size_1/cube_24x108x24.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-35.9999, 0.0001, 13.5003), ang(0.0005, 89.9984, 0.0004))
    P2HTable[63, array] = array("models/sprops/geometry/fdisc_12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-39.6175, -77.9994, 70.5089), ang(0.0005, 90.0004, 0.0006))
    P2HTable[64, array] = array("models/sprops/prisms/tri/size_3/tprism_12x24.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-42.0009, -71.9989, 13.501), ang(-0.0005, -89.9936, 89.9995))
    P2HTable[65, array] = array("models/sprops/geometry/fdisc_18.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(37.0534, -77.9994, 70.5082), ang(0.0005, 89.9998, 0.0005))
    P2HTable[66, array] = array("models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.0037, -47.9987, 31.5109), ang(-0.0005, 179.9999, 0.0006))
    P2HTable[67, array] = array("models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0246, -47.9987, 31.5114), ang(0.0005, 0.0001, -0.0006))
    P2HTable[68, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.009, -11.9704, 31.518), ang(89.9993, -89.9995, 0))
    P2HTable[69, array] = array("models/sprops/prisms/tri/size_3/tprism_12x24.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-35.9984, 72.0002, 19.4997), ang(0.0005, 89.9979, 0.0005))
    P2HTable[70, array] = array("models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0253, -35.9711, 67.5045), ang(0.0005, 90, 0.0005))
    P2HTable[71, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(30.0087, -83.9996, 43.5083), ang(-0.0005, -90, 179.9997))
    P2HTable[72, array] = array("models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0259, -23.9722, 55.5044), ang(0.0005, 89.9998, 0.0005))
    P2HTable[73, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0245, -47.9986, 43.5114), ang(0.0005, 90.0198, 0.0005))
    P2HTable[74, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(29.9962, -23.9977, 43.5146), ang(89.9993, -89.9829, 0))
    P2HTable[75, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(29.9881, -11.9704, 31.5174), ang(89.9993, -90.0005, 0))
    P2HTable[76, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0309, -59.9994, 67.5086), ang(89.9992, 90.0049, 0))
    P2HTable[77, array] = array("models/sprops/cuboids/height12/size_1/cube_12x24x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(30.0016, -71.9999, 13.5004), ang(-89.9993, 89.9963, 0))
    P2HTable[78, array] = array("models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-30.0246, -59.9978, 31.5116), ang(-0.0005, 179.9999, 0.0004))
    P2HTable[79, array] = array("models/sprops/cuboids/height12/size_1/cube_12x24x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(35.9994, 60.0012, 19.4991), ang(-0.0005, 179.9942, 0.0006))
    P2HTable[80, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(29.9268, 12.0296, 31.5172), ang(0.0005, 89.9995, 0.0005))
    
    P2H2C = 38
    P2H2TI = 0
    P2H2OI = 1
    P2H2Base = holoEntity(1) #Change to whatever entity you wish
    P2H2Scale = 1 #Change to whatever scale you'd like your export to be in
    #Model, Material, Skin, Color, Position, and Angle (both position and angle are relative to base)
    P2H2Table[1, array] = array("models/sprops/cuboids/height12/size_2/cube_24x48x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(54, -0.0001, 0), ang(89.9999, -0.0004, 0))
    P2H2Table[2, array] = array("models/sprops/prisms/tri/size_3/tprism_12x48.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(54.0109, 18.0106, 0), ang(0.0001, 90.1013, 90))
    P2H2Table[3, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(66, -0.0005, -18), ang(89.9999, -0.002, 0))
    P2H2Table[4, array] = array("models/sprops/cuboids/height12/size_1/cube_12x96x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(12, -0.0049, 30), ang(0, -179.9942, 0.0001))
    P2H2Table[5, array] = array("models/sprops/prisms/tri/size_3/tprism_12x48.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(54.0018, -17.9799, 0.0039), ang(-0.0001, -90.0007, -89.9999))
    P2H2Table[6, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(66, -0.0004, 30), ang(0, -0.0006, -0.0001))
    P2H2Table[7, array] = array("models/sprops/cuboids/height12/size_1/cube_12x36x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(66, -0.0004, 6), ang(89.9999, -0.0003, 0))
    P2H2Table[8, array] = array("models/props_phx/misc/potato_launcher_chamber.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-278.6016, -0.0016, -0.0059), ang(89.9998, -0.0008, 0))
    P2H2Table[9, array] = array("models/sprops/geometry/t_fdisc_24.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-208.4785, -0.002, -0.0059), ang(0.0014, 90.0069, 180))
    P2H2Table[10, array] = array("models/sprops/misc/tubes_thin/size_1/t_tube_12x144.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-208.4785, -0.002, -0.0059), ang(0.0001, 90.0234, -0.0001))
    P2H2Table[11, array] = array("models/sprops/prisms/tri/size_2/tprism_6x72.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-95.9999, 15.0004, 9), ang(0.0001, 89.9998, 0))
    P2H2Table[12, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(145, 145, 145, 255), vec(-53.9726, 12.0019, 18), ang(-0.0006, 89.7558, -0.0012))
    P2H2Table[13, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(145, 145, 145, 255), vec(-54.0018, 17.9994, 12.0009), ang(0.0001, 89.993, 0.0001))
    P2H2Table[14, array] = array("models/sprops/prisms/tri/size_2/tprism_6x72.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-96.0001, -14.9999, -9), ang(-0.0001, -90.0006, 179.9998))
    P2H2Table[15, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(145, 145, 145, 255), vec(-54.0001, -18.0253, -12.0254), ang(-0.2421, -90.0003, -179.9999))
    P2H2Table[16, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(145, 145, 145, 255), vec(-54.0001, -18.0001, 12.001), ang(-0.0001, -90.0005, 0))
    P2H2Table[17, array] = array("models/sprops/cuboids/height06/size_2/cube_12x72x6.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-96, 0.0011, -15), ang(0, -179.9991, -179.9996))
    P2H2Table[18, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(145, 145, 145, 255), vec(-54.0009, 17.9994, -12), ang(89.9999, 89.9998, 0))
    P2H2Table[19, array] = array("models/sprops/prisms/tri/size_2/tprism_6x72.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-96.0001, -8.9996, -15), ang(89.9999, -90.0003, 0))
    P2H2Table[20, array] = array("models/sprops/cuboids/height06/size_2/cube_12x72x6.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-96.0001, -14.9994, 0), ang(0, -180, 90.0001))
    P2H2Table[21, array] = array("models/sprops/cuboids/height24/size_1/cube_24x84x24.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-90, 0.0001, 0), ang(0, 179.9995, 0.0001))
    P2H2Table[22, array] = array("models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(145, 145, 145, 255), vec(-53.9999, 17.9994, 0), ang(0, -179.9935, 0.0001))
    P2H2Table[23, array] = array("models/sprops/prisms/tri/size_2/tprism_6x72.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-95.9999, 9.0001, -15), ang(89.9999, 89.9997, 0))
    P2H2Table[24, array] = array("models/sprops/prisms/tri/size_2/tprism_6x72.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-96.0001, -8.9998, 14.999), ang(-0.0001, -90.0009, 0))
    P2H2Table[25, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(145, 145, 145, 255), vec(-54.002, -11.9984, 18), ang(-0.0001, -90.0015, 0))
    P2H2Table[26, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(145, 145, 145, 255), vec(-53.9989, 12.0006, -18), ang(89.9989, 89.9997, 0))
    P2H2Table[27, array] = array("models/sprops/cuboids/height06/size_2/cube_12x72x6.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-96, 0.0002, 14.999), ang(0, 179.9992, -179.9997))
    P2H2Table[28, array] = array("models/sprops/prisms/tri/size_2/tprism_6x72.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-95.9999, 9.0002, 14.999), ang(0.0001, 89.9997, 0.0001))
    P2H2Table[29, array] = array("models/sprops/misc/tubes_thin/size_2/t_tube_24x84.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-165.7285, -0.0048, -0.0059), ang(0.0001, 89.9954, 0))
    P2H2Table[30, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(145, 145, 145, 255), vec(-54.0001, -11.9997, -18), ang(89.9999, -90.0005, 0))
    P2H2Table[31, array] = array("models/sprops/cuboids/height06/size_2/cube_12x72x6.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-95.9999, 15.0006, 0), ang(0, -179.9996, 90.0001))
    P2H2Table[32, array] = array("models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(145, 145, 145, 255), vec(-54, 0.0003, -18), ang(0.0006, 179.9975, -0.0006))
    P2H2Table[33, array] = array("models/sprops/prisms/tri/size_2/tprism_6x72.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-95.9999, 15.0006, -9), ang(0.0001, 90, -179.9999))
    P2H2Table[34, array] = array("models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(145, 145, 145, 255), vec(-54.0001, -18.0001, 0), ang(0, 179.9993, 0.0002))
    P2H2Table[35, array] = array("models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(145, 145, 145, 255), vec(-54, 0.0016, 18), ang(0.0006, 179.9846, -0.0004))
    P2H2Table[36, array] = array("models/sprops/prisms/tri/size_2/tprism_6x72.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(-95.9981, -15.0242, 9), ang(-0.0004, -90.0394, -0.0002))
    P2H2Table[37, array] = array("models/sprops/prisms/tri/size_3/tprism_12x12.mdl", "sprops/trans/lights/light_plastic", 0, vec4(72, 72, 72, 255), vec(-42, -0.0099, 30), ang(0, 179.9996, 0.0001))
    P2H2Table[38, array] = array("models/sprops/cuboids/height48/size_1/cube_48x96x48.mdl", "sprops/trans/lights/light_plastic", 0, vec4(80, 93, 67, 255), vec(0, 0, 0), ang())
}

if(P2H2I < P2H2C)
{
    interval(500)
    while(perf() & holoCanCreate() & P2H2I < P2H2C)
    {
        P2H2I++
        local TA = P2H2Table[P2H2I, array]
        local TI = P2H2I + P2H2OI

        holoCreate(TI, P2H2Base:toWorld(TA[5, vector] * P2H2Scale), vec(P2H2Scale), P2H2Base:toWorld(TA[6, angle]))
        holoModel(TI, TA[1, string])
        holoMaterial(TI, TA[2, string])
        holoSkin(TI, TA[3, number])
        holoColor(TI, TA[4, vector4])
        holoParent(TI, P2H2Base)
    }
}
elseif(P2HI < P2HC)
{
    interval(500)
    while(perf() & holoCanCreate() & P2HI < P2HC)
    {
        P2HI++
        local TA = P2HTable[P2HI, array]
        local TI = P2HI + P2HOI

        holoCreate(TI, P2HBase:toWorld(TA[5, vector] * P2HScale), vec(P2HScale), P2HBase:toWorld(TA[6, angle] * P2HScale))
        holoModel(TI, TA[1, string])
        holoMaterial(TI, TA[2, string])
        holoSkin(TI, TA[3, number])
        holoColor(TI, TA[4, vector4])
        holoParent(TI, P2HBase)
    }
}

Target = owner():aimPos()
LocalPos = Target - holoEntity(1):pos()
Dist = LocalPos:length()
Vel = 4000 #4000 max
Theta = 0.5*asin((600*LocalPos:length()) / Vel^2)
TOF = LocalPos:length()/(Vel*cos(90-Theta))
Angle = ang(Theta, (Target - holoEntity(1):pos()):toAngle():yaw(), 0)

#Swievel
holoAng(0, ang(0, Angle[2] - 90, 0))
holoAng(1, Angle + ang(90, 0, 0))

R = owner():keyReload()
if(changed(R) & R)
{
    Prop = propSpawn("models/props_junk/watermelon01.mdl", holoEntity(1):pos(), holoEntity(1):toWorld(ang(180, 0, 0)), 0)
    E:soundPlay(1,0.826,"weapons/mortar/mortar_fire1.wav")
    Prop:setMass(500)
    Prop:applyForce(Prop:forward() * Prop:mass() * Vel)
    Prop:setTrails(12,100,1,"trails/smoke",vec(255,255,255),255)
    Prop:propDrag(0)
}
