Advertisement
Guest User

fsd

a guest
Jul 21st, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.86 KB | None | 0 0
  1. @name MediumMech V2 2
  2. @inputs
  3. @outputs
  4. @persist [Seat None Prop1]:entity Parent [R1 R2 R3 R4 JumpRan]:ranger ChargeJump Jump JumpPower Cosin Plus RunAngler HoloCount
  5. @persist Hangler:array HoloVel:vector Poss:vector Teeth MouthOpener MouthOpen Shooting StartJump JumpStraightUp Direction:vector
  6. @persist Slide
  7. @trigger
  8. @model models/hunter/blocks/cube05x05x05.mdl
  9. interval(100)
  10.  
  11. E = entity()
  12. UpHover = 60
  13. LegLength = 50
  14. TimeStep = 250
  15. HitGr = 110
  16. FB = 65
  17. RL = 30
  18. Step = 90
  19. if( E ){
  20. E:setMass(50000)
  21. E:setAlpha(0)
  22. if(!Seat){
  23. findByClass("prop_vehicle_prisoner_pod")
  24. findSortByDistance(E:pos())
  25. if(find():owner()==owner()){
  26. Seat = find()
  27. Seat:setAlpha(255 )
  28. }
  29. }
  30. Driver = Seat:driver()
  31. Seat:propNotSolid(Driver ? 1 : 0)
  32.  
  33.  
  34. rangerFilter(players())
  35. rangerFilter(E)
  36. Gran = rangerOffset(99999,E:toWorld(vec()),E:up()*-1):distance()
  37. Ground = (Gran<= HitGr)
  38. Ground2 = (Gran<= HitGr+15)
  39. }
  40. if(Seat){
  41. Driver = Seat:driver()
  42. if(Driver){
  43. W=Driver:keyForward()
  44. A=Driver:keyLeft()
  45. S=Driver:keyBack()
  46. D=Driver:keyRight()
  47. Space=Driver:keyJump()
  48. Shift=Driver:keySprint()
  49. Alt=Driver:keyWalk()
  50. Mouse1=Driver:keyAttack1()
  51. Mouse2=Driver:keyAttack2()
  52. }
  53. }
  54. if(!Driver){
  55. UpHover = UpHover / 2
  56. }
  57. 3# Color = random(255),random(255),random(255)
  58. if(changed(E)){
  59.  
  60.  
  61.  
  62. function entity c(Index:number,Posi:vector,Scale:vector,Angle:angle,Colo:vector,Model:string,Parent:entity,Alpha:number){
  63. holoCreate(Index) holoPos(Index,Posi) holoScale(Index,Scale) holoAng(Index,Angle) holoColor(Index,Colo) holoModel(Index,Model)
  64. holoParent(Index,Parent) holoAlpha(Index,Alpha)
  65. return holoEntity(Index)
  66. }
  67. function string opri(Message:string,ColorM:vector){
  68. Seat:printColorDriver(vec(255),"[",vec(255,0,0),"E2",vec(255),"]",ColorM,Message)
  69. }
  70. function vector entity:towv(VectorW:vector){
  71. return This:toWorld(VectorW)
  72. }
  73.  
  74. function angle entity:towa(AngleW:angle){
  75. return This:toWorld(AngleW)
  76. }
  77. function entity holop(HT,Vectos:vector){
  78. holoPos(HT,Vectos)
  79. }
  80.  
  81. function entity holoa(Ho,Angl:angle){
  82. holoAng(Ho,Angl)
  83. }
  84. function number co(A, B, C){
  85. return acos((A^2 + B^2 - C^2) / (2*A*B))
  86. }
  87. function angle ik(L1,L2,Hip:vector,End:vector,I1,I2,Bs:entity){
  88.  
  89. local Rotation = ang(0, 0, 0)
  90. local Axis1 = End-Hip
  91. local Axis = Bs:toLocalAxis(Axis1):rotate(Rotation)
  92. local Angle=Axis:toAngle():setRoll(-bearing(Hip,Bs:angles(),End))
  93. local Dist=min(Axis:length(),L1+L2)
  94. local Quat=quat(angnorm(Angle))*qRotation(vec(0,90+angnorm(co(round(Dist),L1,L2)),0))
  95. holoa(I1,Bs:towa(Quat:toAngle()))
  96. holoa(I2,holoEntity(I1):towa(ang(angnorm(co(L2, L1, round(Dist)))+180,0,0)))
  97.  
  98. }
  99.  
  100. function entity entity:parentent(Entity2:entity,PositionToSet:vector,AngleToSet:angle){
  101. Entity_1 = This
  102. if(Entity_1&Parent == 0){
  103. Entity_1:setPos(PositionToSet)
  104. Entity_1:setAng(AngleToSet)
  105. Entity_1:propFreeze(1)
  106. timer("parent",2000)
  107. }
  108. if(clk("parent")){
  109. stoptimer("parent")
  110. Entity_1:parentTo(Entity2)
  111. Parent = 1
  112. }
  113. if(!Entity_1){
  114. Parent = 0
  115. }
  116. }
  117. function vector entity:hover(H1,H2,H3,H4,UpPos:number,Power:number,VeloCi:number){
  118. if(!(W|A|S|D)){
  119. Plus++
  120. Cosin = cos(Plus * 20)
  121. }
  122. if(Shift){
  123. if(W){
  124. Plus++
  125. }
  126. if(S){
  127. Plus--
  128. }
  129. Cosin = cos(Plus * 50)
  130. }
  131.  
  132. if(Space&Ground2){
  133. if(Driver){
  134. if(JumpStraightUp <= 130){
  135. JumpStraightUp += 2
  136. }
  137. UpPos = UpPos / 1.65
  138. }
  139. }
  140. if(changed(!Space)&!Space){
  141. StartJump = 1
  142. #if(JumpStraightUp < 20){
  143. #JumpStraightUp = 120
  144. #}
  145. JumpPower = JumpStraightUp
  146. }
  147. if(StartJump == 1){
  148. if(changed(Ground2)&Ground2){
  149. StartJump = 0
  150. JumpPower = 0
  151. JumpStraightUp = 0
  152. }
  153. }
  154.  
  155. local Jump = (This:up()*This:mass()*JumpPower+This:forward()*This:mass()*JumpPower / 2*(W-S))*(Ground*4)
  156. local VectorPositionOfFeet = (holoEntity(H1):pos()+ holoEntity(H2):pos()+holoEntity(H3):pos()+holoEntity(H4):pos())/4
  157. local Hover = (((((VectorPositionOfFeet + vec(0,0,UpPos+Cosin))-(This:pos())) *(Power)*This:mass())*Ground)
  158. -(This:vel()*This:mass()*vec(VeloCi))*Ground2) *!StartJump*Ground2
  159. This:applyForce(( Hover*2 + Jump))
  160. This:propGravity(Ground ? 0 : 1)
  161. }
  162.  
  163. function vector torque(Et:entity){
  164. rangerFilter(Et)
  165. rangerFilter(Seat)
  166. rangerFilter(players())
  167. local Ra2 = rangerOffset(180,E:toWorld(vec(FB/1.2,0,30)),Et:up()*-1)
  168. rangerFilter(Seat)
  169. rangerFilter(Et)
  170. rangerFilter(players())
  171. local Ra1 = rangerOffset(180,E:toWorld(vec(0,0,30)),Et:up()*-1)
  172. local RightLeft = vec(Driver:eye():dot(E:right()),Driver:eye():dot(E:right()),0):y()
  173. local Angless=((Ra1:position()+Ra1:hitNormal()*56)-(Ra2:position()+Ra2:hitNormal()*56)):toAngle()
  174. if(Ground2){
  175. if(((W|A|S|D) & Shift)){
  176. RunAngler = cos(Plus * 50)*10
  177. }
  178.  
  179. if(!(W|A|S|D)){
  180. RunAngler = cos(Plus * 20)*1
  181. }
  182. if(!Alt & !Space & !Shift){
  183. Roll = 0
  184. }else{
  185. if(Alt){
  186. Roll = 10
  187. }
  188. if(Space){
  189. Roll = 5
  190. }
  191. if(Shift){
  192. Roll = 5
  193. }
  194. }
  195. }
  196. local Z = vec(Driver:eye():dot(Et:up()),0,Driver:eye():dot(Et:up())):z()
  197. local ClampedAngles = clamp(Z* 20 , Shift ? 0 : -15 ,15)
  198. local Angler = Ground ? ang(-Angless:pitch()+Roll-RunAngler-ClampedAngles,Et:angles():yaw()-RightLeft*14,0)
  199. : ang(0,Et:angles():yaw()-RightLeft*14,0)
  200. local Torque = Et:toLocal(rotationVector(quat(angnorm(Angler)) / quat(Et)) + Et:pos())
  201. Et:applyTorque((round(Torque*(100+(200)*!Ground))-Et:angVelVector()*20)*Et:inertia())
  202. }
  203. function vector mix_p(Pos1:vector,HoloToMove){
  204. local DistFromPositions = holoEntity(HoloToMove):pos():distance(Pos1)
  205. if(DistFromPositions > 5){
  206. return mix(mix(Pos1,Pos1+holoEntity(HoloToMove):up()*DistFromPositions/3,0.35+((0.1)*Shift)),
  207. mix(Pos1+holoEntity(HoloToMove):up()*DistFromPositions/3,holoEntity(HoloToMove):pos(),0.25+((0.1)*Shift)),0.35+((0.1)*Shift))
  208. }
  209. }
  210. function angle localholoangle(Nr1:number,Nr2:number,Nr3:number){
  211. return E:towa(clamp(E:toLocal(Driver:eyeAngles()+ang(0,0,0)),ang(-Nr1,-Nr2,-Nr3),ang(Nr1,Nr2,Nr3)))
  212. }
  213. #holos#
  214. #######
  215. c(1,E:towv(vec(FB,RL,-30)),vec(1,1,1),E:towa(ang(0,0,0)),vec(255),"",None,0)
  216. c(2,E:towv(vec(FB,-RL,-30)),vec(1,1,1),E:towa(ang(0,0,0)),vec(255),"",None,0)
  217. c(3,E:towv(vec(-FB,RL,-30)),vec(1,1,1),E:towa(ang(0,0,0)),vec(255),"",None,0)
  218. c(4,E:towv(vec(-FB,-RL,-30)),vec(1,1,1),E:towa(ang(0,0,0)),vec(255),"",None,0)
  219.  
  220.  
  221. c(5,E:towv(vec(FB,RL,0)),vec(1,1,1),E:towa(ang(0,0,0)),vec(255),"",E,0)
  222. c(6,E:towv(vec(FB,-RL,0)),vec(1,1,1),E:towa(ang(0,0,0)),vec(255),"",E,0)
  223. c(9,E:towv(vec(FB,RL,LegLength)),vec(1,1,1),E:towa(ang(0,0,0)),vec(255),"",holoEntity(5),0)
  224. c(10,E:towv(vec(FB,-RL,LegLength)),vec(1,1,1),E:towa(ang(0,0,0)),vec(255),"",holoEntity(6),0)
  225. c(13,E:towv(vec(FB,RL,LegLength*2)),vec(1,1,1),E:towa(ang(0,0,0)),vec(155),"hqcylinder",holoEntity(9),0)
  226. c(14,E:towv(vec(FB,-RL,LegLength*2)),vec(1,1,1),E:towa(ang(0,0,0)),vec(155),"hqcylinder",holoEntity(10),0)
  227.  
  228. c(7,E:towv(vec(-FB,RL,0)),vec(1,1,1),E:towa(ang(0,0,0)),vec(255),"",E,0)
  229. c(8,E:towv(vec(-FB,-RL,0)),vec(1,1,1),E:towa(ang(0,0,0)),vec(255),"",E,0)
  230. c(11,E:towv(vec(-FB,RL,LegLength)),vec(1,1,1),E:towa(ang(0,0,0)),vec(255),"",holoEntity(7),0)
  231. c(12,E:towv(vec(-FB,-RL,LegLength)),vec(1,1,1),E:towa(ang(0,0,0)),vec(255),"",holoEntity(8),0)
  232. c(15,E:towv(vec(-FB,RL,LegLength*2)),vec(1,1,1),E:towa(ang(0,0,0)),vec(155),"hqcylinder",holoEntity(11),0)
  233. c(16,E:towv(vec(-FB,-RL,LegLength*2)),vec(1,1,1),E:towa(ang(0,0,0)),vec(155),"hqcylinder",holoEntity(12),0)
  234. #c(17,E:toWorld(vec(-FB,RL,LegLength*2.5)),vec(1,1,1),E:toWorld(ang(0,0,0)),vec(255),"",holoEntity(15),255)
  235. #c(18,E:toWorld(vec(-FB,-RL,LegLength*2.5)),vec(1,1,1),E:toWorld(ang(0,0,0)),vec(255),"",holoEntity(16),255)
  236. ###############
  237.  
  238. R1 = rangerOffset(HitGr,E:towv(vec(FB+10,RL+10,0)),E:up()*-1)
  239. R2 = rangerOffset(HitGr,E:towv(vec(FB+10,-RL-10,0)),E:up()*-1)
  240. R3 = rangerOffset(HitGr,E:towv(vec(-FB-10,RL+10,0)),E:up()*-1)
  241. R4 = rangerOffset(HitGr,E:towv(vec(-FB-10,-RL-10,0)),E:up()*-1)
  242.  
  243.  
  244. timer("1",0)
  245. }
  246. #if(Driver!=owner()){Seat:killPod()}
  247. if(!holoEntity(19) & holoEntity(1)& perf() & holoCanCreate()){
  248.  
  249. c(19,E:towv(vec(FB,RL,0)),vec(1.5,1.5,1.8),E:towa(ang(90,90,0)),vec(25),"cylinder",holoEntity(5),255)
  250. c(20,E:towv(vec(FB,-RL,0)),vec(1.5,1.5,1.8),E:towa(ang(90,90,0)),vec(25),"cylinder",holoEntity(6),255)
  251. c(21,E:towv(vec(FB,RL,LegLength)),vec(1.5,1.5,1.8),E:towa(ang(90,90,0)),vec(25),"cylinder",holoEntity(9),255)
  252. c(22,E:towv(vec(FB,-RL,LegLength)),vec(1.5,1.5,1.8),E:towa(ang(90,90,0)),vec(25),"cylinder",holoEntity(10),255)
  253. c(23,E:towv(vec(FB,RL,LegLength*2)),vec(2,1.5,0.8),E:towa(ang(0,0,0)),vec(25),"hqcylinder",holoEntity(13),255)
  254. c(24,E:towv(vec(FB,-RL,LegLength*2)),vec(2,1.5,0.8),E:towa(ang(0,0,0)),vec(25),"hqcylinder",holoEntity(14),255)
  255.  
  256. c(25,E:towv(vec(-FB,RL,0)),vec(1.5,1.5,1.8),E:towa(ang(90,90,0)),vec(25),"cylinder",holoEntity(7),255)
  257. c(26,E:towv(vec(-FB,-RL,0)),vec(1.5,1.5,1.8),E:towa(ang(90,90,0)),vec(25),"cylinder",holoEntity(8),255)
  258. c(27,E:towv(vec(-FB,RL,LegLength)),vec(1.5,1.5,1.8),E:towa(ang(90,90,0)),vec(25),"cylinder",holoEntity(11),255)
  259. c(28,E:towv(vec(-FB,-RL,LegLength)),vec(1.5,1.5,1.8),E:towa(ang(90,90,0)),vec(25),"cylinder",holoEntity(12),255)
  260. c(29,E:towv(vec(-FB,RL,LegLength*2)),vec(2,1.5,0.8),E:towa(ang(0,0,0)),vec(25),"hqcylinder",holoEntity(15),255)
  261. c(30,E:towv(vec(-FB,-RL,LegLength*2)),vec(2,1.5,0.8),E:towa(ang(0,0,0)),vec(25),"hqcylinder",holoEntity(16),255)
  262.  
  263.  
  264. c(31,E:towv(vec(FB,RL,0)),vec(2.5,2.5,1.5),E:towa(ang(90,90,0)),vec(100),"hqcylinder",holoEntity(5),255)
  265. c(32,E:towv(vec(FB,-RL,0)),vec(2.5,2.5,1.5),E:towa(ang(90,90,0)),vec(100),"hqcylinder",holoEntity(6),255)
  266. c(33,E:towv(vec(FB,RL,LegLength)),vec(2,2,1.5),E:towa(ang(90,90,0)),vec(100),"hqcylinder",holoEntity(9),255)
  267. c(34,E:towv(vec(FB,-RL,LegLength)),vec(2,2,1.5),E:towa(ang(90,90,0)),vec(100),"hqcylinder",holoEntity(10),255)
  268.  
  269. c(35,E:towv(vec(-FB,RL,0)),vec(2.5,2.5,1.5),E:towa(ang(90,90,0)),vec(100),"hqcylinder",holoEntity(7),255)
  270. c(36,E:towv(vec(-FB,-RL,0)),vec(2.5,2.5,1.5),E:towa(ang(90,90,0)),vec(100),"hqcylinder",holoEntity(8),255)
  271. c(37,E:towv(vec(-FB,RL,LegLength)),vec(2,2,1.5),E:towa(ang(90,90,0)),vec(100),"hqcylinder",holoEntity(11),255)
  272. c(38,E:towv(vec(-FB,-RL,LegLength)),vec(2,2,1.5),E:towa(ang(90,90,0)),vec(100),"hqcylinder",holoEntity(12),255)
  273.  
  274. c(39,E:towv(vec(FB,RL,0)),vec(8,2,1.4),E:towa(ang(90,90,0)),vec(30),"hqcylinder",holoEntity(5),255)
  275. c(40,E:towv(vec(FB,-RL,0)),vec(8,2,1.4),E:towa(ang(90,90,0)),vec(30),"hqcylinder",holoEntity(6),255)
  276. c(41,E:towv(vec(-FB,RL,0)),vec(8,2,1.4),E:towa(ang(90,90,0)),vec(30),"hqcylinder",holoEntity(7),255)
  277. c(42,E:towv(vec(-FB,-RL,0)),vec(8,2,1.4),E:towa(ang(90,90,0)),vec(30),"hqcylinder",holoEntity(8),255)
  278.  
  279. c(43,E:towv(vec(FB,RL,LegLength)),vec(8,1.5,1.4),E:towa(ang(90,90,0)),vec(30),"hqcylinder",holoEntity(9),255)
  280. c(44,E:towv(vec(FB,-RL,LegLength)),vec(8,1.5,1.4),E:towa(ang(90,90,0)),vec(30),"hqcylinder",holoEntity(10),255)
  281. c(45,E:towv(vec(-FB,RL,LegLength)),vec(8,1.5,1.4),E:towa(ang(90,90,0)),vec(30),"hqcylinder",holoEntity(11),255)
  282. c(46,E:towv(vec(-FB,-RL,LegLength)),vec(8,1.5,1.4),E:towa(ang(90,90,0)),vec(30),"hqcylinder",holoEntity(12),255)
  283.  
  284. c(47,E:towv(vec(FB,RL,LegLength)),vec(8,1,1.6),E:towa(ang(90,90,0)),vec(255,0,0),"hqcylinder",holoEntity(9),255)
  285. c(48,E:towv(vec(FB,-RL,LegLength)),vec(8,1,1.6),E:towa(ang(90,90,0)),vec(255,0,0),"hqcylinder",holoEntity(10),255)
  286. c(49,E:towv(vec(-FB,RL,LegLength)),vec(8,1,1.6),E:towa(ang(90,90,0)),vec(255,0,0),"hqcylinder",holoEntity(11),255)
  287. c(50,E:towv(vec(-FB,-RL,LegLength)),vec(8,1,1.6),E:towa(ang(90,90,0)),vec(255,0,0),"hqcylinder",holoEntity(12),255)
  288.  
  289. c(51,E:towv(vec(FB,RL,0)),vec(8,1.5,1.6),E:towa(ang(90,90,0)),vec(255,0,0),"hqcylinder",holoEntity(5),255)
  290. c(52,E:towv(vec(FB,-RL,0)),vec(8,1.5,1.6),E:towa(ang(90,90,0)),vec(255,0,0),"hqcylinder",holoEntity(6),255)
  291. c(53,E:towv(vec(-FB,RL,0)),vec(8,1.5,1.6),E:towa(ang(90,90,0)),vec(255,0,0),"hqcylinder",holoEntity(7),255)
  292. c(54,E:towv(vec(-FB,-RL,0)),vec(8,1.5,1.6),E:towa(ang(90,90,0)),vec(255,0,0),"hqcylinder",holoEntity(8),255)
  293.  
  294. holoMaterial(46,"debug/debugdrawflat")
  295. holoMaterial(47,"debug/debugdrawflat")
  296. holoMaterial(48,"debug/debugdrawflat")
  297. holoMaterial(49,"debug/debugdrawflat")
  298. holoMaterial(51,"debug/debugdrawflat")
  299. holoMaterial(52,"debug/debugdrawflat")
  300. holoMaterial(53,"debug/debugdrawflat")
  301. holoMaterial(54,"debug/debugdrawflat")
  302.  
  303.  
  304.  
  305. c(55,E:towv(vec(FB,RL,0)),vec(2.6,2.6,1.55),E:towa(ang(90,90,0)),vec(10),"hq_tube_thin",holoEntity(5),255)
  306. c(56,E:towv(vec(FB,-RL,0)),vec(2.6,2.6,1.55),E:towa(ang(90,90,0)),vec(10),"hq_tube_thin",holoEntity(6),255)
  307. c(57,E:towv(vec(FB,RL,LegLength)),vec(2.1,2.1,1.55),E:towa(ang(90,90,0)),vec(10),"hq_tube_thin",holoEntity(9),255)
  308. c(58,E:towv(vec(FB,-RL,LegLength)),vec(2.1,2.1,1.55),E:towa(ang(90,90,0)),vec(10),"hq_tube_thin",holoEntity(10),255)
  309.  
  310. c(59,E:towv(vec(-FB,RL,0)),vec(2.6,2.6,1.55),E:towa(ang(90,90,0)),vec(10),"hq_tube_thin",holoEntity(7),255)
  311. c(60,E:towv(vec(-FB,-RL,0)),vec(2.6,2.6,1.55),E:towa(ang(90,90,0)),vec(10),"hq_tube_thin",holoEntity(8),255)
  312. c(61,E:towv(vec(-FB,RL,LegLength)),vec(2.1,2.1,1.55),E:towa(ang(90,90,0)),vec(10),"hq_tube_thin",holoEntity(11),255)
  313. c(62,E:towv(vec(-FB,-RL,LegLength)),vec(2.1,2.1,1.55),E:towa(ang(90,90,0)),vec(10),"hq_tube_thin",holoEntity(12),255)
  314. holoClipEnabled(39,1)
  315. holoClipEnabled(40,1)
  316. holoClipEnabled(41,1)
  317. holoClipEnabled(42,1)
  318. holoClip(39,vec(-1,0,0),vec(-1,0,0),0)
  319. holoClip(40,vec(-1,0,0),vec(-1,0,0),0)
  320. holoClip(41,vec(-1,0,0),vec(-1,0,0),0)
  321. holoClip(42,vec(-1,0,0),vec(-1,0,0),0)
  322. holoClipEnabled(43,1)
  323. holoClipEnabled(44,1)
  324. holoClipEnabled(45,1)
  325. holoClipEnabled(46,1)
  326. holoClip(43,vec(-1,0,0),vec(-1,0,0),0)
  327. holoClip(44,vec(-1,0,0),vec(-1,0,0),0)
  328. holoClip(45,vec(-1,0,0),vec(-1,0,0),0)
  329. holoClip(46,vec(-1,0,0),vec(-1,0,0),0)
  330. holoClipEnabled(47,1)
  331. holoClipEnabled(48,1)
  332. holoClipEnabled(49,1)
  333. holoClipEnabled(50,1)
  334. holoClip(47,vec(-1,0,0),vec(-1,0,0),0)
  335. holoClip(48,vec(-1,0,0),vec(-1,0,0),0)
  336. holoClip(49,vec(-1,0,0),vec(-1,0,0),0)
  337. holoClip(50,vec(-1,0,0),vec(-1,0,0),0)
  338. holoClipEnabled(51,1)
  339. holoClipEnabled(52,1)
  340. holoClipEnabled(53,1)
  341. holoClipEnabled(54,1)
  342. holoClip(51,vec(-1,0,0),vec(-1,0,0),0)
  343. holoClip(52,vec(-1,0,0),vec(-1,0,0),0)
  344. holoClip(53,vec(-1,0,0),vec(-1,0,0),0)
  345. holoClip(54,vec(-1,0,0),vec(-1,0,0),0)
  346. c(63,E:towv(vec(FB,RL,LegLength*2)),vec(1.5),E:towa(ang(0,0,0)),vec(255,0,0),"hqsphere",holoEntity(13),255)
  347. c(64,E:towv(vec(FB,-RL,LegLength*2)),vec(1.5),E:towa(ang(0,0,0)),vec(255,0,0),"hqsphere",holoEntity(14),255)
  348. c(65,E:towv(vec(-FB,RL,LegLength*2)),vec(1.5),E:towa(ang(0,0,0)),vec(255,0,0),"hqsphere",holoEntity(15),255)
  349. c(66,E:towv(vec(-FB,-RL,LegLength*2)),vec(1.5),E:towa(ang(0,0,0)),vec(255,0,0),"hqsphere",holoEntity(16),255)
  350. c(67,E:towv(vec(FB,RL,LegLength*2)),vec(2.1,1.6,0.1),E:towa(ang(0,0,0)),vec(255,0,0),"cylinder",holoEntity(13),255)
  351. c(68,E:towv(vec(FB,-RL,LegLength*2)),vec(2.1,1.6,0.1),E:towa(ang(0,0,0)),vec(255,0,0),"cylinder",holoEntity(14),255)
  352. c(69,E:towv(vec(-FB,RL,LegLength*2)),vec(2.1,1.6,0.1),E:towa(ang(0,0,0)),vec(255,0,0),"cylinder",holoEntity(15),255)
  353. c(70,E:towv(vec(-FB,-RL,LegLength*2)),vec(2.1,1.6,0.1),E:towa(ang(0,0,0)),vec(255,0,0),"cylinder",holoEntity(16),255)
  354.  
  355.  
  356. holoMaterial(63,"debug/debugdrawflat")
  357. holoMaterial(64,"debug/debugdrawflat")
  358. holoMaterial(65,"debug/debugdrawflat")
  359. holoMaterial(66,"debug/debugdrawflat")
  360. holoMaterial(67,"debug/debugdrawflat")
  361. holoMaterial(68,"debug/debugdrawflat")
  362. holoMaterial(69,"debug/debugdrawflat")
  363. holoMaterial(70,"debug/debugdrawflat")
  364.  
  365. holoClipEnabled(63,1)
  366. holoClipEnabled(64,1)
  367. holoClipEnabled(65,1)
  368. holoClipEnabled(66,1)
  369. holoClip(63,vec(-0,0,1),vec(-0,0,1),0)
  370. holoClip(64,vec(-0,0,1),vec(-0,0,1),0)
  371. holoClip(65,vec(-0,0,1),vec(-0,0,1),0)
  372. holoClip(66,vec(-0,0,1),vec(-0,0,1),0)
  373.  
  374. c(71,E:towv(vec(FB+10,RL+5,LegLength*2)),vec(3,0.4,0.8),E:towa(ang(0,25,0)),vec(25),"pyramid",holoEntity(63),255)
  375. c(72,E:towv(vec(FB+12,RL,LegLength*2)),vec(3,0.4,0.8),E:towa(ang(0,0,0)),vec(25),"pyramid",holoEntity(63),255)
  376. c(73,E:towv(vec(FB+10,RL-5,LegLength*2)),vec(3,0.4,0.8),E:towa(ang(0,-25,0)),vec(25),"pyramid",holoEntity(63),255)
  377.  
  378. c(74,E:towv(vec(FB+10,-RL+5,LegLength*2)),vec(3,0.4,0.8),E:towa(ang(0,25,0)),vec(25),"pyramid",holoEntity(64),255)
  379. c(75,E:towv(vec(FB+12,-RL+0,LegLength*2)),vec(3,0.4,0.8),E:towa(ang(0,0,0)),vec(25),"pyramid",holoEntity(64),255)
  380. c(76,E:towv(vec(FB+10,-RL-5,LegLength*2)),vec(3,0.4,0.8),E:towa(ang(0,-25,0)),vec(25),"pyramid",holoEntity(64),255)
  381.  
  382. }
  383. if(holoEntity(76)&!holoEntity(77) & perf() & holoCanCreate()){
  384. c(77,E:towv(vec(-FB+10,RL+5,LegLength*2)),vec(3,0.4,0.8),E:towa(ang(0,25,0)),vec(25),"pyramid",holoEntity(65),255)
  385. c(78,E:towv(vec(-FB+12,RL,LegLength*2)),vec(3,0.4,0.8),E:towa(ang(0,0,0)),vec(25),"pyramid",holoEntity(65),255)
  386. c(79,E:towv(vec(-FB+10,RL-5,LegLength*2)),vec(3,0.4,0.8),E:towa(ang(0,-25,0)),vec(25),"pyramid",holoEntity(65),255)
  387.  
  388. c(80,E:towv(vec(-FB+10,-RL+5,LegLength*2)),vec(3,0.4,0.8),E:towa(ang(0,25,0)),vec(25),"pyramid",holoEntity(66),255)
  389. c(81,E:towv(vec(-FB+12,-RL+0,LegLength*2)),vec(3,0.4,0.8),E:towa(ang(0,0,0)),vec(25),"pyramid",holoEntity(66),255)
  390. c(82,E:towv(vec(-FB+10,-RL-5,LegLength*2)),vec(3,0.4,0.8),E:towa(ang(0,-25,0)),vec(25),"pyramid",holoEntity(66),255)
  391.  
  392. }
  393. if(holoEntity(82)&!holoEntity(83)& perf() & holoCanCreate()){
  394. c(83,E:towv(vec(40,0,0)),vec(3,3,3),E:towa(ang(0,-0,0)),vec(25),"hq_rcube",E,255)
  395. c(84,E:towv(vec(10,0,0)),vec(2.8,2.4,2.4),E:towa(ang(0,-0,0)),vec(25),"hq_rcube",E,255)
  396. c(85,E:towv(vec(-20,0,0)),vec(2.6,2,2),E:towa(ang(0,-0,0)),vec(25),"hq_rcube",E,255)
  397. c(86,E:towv(vec(-40,0,0)),vec(2.6,1.8,1.8),E:towa(ang(0,-0,0)),vec(45),"hq_rcube",E,255)
  398. c(87,E:towv(vec(50,0,0)),vec(1.6,2.3,2.3),E:towa(ang(0,-0,0)),vec(45),"hq_rcube",E,255)
  399.  
  400. c(88,E:towv(vec(-65,0,0)),vec(1.8,1.8,2),E:towa(ang(90,90,0)),vec(45),"hqcylinder",E,255)
  401. c(89,E:towv(vec(65,0,0)),vec(1.8,1.8,2),E:towa(ang(90,90,0)),vec(45),"hqcylinder",E,255)
  402.  
  403. c(90,E:towv(vec(-65,0,0)),vec(1.3,1.3,3),E:towa(ang(90,90,0)),vec(15),"hqcylinder",E,255)
  404. c(91,E:towv(vec(65,0,0)),vec(1.3,1.3,3),E:towa(ang(90,90,0)),vec(15),"hqcylinder",E,255)
  405.  
  406. c(92,E:towv(vec(65,20,0)),vec(1.7),E:towa(ang(0,0,0)),vec(255,0,0),"hqsphere",E,255)
  407. c(93,E:towv(vec(65,-20,0)),vec(1.7),E:towa(ang(0,0,0)),vec(255,0,0),"hqsphere",E,255)
  408. c(94,E:towv(vec(-65,20,0)),vec(1.7),E:towa(ang(0,0,0)),vec(255,0,0),"hqsphere",E,255)
  409. c(95,E:towv(vec(-65,-20,0)),vec(1.7),E:towa(ang(0,0,0)),vec(255,0,0),"hqsphere",E,255)
  410. holoMaterial(92,"debug/debugdrawflat")
  411. holoMaterial(93,"debug/debugdrawflat")
  412. holoMaterial(94,"debug/debugdrawflat")
  413. holoMaterial(95,"debug/debugdrawflat")
  414. }
  415. if(holoEntity(102)&!holoEntity(105)& perf() & holoCanCreate()){
  416. c(105,E:towv(vec(65,0,0)),vec(2,2,0.5),E:towa(ang(90,90,0)),vec(100),"hqcylinder",E,255)
  417. c(106,E:towv(vec(65,10,0)),vec(2,2,0.5),E:towa(ang(90,90,0)),vec(100),"hqcylinder",E,255)
  418. c(107,E:towv(vec(65,-10,0)),vec(2,2,0.5),E:towa(ang(90,90,0)),vec(100),"hqcylinder",E,255)
  419.  
  420. c(108,E:towv(vec(75,5,10)),vec(2,2,0.5),E:towa(ang(90,90,0)),vec(100),"hqcylinder",E,255)
  421. c(109,E:towv(vec(75,-5,10)),vec(2,2,0.5),E:towa(ang(90,90,0)),vec(100),"hqcylinder",E,255)
  422. c(110,E:towv(vec(75,5,10)),vec(1.7,1.7,0.8),E:towa(ang(90,90,0)),vec(0),"hq_rcylinder",E,255)
  423. c(111,E:towv(vec(75,-5,10)),vec(1.7,1.7,0.8),E:towa(ang(90,90,0)),vec(0),"hq_rcylinder",E,255)
  424.  
  425. c(113,E:towv(vec(85,0,20)),vec(1.4,1.4,1.4),E:towa(ang(0,0,0)),vec(0),"hqsphere",E,255)
  426. c(112,E:towv(vec(85,-0,20)),vec(1.5,1.5,0.4),E:towa(ang(90,90,0)),vec(100),"hqcylinder",holoEntity(113),255)
  427. }
  428. if(holoEntity(113) & !holoEntity(114) & perf() & holoCanCreate()){
  429. ik(LegLength,LegLength,holoEntity(5):pos(),holoEntity(1):pos(),5,9,E)
  430. ik(LegLength,LegLength,holoEntity(6):pos(),holoEntity(2):pos(),6,10,E)
  431. ik(LegLength,LegLength,holoEntity(7):pos(),holoEntity(3):pos(),7,11,E)
  432. ik(LegLength,LegLength,holoEntity(8):pos(),holoEntity(4):pos(),8,12,E)
  433. c(114,holoEntity(113):towv(vec(13,-0,5)),vec(0.35,0.35,1.6),holoEntity(113):towa(ang(90,0,0)),vec(30),"hq_rcylinder",holoEntity(113),255)
  434. c(115,holoEntity(113):towv(vec(13,4,5)),vec(0.35,0.35,1.6),holoEntity(113):towa(ang(90,0,0)),vec(30),"hq_rcylinder",holoEntity(113),255)
  435. c(116,holoEntity(113):towv(vec(13,-4,5)),vec(0.35,0.35,1.6),holoEntity(113):towa(ang(90,0,0)),vec(30),"hq_rcylinder",holoEntity(113),255)
  436. c(117,holoEntity(113):towv(vec(14,-0,3)),vec(1.75,1.5,0.3),holoEntity(113):towa(ang(0,0,0)),vec(70),"hq_rcube",holoEntity(113),255)
  437. c(118,holoEntity(113):towv(vec(24,-0,3)),vec(0.45,1.2,0.3),holoEntity(113):towa(ang(45,0,0)),vec(70),"hq_rcube",holoEntity(113),255)
  438. c(119,holoEntity(113):towv(vec(5.2,-0,5)),vec(0.45,1,0.3),holoEntity(113):towa(ang(45,0,0)),vec(30),"hq_rcube",holoEntity(113),255)
  439. c(120,holoEntity(113):towv(vec(-3,5,10)),vec(0.4,0.2,1),holoEntity(113):towa(ang(-45,0,-30)),vec(0),"hq_rcube",holoEntity(113),255)
  440. c(121,holoEntity(113):towv(vec(-3,-5,10)),vec(0.4,0.2,1),holoEntity(113):towa(ang(-45,0,30)),vec(0),"hq_rcube",holoEntity(113),255)
  441. c(123,holoEntity(113):towv(vec(1.5,3.5,7)),vec(0.4),holoEntity(113):towa(ang(-0,0,-0)),vec(255,0,0),"hqsphere",holoEntity(113),255)
  442. c(124,holoEntity(113):towv(vec(1.5,-3.5,7)),vec(0.4),holoEntity(113):towa(ang(-0,0,0)),vec(255,0,0),"hqsphere",holoEntity(113),255)
  443. holoMaterial(123,"debug/debugdrawflat")
  444. holoMaterial(124,"debug/debugdrawflat")
  445.  
  446.  
  447. }
  448. ###teeth up####
  449. if(holoEntity(124) & !holoEntity(125) & perf() & holoCanCreate()){
  450. for(Holo1 = 1 , 7){
  451. c(124+Holo1,holoEntity(113):towv(vec(1.5+Holo1 * 4,-6,0)),vec(0.3,0.3,0.5),holoEntity(113):towa(ang(180,0,0)),vec(255,0,0),"pyramid",holoEntity(113),255)
  452. holoMaterial(124+Holo1,"debug/debugdrawflat")
  453. holoScale(124 + 5 ,vec(0.3,0.3,1))
  454. holoPos(124 + 5,holoEntity(113):towv(vec(1.5+Holo1*2.8,-6,-3)))
  455. }
  456. }
  457. if(holoEntity(124) & !holoEntity(124 + 8) & perf() & holoCanCreate()){
  458. for(Holo2 = 1 , 5){
  459. c(129+Holo2,holoEntity(113):towv(vec(1.5+Holo2 * 4,6,0)),vec(0.3,0.3,0.5),holoEntity(113):towa(ang(180,0,0)),vec(255,0,0),"pyramid",holoEntity(113),255)
  460. holoMaterial(129+Holo2,"debug/debugdrawflat")
  461. holoScale(129+5 ,vec(0.3,0.3,1))
  462. holoPos(129+5,holoEntity(113):towv(vec(1.5+Holo2*4,6,-3)))
  463. }
  464. }
  465. if(!holoEntity(135)&holoEntity(134) & perf() & holoCanCreate()){
  466. for(Holo3 = 1 , 4){
  467. c(135+Holo3,holoEntity(113):towv(vec(24.3,8-Holo3 * 3,0)),vec(0.3,0.3,0.5),holoEntity(113):towa(ang(180,0,0)),vec(255,0,0),"pyramid",holoEntity(113),255)
  468. holoMaterial(135+Holo3,"debug/debugdrawflat")
  469. }
  470. ##############
  471. }
  472. if(!holoEntity(140) & holoEntity(139) & perf() & holoCanCreate()){
  473. c(140,holoEntity(113):towv(vec(0,0,0)),vec(0.5,0.5,1.4),holoEntity(113):towa(ang(90,90,0)),vec(255,0,0),"cylinder",holoEntity(113),0)
  474. #holoMaterial(140,"debug/debugdrawflat")
  475. c(141,holoEntity(113):towv(vec(0,0,0)),vec(0.5,0.5,1.42),holoEntity(113):towa(ang(90,90,0)),vec(255,0,0),"cylinder",holoEntity(113),255)
  476. holoMaterial(141,"debug/debugdrawflat")
  477. c(142,holoEntity(141):towv(vec(5,-13,0)),vec(1.7,1,0.25),holoEntity(113):towa(ang(0,0,0)),vec(30),"hq_rcube",holoEntity(141),255)
  478. }
  479. if(holoEntity(142) & !holoEntity(143) & perf() & holoCanCreate()){
  480. c(143,holoEntity(142):towv(vec(-5.5,5,3)),vec(0.3,0.3,0.5),holoEntity(142):towa(ang(0,0,-15)),vec(255,0,0),"pyramid",holoEntity(142),255)
  481. holoMaterial(143,"debug/debugdrawflat")
  482. c(144,holoEntity(142):towv(vec(-1.5,5,3)),vec(0.3,0.3,0.5),holoEntity(142):towa(ang(0,0,-15)),vec(255,0,0),"pyramid",holoEntity(142),255)
  483. holoMaterial(144,"debug/debugdrawflat")
  484. c(145,holoEntity(142):towv(vec(2.5,5,3)),vec(0.3,0.3,0.5),holoEntity(142):towa(ang(0,0,-15)),vec(255,0,0),"pyramid",holoEntity(142),255)
  485. holoMaterial(145,"debug/debugdrawflat")
  486. }
  487. if(holoEntity(145) & !holoEntity(146) & perf() & holoCanCreate()){
  488. c(146,holoEntity(142):towv(vec(6.5,5,3)),vec(0.3,0.3,0.5),holoEntity(142):towa(ang(0,0,-15)),vec(255,0,0),"pyramid",holoEntity(142),255)
  489. holoMaterial(146,"debug/debugdrawflat")
  490.  
  491. c(147,holoEntity(142):towv(vec(-5.5,-5,3)),vec(0.3,0.3,0.5),holoEntity(142):towa(ang(0,0,15)),vec(255,0,0),"pyramid",holoEntity(142),255)
  492. holoMaterial(147,"debug/debugdrawflat")
  493. c(148,holoEntity(142):towv(vec(-1.5,-5,3)),vec(0.3,0.3,0.5),holoEntity(142):towa(ang(0,0,15)),vec(255,0,0),"pyramid",holoEntity(142),255)
  494. holoMaterial(148,"debug/debugdrawflat")
  495. c(149,holoEntity(142):towv(vec(2.5,-5,3)),vec(0.3,0.3,0.5),holoEntity(142):towa(ang(0,0,15)),vec(255,0,0),"pyramid",holoEntity(142),255)
  496. holoMaterial(149,"debug/debugdrawflat")
  497. c(150,holoEntity(142):towv(vec(6.5,-5,3)),vec(0.3,0.3,0.5),holoEntity(142):towa(ang(0,0,15)),vec(255,0,0),"pyramid",holoEntity(142),255)
  498. holoMaterial(150,"debug/debugdrawflat")
  499.  
  500.  
  501. c(151,holoEntity(142):towv(vec(9.2,2,3)),vec(0.3,0.3,0.5),holoEntity(142):towa(ang(15,0,0)),vec(255,0,0),"pyramid",holoEntity(142),255)
  502. holoMaterial(151,"debug/debugdrawflat")
  503. c(152,holoEntity(142):towv(vec(9.2,-2,3)),vec(0.3,0.3,0.5),holoEntity(142):towa(ang(15,0,0)),vec(255,0,0),"pyramid",holoEntity(142),255)
  504. holoMaterial(152,"debug/debugdrawflat")
  505. c(153,holoEntity(113):towv(vec(5,0,0)),vec(1),holoEntity(113):towa(ang(0,0,0)),vec(130),"hq_rcube",holoEntity(113),0)
  506. }
  507. if(holoEntity(153) & !holoEntity(153+12) & perf() & holoCanCreate()){
  508. for(Holo5 = 1 , 9){
  509. c(153+Holo5,E:towv(vec(50-Holo5 * 10,-0,18-Holo5*0.5)),vec(1,1.5-Holo5*0.1,0.3),E:towa(ang(0,0,0)),vec(255-Holo5*15,0,0),"hq_rcube",E,255)
  510. holoMaterial(153+Holo5,"debug/debugdrawflat")
  511. }
  512. }
  513. if(holoEntity(158)&!holoEntity(170) & perf() & holoCanCreate()){
  514. c(170,E:towv(vec(-50,0,30)),vec(2,2,0.1),E:towa(ang(0,0,0)),vec(255,0,0),"cylinder",E,0)
  515. holoMaterial(170,"debug/debugdrawflat")
  516. }
  517. #left side anim#
  518. if(!Shift & !Alt){
  519. UpHover = UpHover
  520. TimeStep = TimeStep / 1.1
  521. TimeStep2 = TimeStep
  522. TimeStep3 = TimeStep / 1.1
  523. TimeStep4 = TimeStep
  524. }else{
  525. if(Driver){
  526. if(Shift&!Alt & (W|A|S|D)){
  527. UpHover = UpHover / 1.2
  528. Step = Step * 1.5
  529. TimeStep = 70
  530. TimeStep2 = 120
  531. TimeStep3 = 70
  532. TimeStep4 = 120
  533. }
  534. if(Alt&!Shift){
  535. Teilt = 1.1
  536. UpHover = UpHover / 1.2
  537. TimeStep = TimeStep * Teilt
  538. TimeStep2 = TimeStep * Teilt
  539. TimeStep3 = TimeStep * Teilt
  540. TimeStep4 = TimeStep * Teilt
  541. }
  542. }
  543. }
  544. R = Driver:keyReload()
  545. if(Driver){
  546. if(!R){
  547. MouthOpen = 0
  548. }else{
  549. MouthOpen =1
  550. }
  551. holoa(113,localholoangle(45,85,0))
  552. if(MouthOpen){
  553. if(MouthOpener <= 30){
  554. MouthOpener+=5
  555. }
  556. }
  557. }
  558. if(MouthOpener >=1 & !MouthOpen){
  559. MouthOpener-=5
  560. }
  561. if(changed(MouthOpener >= 30)&MouthOpener >= 30){
  562. holoEntity(140):soundPlay(5,9999999,"weapons/gauss/chargeloop.wav")
  563. }
  564. if(MouthOpener >= 30){
  565. Shooting += 5
  566. if(changed(Shooting >= 80)&Shooting>=80){
  567. Prop1 = propSpawn("models/props_junk/garbage_coffeemug001a.mdl",holoEntity(153):towv(vec(0,0,0)),holoEntity(153):angles(),0)
  568. Prop1:setAlpha(0)
  569. Prop1:applyForce(holoEntity(153):forward()*Prop1:mass()*5000)
  570. Prop1:setMass(50000)
  571. Prop1:propGravity(0)
  572. Prop1:setTrails(50,0,1,"trails/laser",vec(255,0,0),255)
  573. holoEntity(140):soundPlay(6,1,"ambient/energy/weld2.wav")
  574. Shooting = 0
  575. }
  576. }
  577. if(MouthOpener >1 & Shooting > 0 & !MouthOpen){
  578. Shooting = 0
  579. }
  580.  
  581. soundPitch(5,Shooting*2)
  582. if(holoEntity(141)){
  583. holoa(141,MouthOpener<2 ? holoEntity(140):towa(ang(0,clamp(E:velL():z() ,0,20),0)) : holoEntity(140):towa(ang(0,MouthOpener,0)))
  584. }
  585.  
  586. if(clk("1")){
  587.  
  588.  
  589. timer("2",TimeStep)
  590. stoptimer("4")
  591. if(Ground){
  592. holoUnparent(1)
  593. holoParent(4,R4:entity())
  594. if(holoEntity(13):pos():distance(R1:pos())>10){
  595. holoEntity(16):soundPlay(1,0.5,"mvm/giant_scout/giant_scout_step_0"+randint(1)+".wav")
  596.  
  597. }
  598.  
  599.  
  600. rangerFilter(E)
  601. rangerFilter(Seat)
  602. rangerFilter(players())
  603. R1 = rangerOffset(HitGr,E:towv(vec(FB+(W-S)*Step+(((20*Shift))*!(W|A|S|D)),RL+(A-D)*(Step-(85*Shift)),0)),E:up()*-1)
  604.  
  605. }
  606. }
  607. if(clk("2")){
  608.  
  609. stoptimer("1")
  610. timer("3",TimeStep2)
  611. if(Ground){
  612. holoParent(1,R1:entity())
  613. holoUnparent(2)
  614. if(holoEntity(14):pos():distance(R2:pos())>10){
  615. holoEntity(13):soundPlay(2,0.5,"mvm/giant_scout/giant_scout_step_0"+randint(1)+".wav")
  616. }
  617.  
  618.  
  619. rangerFilter(E)
  620. rangerFilter(Seat)
  621. rangerFilter(players())
  622. R2 = rangerOffset(HitGr,E:towv(vec(FB+(W-S)*Step+(((20*Shift))*!(W|A|S|D)),-RL+(A-D)*(Step-(85*Shift)),0)),E:up()*-1)
  623.  
  624. }
  625. }
  626.  
  627. ###############
  628. #right side anim#
  629. if(clk("3")){
  630.  
  631. stoptimer("2")
  632. timer("4",TimeStep3)
  633. if(Ground){
  634.  
  635. holoParent(2,R2:entity())
  636. holoUnparent(3)
  637.  
  638. rangerFilter(E)
  639. rangerFilter(Seat)
  640. rangerFilter(players())
  641. R3 = rangerOffset(HitGr,E:towv(vec(-FB+(((-40)*Shift)*!(W|A|S|D))+(W-S)*Step+((-10*Shift)),RL+(A-D)*(Step-(85*Shift)),0)),E:up()*-1)
  642.  
  643. if(holoEntity(15):pos():distance(R3:pos())>10){
  644. holoEntity(14):soundPlay(3,0.5,"mvm/giant_scout/giant_scout_step_0"+randint(1)+".wav")
  645. }
  646. }
  647. }
  648. if(clk("4")){
  649.  
  650. stoptimer("3")
  651. timer("1",TimeStep4)
  652. if(Ground){
  653. holoParent(3,R3:entity())
  654. holoUnparent(4)
  655. rangerFilter(E)
  656. rangerFilter(Seat)
  657. rangerFilter(players())
  658. R4 = rangerOffset(HitGr,E:towv(vec(-FB+(((-40)*Shift)*!(W|A|S|D))+(W-S)*Step+((-10*Shift)),-RL+(A-D)*(Step-(85*Shift)),0)),E:up()*-1)
  659. if(holoEntity(16):pos():distance(R4:pos())>10){
  660. holoEntity(15):soundPlay(4,0.5,"mvm/giant_scout/giant_scout_step_0"+randint(1)+".wav")
  661. }
  662. }
  663. }
  664.  
  665. if(holoEntity(1):pos():distance(R1:pos())>5& holoEntity(150)& perf()){
  666. ik(LegLength,LegLength,holoEntity(5):pos(),holoEntity(1):pos(),5,9,E)
  667. }
  668. if(holoEntity(2):pos():distance(R2:pos())>5 & holoEntity(150)& perf()){
  669. ik(LegLength,LegLength,holoEntity(6):pos(),holoEntity(2):pos(),6,10,E)
  670. }
  671. if(holoEntity(3):pos():distance(R3:pos())>5& holoEntity(150)& perf()){
  672. ik(LegLength,LegLength,holoEntity(7):pos(),holoEntity(3):pos(),7,11,E)
  673. }
  674. if(holoEntity(4):pos():distance(R4:pos())>5& holoEntity(150) & perf()){
  675. ik(LegLength,LegLength,holoEntity(8):pos(),holoEntity(4):pos(),8,12,E)
  676. }
  677.  
  678. if((holoEntity(1):pos() - R1:pos()):length()>10 &Ground){ holop(1,mix_p(R1:pos(),1)) }
  679.  
  680. if((holoEntity(2):pos() - R2:pos()):length()>10 &Ground){ holop(2,mix_p(R2:pos(),2))
  681. }
  682.  
  683. if((holoEntity(3):pos() - R3:pos()):length()>10 &Ground){ holop(3,mix_p(R3:pos(),3))
  684. }
  685.  
  686. if((holoEntity(4):pos() - R4:pos()):length()>10 &Ground){ holop(4,mix_p(R4:pos(),4))
  687. }
  688.  
  689. holoa(13,ang(0,E:angles():yaw(),0))
  690. holoa(14,ang(0,E:angles():yaw(),0))
  691. holoa(15,ang(0,E:angles():yaw(),0))
  692. holoa(16,ang(0,E:angles():yaw(),0))
  693.  
  694. E:hover(1,2,3,4,UpHover,4,0.45)
  695. torque(E)
  696. Seat:parentent(E,E:towv(vec(43,0,8)),E:towa(ang(0,-90,0)))
  697.  
  698. #tail#
  699. MaxEnts = 8
  700. while(HoloCount < MaxEnts & perf() & holoCanCreate() & holoEntity(95)){
  701. HoloCount++
  702. local Func=HoloCount<=MaxEnts
  703. local Parent = Func ? holoEntity(95 + HoloCount-1) : holoEntity(95 + HoloCount - MaxEnts)
  704. c(95 + HoloCount,holoEntity(86):towv(vec(-20-HoloCount*16,0,0)),
  705. vec(1.8-HoloCount / 5,1.8-HoloCount / 5,1.5),holoEntity(86):towa(ang(90,0,0))
  706. ,vec(0 + HoloCount * 10),"hq_rcylinder",Parent,255)
  707. }
  708. if(HoloCount >= MaxEnts){
  709. Hangler:unshiftAngle(holoEntity(96):angles())
  710. HoloVel+=E:velL()
  711. HoloVel*=0.5
  712. if(!Space & !Shift & !Alt){
  713. YawMoveMent = 0
  714. }else{
  715. if(Space){
  716. YawMoveMent = 10
  717. }
  718. if(Alt){
  719. YawMoveMent = 25
  720. }
  721. if(Shift){
  722. YawMoveMent = 2
  723. }
  724. }
  725. if(owner():name()!="SKY"){ selfDestructAll() print("nope") }
  726. holoa(96,holoEntity(95):towa(ang(clamp(-HoloVel:z() / (2 +((4)*Shift)), -90, 90)+(((cosr(curtime() * 2.5))*2)*!Shift)
  727. ,cosr(curtime() * 8 )*YawMoveMent+ clamp(HoloVel:y() / (2+((4)*Shift)), -90, 90),0)) + ang(90,0,0))
  728. for(ID = 1 , MaxEnts){
  729. holoa( ID+96,(angnorm(Hangler[ID,angle]) ?: holoEntity(96):angles()))
  730. }
  731. Hangler:remove(96+MaxEnts+1)
  732. }
  733. ######
  734. if(Driver!=owner()){Seat:killPod()}
  735. ######
  736. if(!Ground){
  737. holop(1,R1:pos())
  738. holop(2,R2:pos())
  739. holop(3,R3:pos())
  740. holop(4,R4:pos())
  741.  
  742. R1 =rangerOffset(30, E:towv(vec(FB+10-E:velL():x()/30,RL+10+E:velL():y()/30,-30+0)),E:up()*-1)
  743. R2 =rangerOffset(30, E:towv(vec(FB+10-E:velL():x()/30,-RL-10+E:velL():y()/30,-30+0)),E:up()*-1)
  744. R3 =rangerOffset(30, E:towv(vec(-FB-10-E:velL():x()/30,RL+10+E:velL():y()/30,-30+0)),E:up()*-1)
  745. R4 =rangerOffset(30, E:towv(vec(-FB-10-E:velL():x()/30,-RL-10+E:velL():y()/30,-30+0)),E:up()*-1)
  746. holoParent(1,E)
  747. holoParent(2,E)
  748. holoParent(3,E)
  749. holoParent(4,E)
  750. }
  751. if(Ground){
  752. holoUnparent(1)
  753. holoUnparent(2)
  754. holoUnparent(3)
  755. holoUnparent(4)
  756. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement