Cheesecaked

Npc bruh

Sep 20th, 2021 (edited)
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. @name NPC bruh
  2. @persist Array:array NPC:entity X Shoot
  3.  
  4. if(first()){
  5. runOnTick(1)
  6.  
  7. entity():propNotSolid(1)
  8. entity():setAlpha(0)
  9.  
  10. findByClass("npc_*")
  11. findSortByDistance(entity():pos())
  12. findIncludePlayerProps(owner())
  13.  
  14. Array = findToArray()
  15. #NPC = find()
  16. #NPC:npcGiveWeapon("annabelle")
  17.  
  18. for(N = 1,Array:count()){
  19. Array[N,entity]:propNotSolid(1)
  20. }
  21. }
  22.  
  23. #[
  24. X++
  25. if(X%40 == 1){
  26. NPC:npcGiveWeapon("357")
  27. }
  28. elseif(X%40 == 39){
  29. NPC:npcGiveWeapon()
  30. }
  31.  
  32. if(owner():keyUse()){
  33. NPC:npcGoRun(owner():aimPos())
  34. }
  35. else{
  36. NPC:npcShoot()
  37. }
  38. if(owner():keyAttack2()){
  39. NPC:npcSetTarget(owner():aimEntity())
  40. }
  41. ]#
  42.  
  43. if(changed(owner():keyPressed("l"))){
  44. if(owner():keyPressed("l")){
  45. if(Shoot == 1){
  46. Shoot = 0
  47. }
  48. else{
  49. Shoot = 1
  50. }
  51. }
  52. }
  53.  
  54. X++
  55. if(X%40 == 1){
  56. for(N = 1,Array:count()){
  57. Array[N,entity]:npcGiveWeapon("357")
  58. }
  59. }
  60. elseif(X%40 == 39){
  61. for(N = 1,Array:count()){
  62. Array[N,entity]:npcGiveWeapon()
  63. }
  64. }
  65.  
  66. if(owner():keyUse()){
  67. for(N = 1,Array:count()){
  68. Array[N,entity]:npcGoRun(owner():aimPos())
  69. }
  70. }
  71. else{
  72. if(Shoot == 1){
  73. for(N = 1,Array:count()){
  74. Array[N,entity]:npcShoot()
  75. }
  76. }
  77. }
  78.  
  79. if(owner():keyAttack2()){
  80. for(N = 1,Array:count()){
  81. Array[N,entity]:npcStop()
  82.  
  83. Array[N,entity]:npcRelationship(owner():aimEntity(),"hate",1)
  84. Array[N,entity]:npcSetTarget(owner():aimEntity())
  85. }
  86. }
  87.  
Add Comment
Please, Sign In to add comment