Advertisement
Ban43_GodOfEdits

Untitled

Aug 7th, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.85 KB | None | 0 0
  1. @name sonic dash by SaVav V5
  2. @inputs
  3. @outputs
  4. @persist T ON Ring:entity C1 T3 T2 DMG
  5. @trigger
  6. interval(1)
  7. if(first()){T=0 C1=0}
  8.  
  9. findInSphere(owner():pos(),400)
  10. findIncludeClass("npc")
  11. findIncludeModel("models/props_junk/wood_crate001a.mdl")
  12. findIncludeModel("models/props_junk/wood_crate001a_damaged.mdl")
  13. findIncludeModel("models/props_junk/propane_tank001a.mdl")
  14. findDisallowModel("models/holograms/hq_torus_oldsize.mdl")
  15. findIncludeModel("models/props_c17/FurnitureDrawer001a.mdl")
  16. findIncludeModel("models/props_junk/wood_crate002a.mdl")
  17. findIncludeModel("models/mechanics/wheels/rim_1.mdl")
  18. findIncludeModel("models/props_phx/wheels/747wheel.mdl")
  19. if(owner():keyUse()==0){
  20. findIncludeModel("models/holograms/hq_torus_oldsize.mdl")
  21. }
  22.  
  23. #findIncludeClass("player")
  24. findDisallowPlayer(owner())
  25. findExcludeEntity(owner())
  26. Target = findResult(1)
  27. Distance = owner():pos():distance(Target:pos()+vec(0,0,0))
  28.  
  29. if(owner():keyUse()){
  30.  
  31.  
  32.  
  33. if(Target){
  34. if(Distance<400){
  35. if(ON==1){
  36.  
  37. owner():setVel(((Target:pos()+vec(0,0,112))-owner():pos())*2)
  38.  
  39. if(Distance<120){
  40. if(Target:model()=="models/props_phx/wheels/747wheel.mdl"){owner():setVel(vec(-owner():vel():x(),-owner():vel():y(),-owner():vel():z()+1000)) Target:soundPlay(1,1,"physics/rubber/rubber_tire_impact_hard2.wav")}else{
  41. if(Target:model()=="models/mechanics/wheels/rim_1.mdl"){owner():setVel(vec(-owner():vel():x(),-owner():vel():y(),-owner():vel():z()+700))
  42. Target:soundPlay(1,1,"physics/rubber/rubber_tire_impact_hard1.wav")}else{
  43. Ring=propSpawn("models/holograms/hq_torus_oldsize.mdl",0)
  44. Ring:propFreeze(0)
  45. Ring:setVel(vec(sin(-owner():eyeAngles():yaw()+90)*400,cos(-owner():eyeAngles():yaw()+90)*400,10))
  46. Ring:setColor(255,255,0)
  47. Ring:setPos(Target:pos())
  48. Ring:applyAngForce(ang(random(-200,200),random(-200,200),random(-200,200)))
  49. Target:propBreak()
  50. owner():setVel(vec(-owner():vel():x(),-owner():vel():y(),-owner():vel():z()+400))}}
  51. if(Target:isNPC()){explosion(Target:pos()) Target:takeDamage(100000) Target:remove()}
  52. if(Target:isPlayer()){Target:takeDamage(100000)}
  53. Target:setVel(vec(sin(-owner():eyeAngles():yaw()+90)*652,cos(-owner():eyeAngles():yaw()+90)*652,600))
  54. ON=0 }
  55. #}
  56.  
  57. }}}else{
  58. if(ON==1){
  59. if(owner():isOnGround()==0){
  60. T++
  61. if(T<25){
  62.  
  63. owner():setVel(vec(-owner():vel():x()+sin(-owner():eyeAngles():yaw()+90)*1752,-owner():vel():y()+cos(-owner():eyeAngles():yaw()+90)*1752,-owner():vel():z()+10))
  64. }
  65.  
  66. if(T==26){
  67. #if(T<31){
  68. ON=0
  69. owner():setVel(vec(-owner():vel():x(),-owner():vel():y(),-owner():vel():z()))}
  70. }}
  71. }}else{T=0 ON=1}
  72.  
  73. lightCreate(1,owner():pos())
  74. lightParent(1,owner())
  75.  
  76. lightColor(1,vec(C1,C1,0))
  77. if(Target:model()=="models/holograms/hq_torus_oldsize.mdl"){
  78. if(Distance<160){
  79. owner():setHealth(owner():health()+1)
  80. C1=20
  81. owner():soundPlay(1,1,"physics/glass/glass_cup_break1.wav")
  82. Target:remove()
  83. }}
  84.  
  85. if(findResult(2):model()=="models/holograms/hq_torus_oldsize.mdl"){
  86. if(owner():pos():distance(findResult(2):pos())<160){
  87. owner():setHealth(owner():health()+1)
  88. C1=20
  89. owner():soundPlay(1,1,"physics/glass/glass_cup_break1.wav")
  90. findResult(2):remove()
  91. }}
  92.  
  93. if(findResult(3):model()=="models/holograms/hq_torus_oldsize.mdl"){
  94. if(owner():pos():distance(findResult(2):pos())<160){
  95. owner():setHealth(owner():health()+1)
  96. C1=20
  97. owner():soundPlay(1,1,"physics/glass/glass_cup_break1.wav")
  98. findResult(3):remove()
  99. }}
  100.  
  101. if(C1>0){C1--}
  102.  
  103. if(owner():getDamage()){
  104.  
  105. DMG=1
  106.  
  107. }
  108.  
  109. if(DMG==1){
  110. T2++
  111. if(T2<10){
  112. Ring=propSpawn("models/holograms/hq_torus_oldsize.mdl",1)
  113. Ring:propFreeze(0)
  114. Ring:setVel(vec(random(-500,500),random(-500,500),400))
  115. Ring:setColor(255,255,0)
  116. Ring:setPos(owner():pos()+vec(0,0,170))
  117. Ring:noCollide(owner())
  118. Ring:applyAngForce(ang(random(-200,200),random(-200,200),random(-200,200)))
  119. }else{DMG=0 T2=0}
  120. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement