Advertisement
Guest User

Untitled

a guest
May 26th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.84 KB | None | 0 0
  1. @name Gnarles' propkiling Killing
  2. @outputs Mode Counter Max ZP LeadSound [MeS AttackS]:string
  3. @persist Col Hide List:array [Me Attack PLA]:entity
  4. runOnTick(1)
  5. runOnChat(1)
  6. if(first()){Me=owner(), Hide=1}
  7. if(chatClk(owner())|chatClk(Me)){#Run chat command part of program
  8. LastSaidL=lastSaid():lower() #Convert to lowercase
  9. if(chatClk(Me)){ #Controller commands
  10. if (LastSaidL=="!col") {Col=!Col, CommandRan=1}
  11. if (LastSaidL=="!stop") {Mode=0, Attack=noentity(), AttackS="", CommandRan=1}
  12. if (LastSaidL:sub(1,8)=="!attack ") {AttackS=lastSaid():sub(9,LastSaidL:length()), Mode=2, CommandRan=1}
  13. }
  14. if(chatClk(owner())){ #Owner commands
  15. if (LastSaidL=="!hide") {Hide=!Hide, CommandRan=1}
  16. if (LastSaidL=="!remove") {selfDestruct(), hint("Chip removed",5), CommandRan=1}
  17. if (LastSaidL:sub(1,8)=="!player ") {MeS=LastSaidL:sub(9,LastSaidL:length()), Mode=0, Attack=noentity(), AttackS="", CommandRan=1}
  18. if (LastSaidL=="!owner") {Me=owner(), MeS="", Mode=0, Attack=noentity(), AttackS="", CommandRan=1}
  19. }
  20. if((CommandRan)&(Hide)&(Me==owner())) {print("[Hidden]"+Me:name()+": "+lastSaid()), hideChat(1)}
  21. }#Finish chat commands
  22. if((MeS!="")&(Me:name():lower():find(MeS:lower())==0)){Me=findPlayerByName(MeS)}#Search for controller entity
  23. if((AttackS!="")&(Attack:name():lower():find(AttackS:lower())==0)){Attack=findPlayerByName(AttackS)}#Search for target entity
  24. if((Me:keyUse())&(Me:aimEntity():isPlayer())){Attack=Me:aimEntity(), Mode=2}
  25. if(tickClk()){#So main program doesn't overload from people typing
  26. findIncludePlayerProps(owner())
  27. # findByClass("gmod_balloon")
  28. # findByClass("sent_ball")
  29. findByClass("prop_physics")
  30. # findByClass("npc_rollermine")
  31. # findByClass("gmod_wire_textscreen")
  32. if(Max!=findToArray():count()){
  33. List=findToArray()
  34. Max=List:count()
  35. }
  36. if(Me:isCrouch()&(Me:inNoclip()|Me:isOnGround())){Mode=1, AttackS="", Attack=noentity()}
  37. elseif(!Me:isCrouch()&(Mode!=2)){Mode=0}
  38. if(Mode==0){
  39. if(LeadSound){soundStop(1),LeadSound=0}
  40. while(opcounter()<maxquota()){
  41. Counter++
  42. EE=List:entity(Counter)
  43. if(EE:mass()!=50000){EE:setMass(50000)}
  44. if(Col){EE:setColor(randint(255),randint(255),randint(255)),EE:setMaterial("hunter/myplastic")}else{EE:setColor(255,255,255),EE:setMaterial("")}
  45. AddCircle=curtime()*150+360/Max*Counter
  46. CircMult=50*Max/pi()
  47. CircZPlus=sin(curtime()*220+360/Max*Counter)*50+50
  48. EE:applyForce(((Me:shootPos()+vec(sin(AddCircle)*CircMult,cos(AddCircle)*CircMult,75+CircZPlus)-EE:pos())*10-EE:vel())*EE:mass())
  49. EE:applyAngForce((-EE:angVel()-EE:angles())*5*EE:mass()*ang(1,0,1))
  50. }
  51. if(Counter>Max){Counter=0}
  52. }
  53. else{
  54. EELead=List:entity(1)
  55. if(!LeadSound){EELead:soundPlay(1,0,"npc/zombie/moan_loop"+randint(1,4)+".wav"),LeadSound=1}
  56. if(Attack==noentity()){
  57. ZP=(EELead:massCenter():setZ(0)):distance(Me:aimPos():setZ(0))/2
  58. if(ZP>720){ZP=720}
  59. EELead:applyForce(((Me:aimPos()+vec(0,0,0+ZP)-EELead:massCenter())*10-EELead:vel())*EELead:mass())
  60. }else{
  61. ZP=(EELead:massCenter():setZ(0)):distance(Attack:pos():setZ(0))
  62. if(ZP>1440){ZP=1440}
  63. EELead:applyForce(((Attack:pos()+vec(0,0,0+ZP)-EELead:massCenter())*10-EELead:vel())*EELead:mass())
  64. }
  65. if(Col){EELead:setColor(randint(255),randint(255),randint(255)),EELead:setMaterial("hunter/myplastic")}else{EELead:setColor(255,255,255),EELead:setMaterial("")}
  66. while(opcounter()<maxquota()){
  67. Counter++
  68. EE=List:entity(Counter)
  69. EEOld=List:entity(Counter-1)
  70. if(Col){EE:setColor(randint(255),randint(255),randint(255)),EE:setMaterial("hunter/myplastic")}else{EE:setColor(255,255,255),EE:setMaterial("")}
  71. EE:applyForce(((EEOld:massCenter()-EE:massCenter())*10-EE:vel())*EE:mass())
  72. }
  73. if(Counter>Max){Counter=1}
  74. }
  75. }#end of chatclk statement
  76. if(PLA!=owner()) {
  77. Version=1.9
  78. PLA=owner()
  79. Me=owner(), MeS="", Mode=0, Attack=noentity(), AttackS=""
  80. if(convar("wire_expression2_concmd")){
  81. hint("---- SickProp Kill"+toString(Version)+" ----",7)
  82. hint("Instructions printed to console(~).",7)
  83. concmd("echo ### ---- SickProp Kill"+toString(Version)+" ----")
  84. concmd("echo ### Commands:")
  85. concmd("echo ### \!attack PLAYER - Puts it in snake mode, and flys to the player.")
  86. concmd("echo ### \!col - Toggles the flashing colors, and matt/orignal material.")
  87. concmd("echo ### \!hide - Toggles hiding written commands on/off.")
  88. concmd("echo ### \<CROUCH> - Puts it into snake mode, and follows your mouse.")
  89. concmd("echo ### \<USE KEY> - The snake locks on to whoever you are aiming at.")
  90. concmd("echo ### \!player PLAYER - Gives possesion of the snake to another player, they have access to all of the above commands.")
  91. concmd("echo ### \!owner - Returns possesion to the owner, does nothing if it's already the owners.")
  92. concmd("echo ### \!remove - Destroys the Expression2, and the balls drop (LOL RUDE).")
  93. concmd("echo ### \---- By Gnarles ----")
  94. }else{
  95. hint("---- SickProp Kill"+toString(Version)+" ----",7)
  96. hint("Please type \"wire_expression2_concmd 1\" into console,",7)
  97. hint("then respawn the chip for a list of commands.",7)
  98. }
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement