Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name LaserGUN
- @persist [B1 B2 B3]:entity [R1 R2 R3]:ranger V Alp
- #[
- ## >->->->> A32M Facility Product. All rights reserved (2016) <<-<-<-<
- ## NON FULLY ENDED VERSION
- ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ## _______ _________ _________ __ __
- ## / \ |______ \ |_______ \ | \ / |
- ## / / \ \ '\ \ \ ' | \ \ / / |
- ## | | | | '/ / / / | |\ \ / /| |
- ## | |___| | '/ | / / | | \ \ / / | |
- ## | ___ | \ \ / / | | \ / / | |
- ## | | | | \ \ / / | | | |/ | |
- ## | | | | ______/ / / /______ | | | | | |
- ## |__| |__| |________/ |________| |_| |_| |_|
- ]#
- E = entity(),O=owner()
- E:setAlpha(0)
- if(first()){
- holoCreate(0, E:toWorld(vec()),vec(), E:toWorld(ang())), holoParent(0,E)
- holoCreate( 2000, O:attachmentPos("anim_attachment_RH"), vec(), O:attachmentAng("anim_attachment_RH") ), holoParentAttachment(2000, O, "anim_attachment_RH")
- function placeToHands(){
- HAND = holoEntity(2000)
- holoParent( 0, HAND )
- holoPos(0, HAND:toWorld(vec(10,0,-11)))
- holoAng(0, HAND:toWorld(ang(-10,-0,4)))
- }
- local E = holoEntity(0)
- 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)
- 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))
- 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))
- 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))
- 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))
- 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))
- 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))
- 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))
- 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))
- 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))
- 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))
- 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))
- 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")
- 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")
- 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))
- 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")
- 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))
- 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))
- 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")
- 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")
- 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))
- 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))
- 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))
- 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))
- 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))
- 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))
- 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))
- 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))
- 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")
- 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")
- 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")
- 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")
- 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")
- 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")
- 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")
- 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")
- 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")
- 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")
- # holoUnparent(0)
- timer("APPR_HAND", 1)
- }
- interval(25)
- V = 1
- rangerPersist(1)
- rangerFilter(O)
- rangerFilter(O:weapon())
- function shoot( ) {
- V = 0
- Alp = 255
- R1 = rangerOffset(34e3, holoEntity(1):pos(), ( ( O:aimPos() ) - holoEntity(1):pos() ) )
- R2 = rangerOffset(34e3, holoEntity(1):pos(), ( ( O:aimPos() ) - holoEntity(1):pos() ) )
- R3 = rangerOffset(34e3, holoEntity(1):pos(), ( ( O:aimPos() ) - holoEntity(1):pos() ) )
- B1 = drawBeam("trails/laser", holoEntity(1):pos(), R1:position(), vec(255,0,0), 255, 6)
- B2 = drawBeam("trails/laser", holoEntity(1):pos(), R2:position(), vec(0,255,0), 255, 6)
- B3 = drawBeam("trails/laser", holoEntity(1):pos(), R3:position(), vec(0,0,255), 255, 6)
- B1:remove( random(1, 2) )
- B2:remove( random(1.5, 2.5) )
- B3:remove( random(2, 3) )
- O:setVel(-O:eye() * 300 )
- for(I = 1,10){
- O:soundPlay(I, 4, "npc/turret_floor/die.wav"), soundPitch(I, randint(80 + I*4, 120 + I*6))
- O:soundPlay(11 + I, 5, "npc/roller/blade_out.wav"), soundPitch(11 + I, randint(40 + I*4, 120 + I*10))
- }
- local N = table(R1, R2, R3)
- for(I = 1, 3){
- local RR = N[I, ranger]
- if(RR:entity():isValid()){
- RR:entity():takeDamage(random(9000,9234324), noentity(), noentity())
- RR:entity():removeConstraint("Weld")
- RR:entity():propFreeze(0)
- RR:entity():setVel(O:eye()*500000)
- }
- timer("asdf", 100000)
- }
- }
- Alp -= Alp/50
- if(floor(Alp) < 2){
- Alp = 0
- }
- if(changed(floor(Alp))&Alp > 2){
- local N = table(B1, B2, B3)
- for(I = 1,3){
- N[I, entity]:setAlpha(Alp - I*25)
- }
- }
- for(I = 1, 38){
- if(O:weapon():type()=="weapon_shotgun"){
- O:weapon():setAlpha(0)
- holoAlpha(I,255)
- }
- else{
- holoAlpha(I,0)
- }
- }
- if( changed(O:keyPressed("MOUSE_MIDDLE"))&O:keyPressed("MOUSE_MIDDLE")&O:weapon():type() == "weapon_shotgun" & V ) {
- shoot()
- }
- if(clk("asdf")){
- V = 1
- }
- if(clk("APPR_HAND")){
- placeToHands()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement