Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.95 KB | None | 0 0
  1. @name LaserGUN
  2. @persist [B1 B2 B3]:entity [R1 R2 R3]:ranger V Alp
  3.  
  4. #[
  5. ## >->->->> A32M Facility Product. All rights reserved (2016) <<-<-<-<
  6. ## NON FULLY ENDED VERSION
  7. ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  8. ## _______ _________ _________ __ __
  9. ## / \ |______ \ |_______ \ | \ / |
  10. ## / / \ \ '\ \ \ ' | \ \ / / |
  11. ## | | | | '/ / / / | |\ \ / /| |
  12. ## | |___| | '/ | / / | | \ \ / / | |
  13. ## | ___ | \ \ / / | | \ / / | |
  14. ## | | | | \ \ / / | | | |/ | |
  15. ## | | | | ______/ / / /______ | | | | | |
  16. ## |__| |__| |________/ |________| |_| |_| |_|
  17. ]#
  18.  
  19.  
  20. E = entity(),O=owner()
  21.  
  22. E:setAlpha(0)
  23.  
  24. if(first()){
  25.  
  26. holoCreate(0, E:toWorld(vec()),vec(), E:toWorld(ang())), holoParent(0,E)
  27. holoCreate( 2000, O:attachmentPos("anim_attachment_RH"), vec(), O:attachmentAng("anim_attachment_RH") ), holoParentAttachment(2000, O, "anim_attachment_RH")
  28.  
  29. function placeToHands(){
  30.  
  31. HAND = holoEntity(2000)
  32.  
  33. holoParent( 0, HAND )
  34.  
  35. holoPos(0, HAND:toWorld(vec(10,0,-11)))
  36. holoAng(0, HAND:toWorld(ang(-10,-0,4)))
  37.  
  38. }
  39.  
  40. local E = holoEntity(0)
  41.  
  42. holoCreate(1, E:toWorld(vec(0,0,15)), vec(0.2, 0.2, 1), E:toWorld(ang(90,0,0)), vec(255), "hq_tube_thin"), holoParent(1, E),holoColor(1,vec(50,50,50)),holoAlpha(1,175)
  43. holoCreate(2, E:toWorld(vec(-3,0,15)), vec(0.22, 0.22, 0.5), E:toWorld(ang(90,0,0)), vec(255), "hq_tube_thin"), holoParent(2, E),holoMaterial(2,"models/shiny"),holoColor(2,vec(255,0,0))
  44. holoCreate(3, E:toWorld(vec(3,0,15)), vec(0.22, 0.22, 0.25), E:toWorld(ang(90,0,0)), vec(255), "hq_tube_thin"), holoParent(3, E),holoMaterial(3,"models/shiny"),holoColor(3,vec(255,0,0))
  45. holoCreate(4, E:toWorld(vec(1,0,15)), vec(0.22, 0.22, 0.01), E:toWorld(ang(90,0,0)), vec(255), "hq_tube_thin"), holoParent(4, E),holoMaterial(4,"models/shiny"),holoColor(4,vec(255,127.5,0))
  46. holoCreate(5, E:toWorld(vec(0.75,0,15)), vec(0.22, 0.22, 0.01), E:toWorld(ang(90,0,0)), vec(255), "hq_tube_thin"), holoParent(5, E),holoMaterial(5,"models/shiny"),holoColor(5,vec(255,127.5,0))
  47. holoCreate(6, E:toWorld(vec(0.5,0,15)), vec(0.22, 0.22, 0.01), E:toWorld(ang(90,0,0)), vec(255), "hq_tube_thin"), holoParent(6, E),holoMaterial(6,"models/shiny"),holoColor(6,vec(255,127.5,0))
  48. holoCreate(7, E:toWorld(vec(1,0,16.375)), vec(0.01, 0.01, 1.15), E:toWorld(ang(90,0,0)), vec(255), "cube"), holoParent(7, E),holoMaterial(7,"models/shiny"),holoColor(7,vec(0,255,255))
  49. holoCreate(8, E:toWorld(vec(5.5,0,15)), vec(0.22, 0.22, 0.01), E:toWorld(ang(90,0,0)), vec(255), "hq_tube_thin"), holoParent(8, E),holoMaterial(8,"models/shiny"),holoColor(8,vec(0,0,0))
  50. holoCreate(9, E:toWorld(vec(6,0,15)), vec(0.22, 0.22, 0.01), E:toWorld(ang(90,0,0)), vec(255), "hq_tube_thin"), holoParent(9, E),holoMaterial(9,"models/shiny"),holoColor(9,vec(0,0,0))
  51. holoCreate(10, E:toWorld(vec(0,0,15)), vec(0.1, 0.1, 1), E:toWorld(ang(90,0,0)), vec(255), "hq_tube_thin"), holoParent(10, E), holoAlpha(10, 150), holoMaterial(10, "models/shiny"),holoColor(10,vec(0,255,255))
  52. holoCreate(11, E:toWorld(vec(1,0,13.675)), vec(0.01, 0.01, 1.15), E:toWorld(ang(90,0,0)), vec(255), "cube"), holoParent(11, E),holoMaterial(11,"models/shiny"),holoColor(11,vec(0,255,255))
  53. holoCreate(12, E:toWorld(vec(7.6,0,15)), vec(0.22, 0.22, 0.05), E:toWorld(ang(90,0,0)), vec(255), "hq_tube_thin"), holoParent(12, E),holoMaterial(12,"models/shiny"),holoColor(12,vec(0,0,0))
  54. holoCreate(13, E:toWorld(vec(7.6,0,15)), vec(0.22, 0.22, 0.005), E:toWorld(ang(90,0,0)), vec(255), "hq_tube_thick"), holoParent(13, E),holoColor(13,vec(0,0,0)),holoMaterial(13,"models/shiny")
  55. holoCreate(14, E:toWorld(vec(7.6,0,15)), vec(0.132, 0.132, 0.05), E:toWorld(ang(90,0,0)), vec(255), "hq_tube_thin"), holoParent(14, E),holoColor(14,vec(0,255,255)),holoMaterial(14,"models/shiny")
  56. holoCreate(15, E:toWorld(vec(7.6,0,15)), vec(0.12, 0.12, 0.05), E:toWorld(ang(90,0,0)), vec(0), "hq_tube_thin"), holoParent(15, E), holoMaterial(15, "lights/white"),holoColor(15,vec(0,0,0))
  57. holoCreate(16, E:toWorld(vec(6,0,15)), vec(0.22, 0.22, 0.005), E:toWorld(ang(90,0,0)), vec(255), "hq_tube_thick"), holoParent(16, E),holoColor(16,vec(0,0,0)),holoMaterial(16,"models/shiny")
  58. holoCreate(17, E:toWorld(vec(-7,0,15)), vec(0.3,0.3,0.25), E:toWorld(ang(90,0,0)), vec(255), "models/holograms/hexagon.mdl"), holoParent(17, E),holoColor(17,vec(0,0,0))
  59. holoCreate(18, E:toWorld(vec(-7.1,0,15)), vec(0.28,0.28,0.25), E:toWorld(ang(90,0,0)), vec(255), "models/holograms/hexagon.mdl"), holoParent(18, E),holoColor(18,vec(0,0,0))
  60. holoCreate(19, E:toWorld(vec(-7,0,15)), vec(0.315,0.315,0.23), E:toWorld(ang(90,0,0)), vec(255), "models/holograms/hexagon.mdl"), holoParent(19, E),holoColor(19,vec(50,50,50)),holoMaterial(19,"models/shiny")
  61. holoCreate(20, E:toWorld(vec(-7,0,13)), vec(0.5,0.1,0.1), E:toWorld(ang(110,0,0)), vec(255) , "models/holograms/hq_rcube_thick.mdl"),holoParent(20,E),holoColor(20,vec(50,50,50)),holoMaterial(20,"models/shiny")
  62. holoCreate(21, E:toWorld(vec(-6.4,0,13)), vec(0.1,0.020,0.020), E:toWorld(ang(30,0,0)), vec(255) , "models/holograms/cube.mdl"),holoParent(21,E),holoColor(21,vec(0,255,255))
  63. holoCreate(22, E:toWorld(vec(-5.78,0,12.7)), vec(0.030,0.020,0.020), E:toWorld(ang(0,0,0)), vec(255) , "models/holograms/cube.mdl"),holoParent(22,E),holoColor(22,vec(0,255,255))
  64. holoCreate(23, E:toWorld(vec(-5.51,0,12.8)), vec(0.031,0.020,0.020), E:toWorld(ang(-44,0,0)), vec(255) , "models/holograms/cube.mdl"),holoParent(23,E),holoColor(23,vec(0,255,255))
  65. holoCreate(24, E:toWorld(vec(-5.421,0,13.020)), vec(0.031,0.020,0.020), E:toWorld(ang(-90,0,0)), vec(255) , "models/holograms/cube.mdl"),holoParent(24,E),holoColor(24,vec(0,255,255))
  66. holoCreate(25, E:toWorld(vec(-5.469,0,13.261)), vec(0.031,0.020,0.020), E:toWorld(ang(-120,0,0)), vec(255) , "models/holograms/cube.mdl"),holoParent(25,E),holoColor(25,vec(0,255,255))
  67. holoCreate(26, E:toWorld(vec(-6.2,0,13.210)), vec(0.020,0.010,0.010), E:toWorld(ang(-130,0,0)), vec(255) , "models/holograms/cube.mdl"),holoParent(26,E),holoColor(26,vec(0,0,0))
  68. holoCreate(27, E:toWorld(vec(-6.060,0,13.090)), vec(0.020,0.010,0.010), E:toWorld(ang(-160,0,0)), vec(255) , "models/holograms/cube.mdl"),holoParent(27,E),holoColor(27,vec(0,0,0))
  69. holoCreate(28, E:toWorld(vec(-8,0,15)), vec(0.300,0.300,0.23), E:toWorld(ang(90,0,0)), vec(255), "models/holograms/hexagon.mdl"), holoParent(28, E),holoColor(28,vec(0,0,0))
  70. holoCreate(29, E:toWorld(vec(-8.1,0,15)), vec(0.280,0.280,0.23), E:toWorld(ang(90,0,0)), vec(255), "models/holograms/hexagon.mdl"), holoParent(29, E),holoColor(29,vec(0,0,0)),holoMaterial(29,"models/shiny")
  71. holoCreate(30, E:toWorld(vec(-8.2,0,15)), vec(0.250,0.250,0.23), E:toWorld(ang(90,0,0)), vec(255), "models/holograms/hexagon.mdl"), holoParent(30, E),holoColor(30,vec(0,0,0)),holoMaterial(30,"models/shiny")
  72. holoCreate(31, E:toWorld(vec(-8.3,0,15)), vec(0.220,0.220,0.23), E:toWorld(ang(90,0,0)), vec(255), "models/holograms/hexagon.mdl"), holoParent(31, E),holoColor(31,vec(0,0,0)),holoMaterial(31,"models/shiny")
  73. holoCreate(32, E:toWorld(vec(-8.4,0,15)), vec(0.200,0.200,0.23), E:toWorld(ang(90,0,0)), vec(255), "models/holograms/hexagon.mdl"), holoParent(32, E),holoColor(32,vec(0,0,0)),holoMaterial(32,"models/shiny")
  74. holoCreate(33, E:toWorld(vec(-8.5,0,15)), vec(0.180,0.180,0.23), E:toWorld(ang(90,0,0)), vec(255), "models/holograms/hexagon.mdl"), holoParent(33, E),holoColor(33,vec(0,0,0)),holoMaterial(33,"models/shiny")
  75. holoCreate(34, E:toWorld(vec(-8.6,0,15)), vec(0.160,0.160,0.23), E:toWorld(ang(90,0,0)), vec(255), "models/holograms/hexagon.mdl"), holoParent(34, E),holoColor(34,vec(0,0,0)),holoMaterial(34,"models/shiny")
  76. holoCreate(35, E:toWorld(vec(-9.950,0.552,15)), vec(0.035,0.035,0.035), E:toWorld(ang(0,90,0)), vec(255), "models/sprops/misc/alphanum/alphanum_a.mdl"), holoParent(35, E),holoColor(35,vec(0,80,80)),holoMaterial(35,"lights/white")
  77. holoCreate(36, E:toWorld(vec(-9.950,0.162,15)), vec(0.035,0.035,0.035), E:toWorld(ang(0,90,0)), vec(255), "models/sprops/misc/alphanum/alphanum_3.mdl"), holoParent(36, E),holoColor(36,vec(0,80,80)),holoMaterial(36,"lights/white")
  78. holoCreate(37, E:toWorld(vec(-9.950,-0.172,15)), vec(0.035,0.035,0.035), E:toWorld(ang(0,90,0)), vec(255), "models/sprops/misc/alphanum/alphanum_2.mdl"), holoParent(37, E),holoColor(37,vec(0,80,80)),holoMaterial(37,"lights/white")
  79. holoCreate(38, E:toWorld(vec(-9.950,-0.550,15)), vec(0.035,0.035,0.035), E:toWorld(ang(0,90,0)), vec(255), "models/sprops/misc/alphanum/alphanum_m.mdl"), holoParent(38, E),holoColor(38,vec(0,80,80)),holoMaterial(38,"lights/white")
  80.  
  81. # holoUnparent(0)
  82.  
  83. timer("APPR_HAND", 1)
  84.  
  85. }
  86.  
  87. interval(25)
  88.  
  89.  
  90. V = 1
  91.  
  92. rangerPersist(1)
  93. rangerFilter(O)
  94. rangerFilter(O:weapon())
  95.  
  96. function shoot( ) {
  97.  
  98. V = 0
  99. Alp = 255
  100.  
  101. R1 = rangerOffset(34e3, holoEntity(1):pos(), ( ( O:aimPos() ) - holoEntity(1):pos() ) )
  102. R2 = rangerOffset(34e3, holoEntity(1):pos(), ( ( O:aimPos() ) - holoEntity(1):pos() ) )
  103. R3 = rangerOffset(34e3, holoEntity(1):pos(), ( ( O:aimPos() ) - holoEntity(1):pos() ) )
  104.  
  105. B1 = drawBeam("trails/laser", holoEntity(1):pos(), R1:position(), vec(255,0,0), 255, 6)
  106. B2 = drawBeam("trails/laser", holoEntity(1):pos(), R2:position(), vec(0,255,0), 255, 6)
  107. B3 = drawBeam("trails/laser", holoEntity(1):pos(), R3:position(), vec(0,0,255), 255, 6)
  108.  
  109. B1:remove( random(1, 2) )
  110. B2:remove( random(1.5, 2.5) )
  111. B3:remove( random(2, 3) )
  112.  
  113. O:setVel(-O:eye() * 300 )
  114.  
  115. for(I = 1,10){
  116.  
  117. O:soundPlay(I, 4, "npc/turret_floor/die.wav"), soundPitch(I, randint(80 + I*4, 120 + I*6))
  118. O:soundPlay(11 + I, 5, "npc/roller/blade_out.wav"), soundPitch(11 + I, randint(40 + I*4, 120 + I*10))
  119.  
  120. }
  121.  
  122. local N = table(R1, R2, R3)
  123.  
  124. for(I = 1, 3){
  125.  
  126. local RR = N[I, ranger]
  127.  
  128. if(RR:entity():isValid()){
  129.  
  130. RR:entity():takeDamage(random(9000,9234324), noentity(), noentity())
  131. RR:entity():removeConstraint("Weld")
  132. RR:entity():propFreeze(0)
  133. RR:entity():setVel(O:eye()*500000)
  134.  
  135.  
  136. }
  137.  
  138. timer("asdf", 100000)
  139.  
  140. }
  141.  
  142. }
  143.  
  144.  
  145. Alp -= Alp/50
  146.  
  147. if(floor(Alp) < 2){
  148.  
  149. Alp = 0
  150.  
  151. }
  152.  
  153. if(changed(floor(Alp))&Alp > 2){
  154.  
  155. local N = table(B1, B2, B3)
  156.  
  157. for(I = 1,3){
  158.  
  159. N[I, entity]:setAlpha(Alp - I*25)
  160.  
  161. }
  162.  
  163. }
  164.  
  165. for(I = 1, 38){
  166.  
  167. if(O:weapon():type()=="weapon_shotgun"){
  168.  
  169. O:weapon():setAlpha(0)
  170.  
  171. holoAlpha(I,255)
  172.  
  173. }
  174.  
  175. else{
  176.  
  177. holoAlpha(I,0)
  178.  
  179. }
  180.  
  181. }
  182.  
  183. if( changed(O:keyPressed("MOUSE_MIDDLE"))&O:keyPressed("MOUSE_MIDDLE")&O:weapon():type() == "weapon_shotgun" & V ) {
  184.  
  185. shoot()
  186.  
  187. }
  188.  
  189. if(clk("asdf")){
  190.  
  191. V = 1
  192.  
  193. }
  194.  
  195.  
  196. if(clk("APPR_HAND")){
  197.  
  198. placeToHands()
  199.  
  200.  
  201. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement