Advertisement
KrazziPro

PewPew Death Ray

Apr 24th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.24 KB | None | 0 0
  1. @name Death Ray
  2. @inputs
  3. @outputs Pew:entity Grenade:entity
  4. @persist
  5. @trigger
  6. @model models/Gibs/HGIBS.mdl
  7.  
  8. name(“Death Ray”)
  9.  
  10. #Hide the chip
  11. entity():setColor(0,0,0,0)
  12. O = owner()
  13. runOnTick(1)
  14.  
  15.  
  16. runOnTick(1)
  17. runOnChat(1)
  18.  
  19. if(first()) {
  20. print("Say \"del\" to remove! and the weapon is hands")
  21. print("Say \"del to remove! and the weapon is hands")
  22. print("Say \"http://steamcommunity.com/sharedfiles/filedetails/?id=138007714")
  23. }
  24. if(duped()) {
  25. reset()
  26. }
  27.  
  28. Pew:pewFire(0)
  29. Grenade:pewFire(0)
  30. if(Pew:isValid() == 0) {
  31. Pew = pewCreate("Beam Laser","models/hunter/plates/plate025x025.mdl",entity():pos(),entity():angles(),"forward") #Left Clicker
  32. Pew:propNotSolid(1)
  33. Pew:propStatic(1)
  34. Pew:propDraw(0)
  35. }
  36. if(Grenade:isValid() == 0) {
  37. Grenade = pewCreate("Beam Laser","models/hunter/plates/plate025x025.mdl",entity():pos(),entity():angles(),"forward") #Right Clicker
  38. Grenade:propNotSolid(1)
  39. Grenade:propStatic(1)
  40. Grenade:propDraw(0)
  41. }
  42.  
  43. if(owner():weapon():type() == "weapon_physcannon") {
  44. if(owner():keyAttack2()) {
  45. Pew:pewFire(1)
  46. }
  47. }
  48. if(owner():weapon():type() == "weapon_physcannon") {
  49. if(owner():keyAttack1()) {
  50. Grenade:pewFire(1)
  51. }
  52. }
  53. ##############################################################################
  54. #Artilleries:
  55. # Basic Artillery
  56. # Modifiable Artillery
  57. # Nebelwerfer
  58. # Rocket Barrage
  59.  
  60. #Bombs and Explosives:
  61. # Bomb Rack
  62. # C4
  63. # Carpet Bomber
  64. # EMP Bomb
  65. # Helicopter Bomb
  66. # Warhead
  67.  
  68. #Cannons:
  69. # 37mm Cannon
  70. # 40mm Cannon
  71. # 105mm Cannon
  72. # 230mm Cannon
  73. # Basic Cannon
  74. # EMP Cannon
  75. # Flak Cannon
  76. # Plasma Bomb
  77. # Railgun
  78.  
  79. #Close Combat:
  80. # Fist
  81. # Flamethrower
  82. # Laser Sword
  83.  
  84. #Defense:
  85. # Regenerator
  86. # Automatic Defense
  87. # Manual Defense
  88.  
  89. #Fun:
  90. # Firework
  91. # Water Balloon
  92.  
  93. #Lasers:
  94. # Basic Laser
  95. # Beam Laser
  96. # Laser Machinegun
  97. # Medium Laser
  98.  
  99. #Launchers and Spawners:
  100. # C4 Spawner
  101. # Grenade Launcher
  102. # Smoke Grenade Launcher
  103.  
  104. #Machineguns:
  105. # 50 Cal Machinegun
  106. # 100 Cal Explosive Rounds
  107. # Basic Machinegun
  108. # Burst Machinegun
  109. # Gauss Gun
  110. # Minigun
  111.  
  112. #Naval:
  113. # Naval Mine
  114. # Naval Mine Spawner
  115. # Torpedo
  116.  
  117. #Other:
  118. # Delayed Sticky-Bomb Launcher
  119. # Flame Shell
  120. # Smoke Emitter
  121. # Thud Rounds
  122. # Unrealistic Railgun
  123.  
  124. ##############################################################################
  125. Pew:setAng(owner():eyeAngles())
  126. Grenade:setAng(owner():eyeAngles())
  127.  
  128. Angle = Pew:angles() + ang(0,-10,0)
  129. SinAng = Angle:yaw()
  130. Speed = 20
  131.  
  132. Pos = owner():pos()+vec(0,0,65)+(vec(0,0,-35)*owner():isCrouch())
  133. Pos = Pos + vec(Speed*sin(SinAng+90)*sin(Angle:pitch()+90), Speed*sin(SinAng)*sin(Angle:pitch()+90), Speed*sin(Angle:pitch()+180))
  134. Pew:setPos(Pos)
  135.  
  136. Angle = Grenade:angles() + ang(0,0,0)
  137. SinAng = Angle:yaw()
  138.  
  139. Pos = owner():pos()+vec(0,0,65)+(vec(0,0,-35)*owner():isCrouch())
  140. Pos = Pos + vec(Speed*sin(SinAng+90)*sin(Angle:pitch()+90), Speed*sin(SinAng)*sin(Angle:pitch()+90), Speed*sin(Angle:pitch()+180))
  141. Grenade:setPos(Pos)
  142.  
  143. if(lastSaid() == "del") {
  144. if(lastSpoke() == owner()) {
  145. if(chatClk()) {
  146. Pew:propDelete()
  147. Grenade:propDelete()
  148. selfDestruct()
  149. }
  150. }
  151. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement