Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name sonic dash by SaVav V5
- @inputs
- @outputs
- @persist T ON Ring:entity C1 T3 T2 DMG
- @trigger
- interval(1)
- if(first()){T=0 C1=0}
- findInSphere(owner():pos(),400)
- findIncludeClass("npc")
- findIncludeModel("models/props_junk/wood_crate001a.mdl")
- findIncludeModel("models/props_junk/wood_crate001a_damaged.mdl")
- findIncludeModel("models/props_junk/propane_tank001a.mdl")
- findDisallowModel("models/holograms/hq_torus_oldsize.mdl")
- findIncludeModel("models/props_c17/FurnitureDrawer001a.mdl")
- findIncludeModel("models/props_junk/wood_crate002a.mdl")
- findIncludeModel("models/mechanics/wheels/rim_1.mdl")
- findIncludeModel("models/props_phx/wheels/747wheel.mdl")
- if(owner():keyUse()==0){
- findIncludeModel("models/holograms/hq_torus_oldsize.mdl")
- }
- #findIncludeClass("player")
- findDisallowPlayer(owner())
- findExcludeEntity(owner())
- Target = findResult(1)
- Distance = owner():pos():distance(Target:pos()+vec(0,0,0))
- if(owner():keyUse()){
- if(Target){
- if(Distance<400){
- if(ON==1){
- owner():setVel(((Target:pos()+vec(0,0,112))-owner():pos())*2)
- if(Distance<120){
- 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{
- if(Target:model()=="models/mechanics/wheels/rim_1.mdl"){owner():setVel(vec(-owner():vel():x(),-owner():vel():y(),-owner():vel():z()+700))
- Target:soundPlay(1,1,"physics/rubber/rubber_tire_impact_hard1.wav")}else{
- Ring=propSpawn("models/holograms/hq_torus_oldsize.mdl",0)
- Ring:propFreeze(0)
- Ring:setVel(vec(sin(-owner():eyeAngles():yaw()+90)*400,cos(-owner():eyeAngles():yaw()+90)*400,10))
- Ring:setColor(255,255,0)
- Ring:setPos(Target:pos())
- Ring:applyAngForce(ang(random(-200,200),random(-200,200),random(-200,200)))
- Target:propBreak()
- owner():setVel(vec(-owner():vel():x(),-owner():vel():y(),-owner():vel():z()+400))}}
- if(Target:isNPC()){explosion(Target:pos()) Target:takeDamage(100000) Target:remove()}
- if(Target:isPlayer()){Target:takeDamage(100000)}
- Target:setVel(vec(sin(-owner():eyeAngles():yaw()+90)*652,cos(-owner():eyeAngles():yaw()+90)*652,600))
- ON=0 }
- #}
- }}}else{
- if(ON==1){
- if(owner():isOnGround()==0){
- T++
- if(T<25){
- 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))
- }
- if(T==26){
- #if(T<31){
- ON=0
- owner():setVel(vec(-owner():vel():x(),-owner():vel():y(),-owner():vel():z()))}
- }}
- }}else{T=0 ON=1}
- lightCreate(1,owner():pos())
- lightParent(1,owner())
- lightColor(1,vec(C1,C1,0))
- if(Target:model()=="models/holograms/hq_torus_oldsize.mdl"){
- if(Distance<160){
- owner():setHealth(owner():health()+1)
- C1=20
- owner():soundPlay(1,1,"physics/glass/glass_cup_break1.wav")
- Target:remove()
- }}
- if(findResult(2):model()=="models/holograms/hq_torus_oldsize.mdl"){
- if(owner():pos():distance(findResult(2):pos())<160){
- owner():setHealth(owner():health()+1)
- C1=20
- owner():soundPlay(1,1,"physics/glass/glass_cup_break1.wav")
- findResult(2):remove()
- }}
- if(findResult(3):model()=="models/holograms/hq_torus_oldsize.mdl"){
- if(owner():pos():distance(findResult(2):pos())<160){
- owner():setHealth(owner():health()+1)
- C1=20
- owner():soundPlay(1,1,"physics/glass/glass_cup_break1.wav")
- findResult(3):remove()
- }}
- if(C1>0){C1--}
- if(owner():getDamage()){
- DMG=1
- }
- if(DMG==1){
- T2++
- if(T2<10){
- Ring=propSpawn("models/holograms/hq_torus_oldsize.mdl",1)
- Ring:propFreeze(0)
- Ring:setVel(vec(random(-500,500),random(-500,500),400))
- Ring:setColor(255,255,0)
- Ring:setPos(owner():pos()+vec(0,0,170))
- Ring:noCollide(owner())
- Ring:applyAngForce(ang(random(-200,200),random(-200,200),random(-200,200)))
- }else{DMG=0 T2=0}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement