Advertisement
Guest User

ak-47 npc

a guest
Dec 15th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.58 KB | None | 0 0
  1. --by rufas - thx rufas
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. Model0 = Instance.new("Model")
  19. Part1 = Instance.new("Part")
  20. SpecialMesh2 = Instance.new("SpecialMesh")
  21. Sound3 = Instance.new("Sound")
  22. RemoteEvent4 = Instance.new("RemoteEvent")
  23. Sound5 = Instance.new("Sound")
  24. RemoteEvent6 = Instance.new("RemoteEvent")
  25. Sound7 = Instance.new("Sound")
  26. RemoteEvent8 = Instance.new("RemoteEvent")
  27. Sound9 = Instance.new("Sound")
  28. RemoteEvent10 = Instance.new("RemoteEvent")
  29. Sound11 = Instance.new("Sound")
  30. RemoteEvent12 = Instance.new("RemoteEvent")
  31. Sound13 = Instance.new("Sound")
  32. RemoteEvent14 = Instance.new("RemoteEvent")
  33. Sound15 = Instance.new("Sound")
  34. RemoteEvent16 = Instance.new("RemoteEvent")
  35. Sound17 = Instance.new("Sound")
  36. RemoteEvent18 = Instance.new("RemoteEvent")
  37. Sound19 = Instance.new("Sound")
  38. RemoteEvent20 = Instance.new("RemoteEvent")
  39. Decal21 = Instance.new("Decal")
  40. Sound22 = Instance.new("Sound")
  41. Sound23 = Instance.new("Sound")
  42. Weld24 = Instance.new("Weld")
  43. Weld25 = Instance.new("Weld")
  44. Part26 = Instance.new("Part")
  45. Decal27 = Instance.new("Decal")
  46. Motor6D28 = Instance.new("Motor6D")
  47. Motor6D29 = Instance.new("Motor6D")
  48. Motor6D30 = Instance.new("Motor6D")
  49. Motor6D31 = Instance.new("Motor6D")
  50. Motor6D32 = Instance.new("Motor6D")
  51. Part33 = Instance.new("Part")
  52. Part34 = Instance.new("Part")
  53. Part35 = Instance.new("Part")
  54. Part36 = Instance.new("Part")
  55. Humanoid37 = Instance.new("Humanoid")
  56. Part38 = Instance.new("Part")
  57. Motor6D39 = Instance.new("Motor6D")
  58. Script40 = Instance.new("Script")
  59. BodyColors41 = Instance.new("BodyColors")
  60. Accessory42 = Instance.new("Accessory")
  61. Part43 = Instance.new("Part")
  62. SpecialMesh44 = Instance.new("SpecialMesh")
  63. Vector3Value45 = Instance.new("Vector3Value")
  64. Weld46 = Instance.new("Weld")
  65. Hat47 = Instance.new("Hat")
  66. Part48 = Instance.new("Part")
  67. SpecialMesh49 = Instance.new("SpecialMesh")
  68. Hat50 = Instance.new("Hat")
  69. Part51 = Instance.new("Part")
  70. SpecialMesh52 = Instance.new("SpecialMesh")
  71. Shirt53 = Instance.new("Shirt")
  72. Pants54 = Instance.new("Pants")
  73. Part55 = Instance.new("Part")
  74. SpecialMesh56 = Instance.new("SpecialMesh")
  75. Sound57 = Instance.new("Sound")
  76. Script58 = Instance.new("Script")
  77. Model0.Name = "Gun NPC"
  78. Model0.Parent = mas
  79. Model0.PrimaryPart = Part1
  80. Part1.Name = "Head"
  81. Part1.Parent = Model0
  82. Part1.CFrame = CFrame.new(7.23859119, 4.50220299, -35.4370995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  83. Part1.Position = Vector3.new(7.23859119, 4.50220299, -35.4370995)
  84. Part1.Color = Color3.new(1, 0.8, 0.6)
  85. Part1.Size = Vector3.new(2, 1, 1)
  86. Part1.BrickColor = BrickColor.new("Pastel brown")
  87. Part1.TopSurface = Enum.SurfaceType.Smooth
  88. Part1.brickColor = BrickColor.new("Pastel brown")
  89. Part1.FormFactor = Enum.FormFactor.Symmetric
  90. Part1.formFactor = Enum.FormFactor.Symmetric
  91. SpecialMesh2.Parent = Part1
  92. SpecialMesh2.Scale = Vector3.new(1.25, 1.25, 1.25)
  93. Sound3.Name = "GettingUp"
  94. Sound3.Parent = Part1
  95. Sound3.MaxDistance = 150
  96. Sound3.EmitterSize = 5
  97. Sound3.MinDistance = 5
  98. Sound3.SoundId = "rbxasset://sounds/action_get_up.mp3"
  99. Sound3.Volume = 0.64999997615814
  100. RemoteEvent4.Name = "CharacterSoundEvent"
  101. RemoteEvent4.Parent = Sound3
  102. Sound5.Name = "Died"
  103. Sound5.Parent = Part1
  104. Sound5.MaxDistance = 150
  105. Sound5.EmitterSize = 5
  106. Sound5.MinDistance = 5
  107. Sound5.SoundId = "rbxasset://sounds/uuhhh.mp3"
  108. Sound5.Volume = 0.64999997615814
  109. RemoteEvent6.Name = "CharacterSoundEvent"
  110. RemoteEvent6.Parent = Sound5
  111. Sound7.Name = "FreeFalling"
  112. Sound7.Parent = Part1
  113. Sound7.Looped = true
  114. Sound7.TimePosition = 0.23687450328543
  115. Sound7.MaxDistance = 150
  116. Sound7.EmitterSize = 5
  117. Sound7.MinDistance = 5
  118. Sound7.SoundId = "rbxasset://sounds/action_falling.mp3"
  119. Sound7.Volume = 0
  120. RemoteEvent8.Name = "CharacterSoundEvent"
  121. RemoteEvent8.Parent = Sound7
  122. Sound9.Name = "Jumping"
  123. Sound9.Parent = Part1
  124. Sound9.MaxDistance = 150
  125. Sound9.EmitterSize = 5
  126. Sound9.MinDistance = 5
  127. Sound9.SoundId = "rbxasset://sounds/action_jump.mp3"
  128. Sound9.Volume = 0.64999997615814
  129. RemoteEvent10.Name = "CharacterSoundEvent"
  130. RemoteEvent10.Parent = Sound9
  131. Sound11.Name = "Landing"
  132. Sound11.Parent = Part1
  133. Sound11.MaxDistance = 150
  134. Sound11.EmitterSize = 5
  135. Sound11.MinDistance = 5
  136. Sound11.SoundId = "rbxasset://sounds/action_jump_land.mp3"
  137. Sound11.Volume = 1
  138. RemoteEvent12.Name = "CharacterSoundEvent"
  139. RemoteEvent12.Parent = Sound11
  140. Sound13.Name = "Splash"
  141. Sound13.Parent = Part1
  142. Sound13.MaxDistance = 150
  143. Sound13.EmitterSize = 5
  144. Sound13.MinDistance = 5
  145. Sound13.SoundId = "rbxasset://sounds/impact_water.mp3"
  146. Sound13.Volume = 0.64999997615814
  147. RemoteEvent14.Name = "CharacterSoundEvent"
  148. RemoteEvent14.Parent = Sound13
  149. Sound15.Name = "Running"
  150. Sound15.Parent = Part1
  151. Sound15.Looped = true
  152. Sound15.MaxDistance = 150
  153. Sound15.EmitterSize = 5
  154. Sound15.MinDistance = 5
  155. Sound15.Pitch = 1.8500000238419
  156. Sound15.PlaybackSpeed = 1.8500000238419
  157. Sound15.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
  158. Sound15.Volume = 0.64999997615814
  159. RemoteEvent16.Name = "CharacterSoundEvent"
  160. RemoteEvent16.Parent = Sound15
  161. Sound17.Name = "Swimming"
  162. Sound17.Parent = Part1
  163. Sound17.Looped = true
  164. Sound17.MaxDistance = 150
  165. Sound17.EmitterSize = 5
  166. Sound17.MinDistance = 5
  167. Sound17.Pitch = 1.6000000238419
  168. Sound17.PlaybackSpeed = 1.6000000238419
  169. Sound17.SoundId = "rbxasset://sounds/action_swim.mp3"
  170. Sound17.Volume = 0.64999997615814
  171. RemoteEvent18.Name = "CharacterSoundEvent"
  172. RemoteEvent18.Parent = Sound17
  173. Sound19.Name = "Climbing"
  174. Sound19.Parent = Part1
  175. Sound19.Looped = true
  176. Sound19.MaxDistance = 150
  177. Sound19.EmitterSize = 5
  178. Sound19.MinDistance = 5
  179. Sound19.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
  180. Sound19.Volume = 0.64999997615814
  181. RemoteEvent20.Name = "CharacterSoundEvent"
  182. RemoteEvent20.Parent = Sound19
  183. Decal21.Name = "face"
  184. Decal21.Parent = Part1
  185. Decal21.Texture = "http://www.roblox.com/asset/?id=7074780"
  186. Sound22.Name = "The Prodigy - Voodoo People (Pendulum Remix)"
  187. Sound22.Parent = Part1
  188. Sound22.Looped = true
  189. Sound22.Playing = true
  190. Sound22.SoundId = "rbxassetid://775076753"
  191. Sound22.Volume = 3
  192. Sound23.Name = "footstep"
  193. Sound23.Parent = Part1
  194. Sound23.SoundId = "rbxassetid://131436155"
  195. Sound23.Volume = 8
  196. Weld24.Name = "HeadWeld"
  197. Weld24.Parent = Part1
  198. Weld24.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  199. Weld24.C1 = CFrame.new(0, 0.075000003, 0.0500000007, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  200. Weld24.Part0 = Part1
  201. Weld24.Part1 = Part48
  202. Weld24.part1 = Part48
  203. Weld25.Name = "HeadWeld"
  204. Weld25.Parent = Part1
  205. Weld25.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  206. Weld25.C1 = CFrame.new(0, 0.25999999, 0.150000006, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  207. Weld25.Part0 = Part1
  208. Weld25.Part1 = Part51
  209. Weld25.part1 = Part51
  210. Part26.Name = "Torso"
  211. Part26.Parent = Model0
  212. Part26.CFrame = CFrame.new(7.23859119, 3.00220299, -35.4370995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  213. Part26.Position = Vector3.new(7.23859119, 3.00220299, -35.4370995)
  214. Part26.Color = Color3.new(0, 1, 0)
  215. Part26.Size = Vector3.new(2, 2, 1)
  216. Part26.BrickColor = BrickColor.new("Lime green")
  217. Part26.LeftParamA = 0
  218. Part26.LeftParamB = 0
  219. Part26.LeftSurface = Enum.SurfaceType.Weld
  220. Part26.RightParamA = 0
  221. Part26.RightParamB = 0
  222. Part26.RightSurface = Enum.SurfaceType.Weld
  223. Part26.brickColor = BrickColor.new("Lime green")
  224. Part26.FormFactor = Enum.FormFactor.Symmetric
  225. Part26.formFactor = Enum.FormFactor.Symmetric
  226. Decal27.Name = "roblox"
  227. Decal27.Parent = Part26
  228. Motor6D28.Name = "Left Shoulder"
  229. Motor6D28.Parent = Part26
  230. Motor6D28.MaxVelocity = 0.10000000149012
  231. Motor6D28.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  232. Motor6D28.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  233. Motor6D28.Part0 = Part26
  234. Motor6D28.Part1 = Part33
  235. Motor6D28.part1 = Part33
  236. Motor6D29.Name = "Right Hip"
  237. Motor6D29.Parent = Part26
  238. Motor6D29.MaxVelocity = 0.10000000149012
  239. Motor6D29.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  240. Motor6D29.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  241. Motor6D29.Part0 = Part26
  242. Motor6D29.Part1 = Part36
  243. Motor6D29.part1 = Part36
  244. Motor6D30.Name = "Left Hip"
  245. Motor6D30.Parent = Part26
  246. Motor6D30.MaxVelocity = 0.10000000149012
  247. Motor6D30.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  248. Motor6D30.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  249. Motor6D30.Part0 = Part26
  250. Motor6D30.Part1 = Part35
  251. Motor6D30.part1 = Part35
  252. Motor6D31.Name = "Right Shoulder"
  253. Motor6D31.Parent = Part26
  254. Motor6D31.MaxVelocity = 0.10000000149012
  255. Motor6D31.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  256. Motor6D31.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  257. Motor6D31.Part0 = Part26
  258. Motor6D31.Part1 = Part34
  259. Motor6D31.part1 = Part34
  260. Motor6D32.Name = "Neck"
  261. Motor6D32.Parent = Part26
  262. Motor6D32.MaxVelocity = 0.10000000149012
  263. Motor6D32.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  264. Motor6D32.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  265. Motor6D32.Part0 = Part26
  266. Motor6D32.Part1 = Part1
  267. Motor6D32.part1 = Part1
  268. Part33.Name = "Left Arm"
  269. Part33.Parent = Model0
  270. Part33.CFrame = CFrame.new(5.73859119, 3.00220299, -35.4370995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  271. Part33.Position = Vector3.new(5.73859119, 3.00220299, -35.4370995)
  272. Part33.Color = Color3.new(1, 0.8, 0.6)
  273. Part33.Size = Vector3.new(1, 2, 1)
  274. Part33.BrickColor = BrickColor.new("Pastel brown")
  275. Part33.CanCollide = false
  276. Part33.brickColor = BrickColor.new("Pastel brown")
  277. Part33.FormFactor = Enum.FormFactor.Symmetric
  278. Part33.formFactor = Enum.FormFactor.Symmetric
  279. Part34.Name = "Right Arm"
  280. Part34.Parent = Model0
  281. Part34.CFrame = CFrame.new(8.73859119, 3.00220299, -35.4370995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  282. Part34.Position = Vector3.new(8.73859119, 3.00220299, -35.4370995)
  283. Part34.Color = Color3.new(1, 0.8, 0.6)
  284. Part34.Size = Vector3.new(1, 2, 1)
  285. Part34.BrickColor = BrickColor.new("Pastel brown")
  286. Part34.CanCollide = false
  287. Part34.brickColor = BrickColor.new("Pastel brown")
  288. Part34.FormFactor = Enum.FormFactor.Symmetric
  289. Part34.formFactor = Enum.FormFactor.Symmetric
  290. Part35.Name = "Left Leg"
  291. Part35.Parent = Model0
  292. Part35.CFrame = CFrame.new(6.73859119, 1.00220299, -35.4370995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  293. Part35.Position = Vector3.new(6.73859119, 1.00220299, -35.4370995)
  294. Part35.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  295. Part35.Size = Vector3.new(1, 2, 1)
  296. Part35.BottomSurface = Enum.SurfaceType.Smooth
  297. Part35.BrickColor = BrickColor.new("Really black")
  298. Part35.CanCollide = false
  299. Part35.brickColor = BrickColor.new("Really black")
  300. Part35.FormFactor = Enum.FormFactor.Symmetric
  301. Part35.formFactor = Enum.FormFactor.Symmetric
  302. Part36.Name = "Right Leg"
  303. Part36.Parent = Model0
  304. Part36.CFrame = CFrame.new(7.73859119, 1.00220299, -35.4370995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  305. Part36.Position = Vector3.new(7.73859119, 1.00220299, -35.4370995)
  306. Part36.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  307. Part36.Size = Vector3.new(1, 2, 1)
  308. Part36.BottomSurface = Enum.SurfaceType.Smooth
  309. Part36.BrickColor = BrickColor.new("Really black")
  310. Part36.CanCollide = false
  311. Part36.brickColor = BrickColor.new("Really black")
  312. Part36.FormFactor = Enum.FormFactor.Symmetric
  313. Part36.formFactor = Enum.FormFactor.Symmetric
  314. Humanoid37.Parent = Model0
  315. Humanoid37.LeftLeg = Part35
  316. Humanoid37.RightLeg = Part36
  317. Humanoid37.Torso = Part38
  318. Part38.Name = "HumanoidRootPart"
  319. Part38.Parent = Model0
  320. Part38.CFrame = CFrame.new(7.23859119, 3.00220299, -35.4370995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  321. Part38.Position = Vector3.new(7.23859119, 3.00220299, -35.4370995)
  322. Part38.Transparency = 1
  323. Part38.Size = Vector3.new(2, 2, 1)
  324. Part38.BottomSurface = Enum.SurfaceType.Smooth
  325. Part38.CanCollide = false
  326. Part38.LeftParamA = 0
  327. Part38.LeftParamB = 0
  328. Part38.RightParamA = 0
  329. Part38.RightParamB = 0
  330. Part38.TopSurface = Enum.SurfaceType.Smooth
  331. Part38.FormFactor = Enum.FormFactor.Symmetric
  332. Part38.formFactor = Enum.FormFactor.Symmetric
  333. Motor6D39.Name = "RootJoint"
  334. Motor6D39.Parent = Part38
  335. Motor6D39.MaxVelocity = 0.10000000149012
  336. Motor6D39.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  337. Motor6D39.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  338. Motor6D39.Part0 = Part38
  339. Motor6D39.Part1 = Part26
  340. Motor6D39.part1 = Part26
  341. Script40.Name = "Health"
  342. Script40.Parent = Model0
  343. table.insert(cors,sandbox(Script40,function()
  344. -- Gradually regenerates the Humanoid's Health over time.
  345.  
  346. local REGEN_RATE = 1/100 -- Regenerate this fraction of MaxHealth per second.
  347. local REGEN_STEP = 1 -- Wait this long between each regeneration step.
  348.  
  349. --------------------------------------------------------------------------------
  350.  
  351. local Character = script.Parent
  352. local Humanoid = Character:WaitForChild'Humanoid'
  353.  
  354. --------------------------------------------------------------------------------
  355.  
  356. while true do
  357. while Humanoid.Health < Humanoid.MaxHealth do
  358. local dt = wait(REGEN_STEP)
  359. local dh = dt*REGEN_RATE*Humanoid.MaxHealth
  360. Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
  361. end
  362. Humanoid.HealthChanged:Wait()
  363. end
  364. end))
  365. BodyColors41.Parent = Model0
  366. BodyColors41.HeadColor = BrickColor.new("Pastel brown")
  367. BodyColors41.HeadColor3 = Color3.new(1, 0.8, 0.6)
  368. BodyColors41.LeftArmColor = BrickColor.new("Pastel brown")
  369. BodyColors41.LeftArmColor3 = Color3.new(1, 0.8, 0.6)
  370. BodyColors41.LeftLegColor = BrickColor.new("Really black")
  371. BodyColors41.LeftLegColor3 = Color3.new(0.0666667, 0.0666667, 0.0666667)
  372. BodyColors41.RightArmColor = BrickColor.new("Pastel brown")
  373. BodyColors41.RightArmColor3 = Color3.new(1, 0.8, 0.6)
  374. BodyColors41.RightLegColor = BrickColor.new("Really black")
  375. BodyColors41.RightLegColor3 = Color3.new(0.0666667, 0.0666667, 0.0666667)
  376. BodyColors41.TorsoColor = BrickColor.new("Lime green")
  377. BodyColors41.TorsoColor3 = Color3.new(0, 1, 0)
  378. Accessory42.Name = "Bandana"
  379. Accessory42.Parent = Model0
  380. Accessory42.AttachmentPoint = CFrame.new(0, 0.800000012, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  381. Accessory42.AttachmentPos = Vector3.new(0, 0.800000012, 0)
  382. Part43.Name = "Handle"
  383. Part43.Parent = Accessory42
  384. Part43.CFrame = CFrame.new(7.23859119, 4.2022028, -35.4368286, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  385. Part43.Position = Vector3.new(7.23859119, 4.2022028, -35.4368286)
  386. Part43.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  387. Part43.Size = Vector3.new(1, 1, 1)
  388. Part43.BottomSurface = Enum.SurfaceType.Smooth
  389. Part43.BrickColor = BrickColor.new("Really black")
  390. Part43.CanCollide = false
  391. Part43.TopSurface = Enum.SurfaceType.Smooth
  392. Part43.brickColor = BrickColor.new("Really black")
  393. Part43.FormFactor = Enum.FormFactor.Symmetric
  394. Part43.formFactor = Enum.FormFactor.Symmetric
  395. SpecialMesh44.Parent = Part43
  396. SpecialMesh44.MeshId = "http://www.roblox.com/asset/?id=20637493"
  397. SpecialMesh44.Scale = Vector3.new(1, 0.899999976, 1)
  398. SpecialMesh44.VertexColor = Vector3.new(0, 0, 0)
  399. SpecialMesh44.TextureId = "http://www.roblox.com/asset/?id=143631818 "
  400. SpecialMesh44.MeshType = Enum.MeshType.FileMesh
  401. Vector3Value45.Name = "OriginalSize"
  402. Vector3Value45.Parent = Part43
  403. Vector3Value45.Value = Vector3.new(1, 1, 1)
  404. Weld46.Name = "AccessoryWeld"
  405. Weld46.Parent = Part43
  406. Weld46.C0 = CFrame.new(3.93629307e-09, 0.300000191, -0.600272298, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  407. Weld46.C1 = CFrame.new(0, 0, -0.600000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  408. Weld46.Part0 = Part43
  409. Weld46.Part1 = Part1
  410. Weld46.part1 = Part1
  411. Hat47.Name = "Black Charmer"
  412. Hat47.Parent = Model0
  413. Hat47.AttachmentPoint = CFrame.new(0, 0.075000003, 0.0500000007, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  414. Hat47.AttachmentPos = Vector3.new(0, 0.075000003, 0.0500000007)
  415. Part48.Name = "Handle"
  416. Part48.Parent = Hat47
  417. Part48.CFrame = CFrame.new(7.23859119, 4.92720318, -35.4870987, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  418. Part48.Position = Vector3.new(7.23859119, 4.92720318, -35.4870987)
  419. Part48.Size = Vector3.new(1.19999957, 1, 1.5999999)
  420. Part48.BottomSurface = Enum.SurfaceType.Smooth
  421. Part48.CanCollide = false
  422. Part48.TopSurface = Enum.SurfaceType.Smooth
  423. Part48.FormFactor = Enum.FormFactor.Custom
  424. Part48.formFactor = Enum.FormFactor.Custom
  425. SpecialMesh49.Parent = Part48
  426. SpecialMesh49.MeshId = "http://www.roblox.com/asset/?id=74878559"
  427. SpecialMesh49.Scale = Vector3.new(1.04999995, 1, 1.04999995)
  428. SpecialMesh49.TextureId = "http://www.roblox.com/asset/?id=21557995"
  429. SpecialMesh49.MeshType = Enum.MeshType.FileMesh
  430. Hat50.Name = "ClockworksShades"
  431. Hat50.Parent = Model0
  432. Hat50.AttachmentPoint = CFrame.new(0, 0.25999999, 0.150000006, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  433. Hat50.AttachmentPos = Vector3.new(0, 0.25999999, 0.150000006)
  434. Part51.Name = "Handle"
  435. Part51.Parent = Hat50
  436. Part51.CFrame = CFrame.new(7.23859119, 4.74220276, -35.587101, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  437. Part51.Position = Vector3.new(7.23859119, 4.74220276, -35.587101)
  438. Part51.Size = Vector3.new(1, 1.60000002, 1)
  439. Part51.BottomSurface = Enum.SurfaceType.Smooth
  440. Part51.CanCollide = false
  441. Part51.Material = Enum.Material.DiamondPlate
  442. Part51.TopSurface = Enum.SurfaceType.Smooth
  443. Part51.FormFactor = Enum.FormFactor.Plate
  444. Part51.formFactor = Enum.FormFactor.Plate
  445. SpecialMesh52.Parent = Part51
  446. SpecialMesh52.MeshId = "http://www.roblox.com/asset/?id=1577360"
  447. SpecialMesh52.Scale = Vector3.new(1, 1.29999995, 1)
  448. SpecialMesh52.VertexColor = Vector3.new(0, 0, 0)
  449. SpecialMesh52.TextureId = "http://www.roblox.com/asset/?id=175673588"
  450. SpecialMesh52.MeshType = Enum.MeshType.FileMesh
  451. Shirt53.Name = "Shirt"
  452. Shirt53.Parent = Model0
  453. Shirt53.ShirtTemplate = "rbxassetid://463141967"
  454. Pants54.Name = "Pants"
  455. Pants54.Parent = Model0
  456. Pants54.PantsTemplate = "rbxassetid://175974404"
  457. Part55.Name = "AK-47"
  458. Part55.Parent = Model0
  459. Part55.CFrame = CFrame.new(9.5386343, 1.00001204, -38.5371246, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  460. Part55.Position = Vector3.new(9.5386343, 1.00001204, -38.5371246)
  461. Part55.Size = Vector3.new(1, 2, 6)
  462. Part55.BottomSurface = Enum.SurfaceType.Smooth
  463. Part55.CanCollide = false
  464. Part55.TopSurface = Enum.SurfaceType.Smooth
  465. SpecialMesh56.Parent = Part55
  466. SpecialMesh56.MeshId = "rbxassetid://477006495"
  467. SpecialMesh56.Scale = Vector3.new(0.0399999991, 0.0399999991, 0.0399999991)
  468. SpecialMesh56.TextureId = "rbxassetid://477006525"
  469. SpecialMesh56.MeshType = Enum.MeshType.FileMesh
  470. Sound57.Name = "shoot"
  471. Sound57.Parent = Part55
  472. Sound57.SoundId = "rbxassetid://139711658"
  473. Sound57.Volume = 0.80000001192093
  474. Script58.Name = "NPC AI"
  475. Script58.Parent = Model0
  476. table.insert(cors,sandbox(Script58,function()
  477. --Fully made by Rufus14
  478. --animations are made with :lerp()
  479. --you can convert the model to use it in script builder
  480. local npc = script.Parent
  481. local torso = npc.Torso
  482. local head = npc.Head
  483. local leftarm = npc["Left Arm"]
  484. local rightarm = npc["Right Arm"]
  485. local leftleg = npc["Left Leg"]
  486. local rightleg = npc["Right Leg"]
  487. local npchumanoid = npc.Humanoid
  488. local aksound = npc["AK-47"].shoot
  489. --Motor6D's
  490. local neck = torso.Neck
  491. neck.C1 = CFrame.new(0,0,0)
  492. local leftshoulder = torso["Left Shoulder"]
  493. leftshoulder.C1 = CFrame.new(0,0,0)
  494. local rightshoulder = torso["Right Shoulder"]
  495. rightshoulder.C1 = CFrame.new(0,0,0)
  496. local lefthip = torso["Left Hip"]
  497. lefthip.C1 = CFrame.new(0,0,0)
  498. local righthip = torso["Right Hip"]
  499. righthip.C1 = CFrame.new(0,0,0)
  500. local root = npc.HumanoidRootPart.RootJoint
  501. root.C1 = CFrame.new(0,0,0)
  502. --
  503. local sight = 120
  504. local walking = false
  505. local shooting = false
  506. local canshoot = true
  507. local cansay = true
  508. local saycooldown = 0
  509. local akweld = Instance.new("Weld", npc["AK-47"])
  510. akweld.Part0 = rightarm
  511. akweld.Part1 = npc["AK-47"]
  512. function walkanim(walkspeed)
  513. if walkspeed > 5 then
  514. walking = true
  515. else
  516. walking = false
  517. end
  518. end
  519. npchumanoid.Running:connect(walkanim)
  520. function randomwalk()
  521. while wait(math.random(3,6)) do
  522. if not shooting and not walking then
  523. npchumanoid.WalkSpeed = 16
  524. local function createwalkpart()
  525. local walkpart = Instance.new("Part", npc)
  526. walkpart.Size = Vector3.new(1,1,1)
  527. walkpart.Anchored = true
  528. walkpart.Material = "Neon"
  529. walkpart.Transparency = 1
  530. walkpart.BrickColor = BrickColor.new("Maroon")
  531. walkpart.CFrame = torso.CFrame * CFrame.new(math.random(-60,60),math.random(-30,30),math.random(-60,60))
  532. local path = game:GetService("PathfindingService"):FindPathAsync(torso.Position, walkpart.Position)
  533. local waypoints = path:GetWaypoints()
  534. if path.Status == Enum.PathStatus.Success then
  535. for i,v in pairs(waypoints) do
  536. local pospart = Instance.new("Part", npc)
  537. pospart.Size = Vector3.new(1,1,1)
  538. pospart.Anchored = true
  539. pospart.Material = "Neon"
  540. pospart.Transparency = 1
  541. pospart.Position = v.Position
  542. pospart.Name = "pospart"
  543. pospart.CanCollide = false
  544. end
  545. for i,v in pairs(waypoints) do
  546. npchumanoid:MoveTo(v.Position)
  547. local allow = 0
  548. while (torso.Position - v.Position).magnitude > 4 and allow < 35 do
  549. allow = allow + 1
  550. wait()
  551. end
  552. if v.Action == Enum.PathWaypointAction.Jump then
  553. npchumanoid.Jump = true
  554. end
  555. end
  556. for i,v in pairs(npc:GetChildren()) do
  557. if v.Name == "pospart" then
  558. v:destroy()
  559. end
  560. end
  561. else
  562. createwalkpart()
  563. wait()
  564. end
  565. walkpart:destroy()
  566. end
  567. createwalkpart()
  568. end
  569. end
  570. end
  571. function checkandshoot()
  572. while wait() do
  573. saycooldown = saycooldown + 1
  574. if saycooldown == 500 then
  575. cansay = true
  576. saycooldown = 0
  577. end
  578. for i,v in pairs(workspace:GetChildren()) do
  579. if v.ClassName == "Model" and v.Name ~= "Rufus14" then
  580. local victimhumanoid = v:findFirstChildOfClass("Humanoid")
  581. local victimhead = v:findFirstChild("Head")
  582. if victimhumanoid and victimhead and v.Name ~= npc.Name then
  583. if (victimhead.Position - head.Position).magnitude < sight then
  584. if victimhumanoid.Name == "noneofurbusiness" and cansay then
  585.  
  586. elseif not shooting and victimhumanoid.Health > 0 and canshoot then
  587. shooting = true
  588. walking = false
  589. local doesshoot = 0
  590. local hpnow = npchumanoid.Health
  591. local walk = 0
  592. npchumanoid.WalkSpeed = 0
  593. while shooting and (victimhead.Position - head.Position).magnitude < sight and victimhumanoid.Health > 0 and canshoot do
  594. doesshoot = doesshoot + 1
  595. walk = walk + 1
  596. if npchumanoid.PlatformStand == false then
  597. npc.HumanoidRootPart.CFrame = CFrame.new(npc.HumanoidRootPart.Position,Vector3.new(victimhead.Position.x,npc.HumanoidRootPart.Position.y,victimhead.Position.z))
  598. end
  599. if walk == 100 and not walking then
  600. local function createwalkpart()
  601. local walkpart = Instance.new("Part", npc)
  602. walkpart.Size = Vector3.new(1,1,1)
  603. walkpart.Anchored = true
  604. walkpart.Material = "Neon"
  605. walkpart.Transparency = 1
  606. walkpart.BrickColor = BrickColor.new("Maroon")
  607. walkpart.CFrame = torso.CFrame * CFrame.new(-math.random(20,60),math.random(-40,40),math.random(-10,10))
  608. local path = game:GetService("PathfindingService"):FindPathAsync(torso.Position, walkpart.Position)
  609. local waypoints = path:GetWaypoints()
  610. if path.Status == Enum.PathStatus.Success then
  611. shooting = false
  612. canshoot = false
  613. npchumanoid.WalkSpeed = 20
  614. for i,v in pairs(waypoints) do
  615. local pospart = Instance.new("Part", npc)
  616. pospart.Size = Vector3.new(1,1,1)
  617. pospart.Anchored = true
  618. pospart.Material = "Neon"
  619. pospart.Transparency = 1
  620. pospart.Position = v.Position
  621. pospart.Name = "pospart"
  622. pospart.CanCollide = false
  623. end
  624. for i,v in pairs(waypoints) do
  625. npchumanoid:MoveTo(v.Position)
  626. local allow = 0
  627. while (torso.Position - v.Position).magnitude > 4 and allow < 35 do
  628. allow = allow + 1
  629. wait()
  630. end
  631. if v.Action == Enum.PathWaypointAction.Jump then
  632. npchumanoid.Jump = true
  633. end
  634. end
  635. canshoot = true
  636. npchumanoid.WalkSpeed = 16
  637. for i,v in pairs(npc:GetChildren()) do
  638. if v.Name == "pospart" then
  639. v:destroy()
  640. end
  641. end
  642. else
  643. createwalkpart()
  644. wait()
  645. end
  646. walkpart:destroy()
  647. end
  648. createwalkpart()
  649. end
  650. if doesshoot == 5 then
  651. doesshoot = 0
  652. npc["AK-47"].shoot:Play()
  653. local bullet = Instance.new("Part", npc)
  654. bullet.Size = Vector3.new(0.3,0.3,3.5)
  655. bullet.Material = "Neon"
  656. bullet.CFrame = npc["AK-47"].CFrame * CFrame.new(0,0,-4)
  657. bullet.CanCollide = false
  658. local velocity = Instance.new("BodyVelocity", bullet)
  659. velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  660. bullet.CFrame = CFrame.new(bullet.Position, victimhead.Position)
  661. velocity.Velocity = bullet.CFrame.lookVector * 500 + Vector3.new(math.random(-25,25),math.random(-25,25),0)
  662. local pointlight = Instance.new("PointLight", npc["AK-47"])
  663. game.Debris:AddItem(pointlight,0.1)
  664. local function damage(part)
  665. local damage = math.random(5)
  666. if part.Parent.ClassName ~= "Accessory" and part.Parent.Parent.ClassName ~= "Accessory" and part.ClassName ~= "Accessory" and part.Parent.Name ~= npc.Name and part.CanCollide == true then
  667. bullet:destroy()
  668. local victimhumanoid = part.Parent:findFirstChildOfClass("Humanoid")
  669. if victimhumanoid then
  670. if victimhumanoid.Health > damage then
  671. victimhumanoid:TakeDamage(damage)
  672. else
  673. victimhumanoid:TakeDamage(damage)
  674. end
  675. end
  676. end
  677. end
  678. game.Debris:AddItem(bullet, 5)
  679. bullet.Touched:connect(damage)
  680. end
  681. wait()
  682. end
  683. walking = false
  684. shooting = false
  685. end
  686. end
  687. end
  688. end
  689. end
  690. end
  691. end
  692. function run()
  693. while wait() do
  694. local hpnow = npchumanoid.Health
  695. wait()
  696. if npchumanoid.Health < hpnow then
  697. local dorun = math.random(1,1)
  698. if dorun == 1 and not walking then
  699. local function createwalkpart()
  700. local walkpart = Instance.new("Part", npc)
  701. walkpart.Size = Vector3.new(1,1,1)
  702. walkpart.Anchored = true
  703. walkpart.Material = "Neon"
  704. walkpart.Transparency = 1
  705. walkpart.BrickColor = BrickColor.new("Maroon")
  706. walkpart.CFrame = torso.CFrame * CFrame.new(math.random(20,60),math.random(-20,20),math.random(-60,60))
  707. local path = game:GetService("PathfindingService"):FindPathAsync(torso.Position, walkpart.Position)
  708. local waypoints = path:GetWaypoints()
  709. if path.Status == Enum.PathStatus.Success then
  710. shooting = false
  711. canshoot = false
  712. walking = true
  713. npchumanoid.WalkSpeed = 20
  714. for i,v in pairs(waypoints) do
  715. local pospart = Instance.new("Part", npc)
  716. pospart.Size = Vector3.new(1,1,1)
  717. pospart.Anchored = true
  718. pospart.Material = "Neon"
  719. pospart.Transparency = 1
  720. pospart.Position = v.Position
  721. pospart.Name = "pospart"
  722. pospart.CanCollide = false
  723. end
  724. for i,v in pairs(waypoints) do
  725. npchumanoid:MoveTo(v.Position)
  726. local allow = 0
  727. while (torso.Position - v.Position).magnitude > 4 and allow < 35 do
  728. allow = allow + 1
  729. wait()
  730. end
  731. if v.Action == Enum.PathWaypointAction.Jump then
  732. npchumanoid.Jump = true
  733. end
  734. end
  735. shooting = false
  736. canshoot = true
  737. walking = false
  738. npchumanoid.WalkSpeed = 16
  739. for i,v in pairs(npc:GetChildren()) do
  740. if v.Name == "pospart" then
  741. v:destroy()
  742. end
  743. end
  744. else
  745. createwalkpart()
  746. wait()
  747. end
  748. walkpart:destroy()
  749. end
  750. createwalkpart()
  751. end
  752. end
  753. end
  754. end
  755. function death()
  756. if head:findFirstChild("The Prodigy - Voodoo People (Pendulum Remix)") then
  757. head["The Prodigy - Voodoo People (Pendulum Remix)"]:destroy()
  758. end
  759. npchumanoid.Archivable = true
  760. local zombiecorpse = npchumanoid.Parent:Clone()
  761. npchumanoid.Parent:destroy()
  762. zombiecorpse.Parent = workspace
  763. game.Debris:AddItem(zombiecorpse, 15)
  764. local Humanoid = zombiecorpse:findFirstChildOfClass("Humanoid")
  765. local Torso = zombiecorpse.Torso
  766. Humanoid.PlatformStand = true
  767. Humanoid:SetStateEnabled("Dead", false)
  768. for i,v in pairs(Humanoid.Parent.Torso:GetChildren()) do
  769. if v.ClassName == 'Motor6D' or v.ClassName == 'Weld' then
  770. v:destroy()
  771. end
  772. end
  773. for i,v in pairs(zombiecorpse:GetChildren()) do
  774. if v.ClassName == "Part" then
  775. for q,w in pairs(v:GetChildren()) do
  776. if w.ClassName == "BodyPosition" or w.ClassName == "BodyVelocity" then
  777. w:destroy()
  778. end
  779. end
  780. end
  781. end
  782. local function makeconnections(limb, attachementone, attachmenttwo, twistlower, twistupper, upperangle)
  783. local connection = Instance.new('BallSocketConstraint', limb)
  784. connection.LimitsEnabled = true
  785. connection.Attachment0 = attachementone
  786. connection.Attachment1 = attachmenttwo
  787. connection.TwistLimitsEnabled = true
  788. connection.TwistLowerAngle = twistlower
  789. connection.TwistUpperAngle = twistupper
  790. connection.UpperAngle = 70
  791. end
  792. local function makehingeconnections(limb, attachementone, attachmenttwo, twistlower, twistupper, upperangle)
  793. local connection = Instance.new('HingeConstraint', limb)
  794. connection.Attachment0 = attachementone
  795. connection.Attachment1 = attachmenttwo
  796. connection.LimitsEnabled = true
  797. connection.LowerAngle = twistlower
  798. connection.UpperAngle = twistupper
  799. end
  800. Humanoid.Parent['Right Arm'].RightShoulderAttachment.Position = Vector3.new(0, 0.5, 0)
  801. Torso.RightCollarAttachment.Position = Vector3.new(1.5, 0.5, 0)
  802. Humanoid.Parent['Left Arm'].LeftShoulderAttachment.Position = Vector3.new(0, 0.5, 0)
  803. Torso.LeftCollarAttachment.Position = Vector3.new(-1.5, 0.5, 0)
  804. local RightLegAttachment = Instance.new("Attachment", Humanoid.Parent["Right Leg"])
  805. RightLegAttachment.Position = Vector3.new(0, 1, 0)
  806. local TorsoRightLegAttachment = Instance.new("Attachment", Torso)
  807. TorsoRightLegAttachment.Position = Vector3.new(0.5, -1, 0)
  808. --
  809. local LeftLegAttachment = Instance.new("Attachment", Humanoid.Parent["Left Leg"])
  810. LeftLegAttachment.Position = Vector3.new(0, 1, 0)
  811. local TorsoLeftLegAttachment = Instance.new("Attachment", Torso)
  812. TorsoLeftLegAttachment.Position = Vector3.new(-0.5, -1, 0)
  813. --
  814. if Humanoid.Parent:findFirstChild("Head") then
  815. local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
  816. HeadAttachment.Position = Vector3.new(0, -0.5, 0)
  817. makehingeconnections(Humanoid.Parent.Head, HeadAttachment, Torso.NeckAttachment, -20, 20, 70)
  818. end
  819. makeconnections(Humanoid.Parent['Right Arm'], Humanoid.Parent['Right Arm'].RightShoulderAttachment, Torso.RightCollarAttachment, -80, 80)
  820. makeconnections(Humanoid.Parent['Left Arm'], Humanoid.Parent['Left Arm'].LeftShoulderAttachment, Torso.LeftCollarAttachment, -80, 80)
  821. makeconnections(Humanoid.Parent['Right Leg'], RightLegAttachment, TorsoRightLegAttachment, -80, 80, 70)
  822. makeconnections(Humanoid.Parent['Left Leg'], LeftLegAttachment, TorsoLeftLegAttachment, -80, 80, 70)
  823. if Humanoid.Parent:findFirstChild("Right Arm") then
  824. local limbcollider = Instance.new("Part", Humanoid.Parent["Right Arm"])
  825. limbcollider.Size = Vector3.new(1,1.3,1)
  826. limbcollider.Shape = "Cylinder"
  827. limbcollider.Transparency = 1
  828. local limbcolliderweld = Instance.new("Weld", limbcollider)
  829. limbcolliderweld.Part0 = Humanoid.Parent["Right Arm"]
  830. limbcolliderweld.Part1 = limbcollider
  831. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
  832. for i,v in pairs(zombiecorpse["Right Arm"]:GetChildren()) do
  833. if v.ClassName == 'Motor6D' or v.ClassName == 'Weld' then
  834. v:destroy()
  835. end
  836. end
  837. end
  838. --
  839. if Humanoid.Parent:findFirstChild("Left Arm") then
  840. local limbcollider = Instance.new("Part", Humanoid.Parent["Left Arm"])
  841. limbcollider.Size = Vector3.new(1,1.3,1)
  842. limbcollider.Shape = "Cylinder"
  843. limbcollider.Transparency = 1
  844. local limbcolliderweld = Instance.new("Weld", limbcollider)
  845. limbcolliderweld.Part0 = Humanoid.Parent["Left Arm"]
  846. limbcolliderweld.Part1 = limbcollider
  847. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
  848. end
  849. --
  850. if Humanoid.Parent:findFirstChild("Left Leg") then
  851. local limbcollider = Instance.new("Part", Humanoid.Parent["Left Leg"])
  852. limbcollider.Size = Vector3.new(1,1.3,1)
  853. limbcollider.Shape = "Cylinder"
  854. limbcollider.Transparency = 1
  855. local limbcolliderweld = Instance.new("Weld", limbcollider)
  856. limbcolliderweld.Part0 = Humanoid.Parent["Left Leg"]
  857. limbcolliderweld.Part1 = limbcollider
  858. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
  859. end
  860. --
  861. if Humanoid.Parent:findFirstChild("Right Leg") then
  862. local limbcollider = Instance.new("Part", Humanoid.Parent["Right Leg"])
  863. limbcollider.Size = Vector3.new(1,1.3,1)
  864. limbcollider.Shape = "Cylinder"
  865. limbcollider.Transparency = 1
  866. local limbcolliderweld = Instance.new("Weld", limbcollider)
  867. limbcolliderweld.Part0 = Humanoid.Parent["Right Leg"]
  868. limbcolliderweld.Part1 = limbcollider
  869. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
  870. end
  871. local ragdoll = zombiecorpse
  872. if ragdoll:findFirstChild("HumanoidRootPart") then
  873. ragdoll.HumanoidRootPart.CanCollide = false
  874. ragdoll.HumanoidRootPart:destroy()
  875. end
  876. end
  877. npchumanoid.Died:connect(death)
  878. spawn(run)
  879. spawn(checkandshoot)
  880. spawn(randomwalk)
  881. while wait() do --check animations and other things
  882. if not walking and not shooting then
  883. for i = 0.2,0.8 , 0.09 do
  884. if not walking and not shooting then
  885. akweld.C0 = akweld.C0:lerp(CFrame.new(-0.583096504, -1.87343168, 0.0918724537, 0.808914721, -0.582031429, 0.0830438882, -0.166903317, -0.0918986499, 0.981681228, -0.56373775, -0.807956576, -0.171481162),i)
  886. rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(1.32261992, 0.220639229, -0.279059082, 0.766044497, 0.604022682, -0.219846413, -0.492403805, 0.331587851, -0.804728508, -0.413175881, 0.724711061, 0.551434159),i)
  887. leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.16202736, -0.00836706161, -0.880517244, 0.939692557, -0.342020094, -2.98023224e-08, 0.171009958, 0.46984598, -0.866025567, 0.296198159, 0.813797832, 0.499999642),i)
  888. lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.599619389, -1.99128425, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661, 0, 0, 0, 1),i)
  889. righthip.C0 = righthip.C0:lerp(CFrame.new(0.599619389, -1.99128449, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661, 0, 0, 0, 1),i)
  890. root.C0 = root.C0:lerp(CFrame.new(0,0,0),i)
  891. neck.C0 = neck.C0:lerp(CFrame.new(0,1.5,0),i)
  892. wait()
  893. end
  894. end
  895. end
  896. if walking then --this is the walking animation
  897. for i = 0.2,0.8 , 0.09 do
  898. if walking then
  899. akweld.C0 = akweld.C0:lerp(CFrame.new(-0.583096504, -1.87343168, 0.0918724537, 0.808914721, -0.582031429, 0.0830438882, -0.166903317, -0.0918986499, 0.981681228, -0.56373775, -0.807956576, -0.171481162),i)
  900. rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(1.32261992, 0.220639229, -0.279059082, 0.766044497, 0.604022682, -0.219846413, -0.492403805, 0.331587851, -0.804728508, -0.413175881, 0.724711061, 0.551434159),i)
  901. leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.16202736, -0.00836706161, -0.880517244, 0.939692557, -0.342020094, -2.98023224e-08, 0.171009958, 0.46984598, -0.866025567, 0.296198159, 0.813797832, 0.499999642),i)
  902. lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.527039051, -1.78302765, 0.642787695, 0.999390841, 0.026734557, 0.0224329531, -0.0348994918, 0.765577614, 0.642395973, 0, -0.642787635, 0.766044438),i)
  903. righthip.C0 = righthip.C0:lerp(CFrame.new(0.522737741, -1.65984559, -0.766044617, 0.999390841, -0.0224329531, 0.0267345682, 0.0348994918, 0.642395794, -0.765577734, 0, 0.766044497, 0.642787457),i)
  904. root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.996194661, 6.98491931e-09, -0.0871561021, 0.00759615982, 0.996194661, 0.0868242308, 0.0868244469, -0.087155886, 0.992403805),i)
  905. neck.C0 = neck.C0:lerp(CFrame.new(2.38418579e-07, 1.49809694, 0.0435779095, 0.996194661, 6.38283382e-09, 0.0871560946, 0.00759615889, 0.996194601, -0.0868242308, -0.0868244469, 0.087155886, 0.992403746),i)
  906. wait()
  907. end
  908. end
  909. head.footstep:Play()
  910. for i = 0.2,0.8 , 0.09 do
  911. if walking then
  912. akweld.C0 = akweld.C0:lerp(CFrame.new(-0.583096504, -1.87343168, 0.0918724537, 0.808914721, -0.582031429, 0.0830438882, -0.166903317, -0.0918986499, 0.981681228, -0.56373775, -0.807956576, -0.171481162),i)
  913. rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(1.32261992, 0.220639229, -0.279059082, 0.766044497, 0.604022682, -0.219846413, -0.492403805, 0.331587851, -0.804728508, -0.413175881, 0.724711061, 0.551434159),i)
  914. leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.16202736, -0.00836706161, -0.880517244, 0.939692557, -0.342020094, -2.98023224e-08, 0.171009958, 0.46984598, -0.866025567, 0.296198159, 0.813797832, 0.499999642),i)
  915. lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.520322084, -1.59067655, -0.819151878, 0.999390841, 0.0200175196, -0.028587997, -0.0348994918, 0.573226929, -0.818652987, 0, 0.819151998, 0.57357645),i)
  916. righthip.C0 = righthip.C0:lerp(CFrame.new(0.528892756, -1.83610249, 0.573575974, 0.999390841, -0.0285879895, -0.020017527, 0.0348994955, 0.818652987, 0.57322675, -7.4505806e-09, -0.573576212, 0.819152057),i)
  917. root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.996194661, -1.44354999e-08, 0.0871558934, -0.00759615237, 0.996194661, 0.0868244395, -0.0868242383, -0.0871560946, 0.992403805),i)
  918. neck.C0 = neck.C0:lerp(CFrame.new(0, 1.49809742, 0.0435781479, 0.996194601, -1.27129169e-08, -0.0871559009, -0.0075961519, 0.996194661, -0.0868244097, 0.0868242458, 0.0871560723, 0.992403746),i)
  919. wait()
  920. end
  921. end
  922. head.footstep:Play()
  923. end
  924. if shooting then --this is the shooting animation
  925. for i = 0.2,0.8 , 0.45 do
  926. if shooting then
  927. akweld.C0 = akweld.C0:lerp(CFrame.new(-0.109231472, -2.24730468, -0.300003052, 0.984807491, 1.94707184e-07, 0.173647866, -0.173648044, -2.68220873e-07, 0.984807491, 3.67846468e-07, -0.999999821, -8.00420992e-08),i)
  928. root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.173648223, 0, -0.98480773, 0, 1, 0, 0.98480773, 0, 0.173648223),i)
  929. rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(1.21384871, 0.500000477, -0.879925251, 0.342019856, 0.939692438, -1.49501886e-08, 1.94707184e-07, -2.68220873e-07, -0.999999821, -0.939692438, 0.342020035, -3.76157232e-07),i)
  930. leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.59201181, 0.470158577, -0.794548988, 0.271118939, 0.181368172, 0.945304275, 0.902039766, -0.390578717, -0.18377316, 0.335885108, 0.902526498, -0.269494623),i)
  931. lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.681244373, -2.07163191, 0, 0.98480773, 0.173648283, 0, -0.173648283, 0.98480767, 0, 0, -1.86264515e-09, 0.99999994),i)
  932. righthip.C0 = righthip.C0:lerp(CFrame.new(0.681244612, -2.07163191, -4.76837158e-07, 0.98480773, -0.173648283, 0, 0.173648283, 0.98480767, 0, 0, 1.86264515e-09, 0.99999994),i)
  933. neck.C0 = neck.C0:lerp(CFrame.new(0.0296957493, 1.49240398, -0.0815882683, 0.336824059, 0.059391167, 0.939692557, -0.173648164, 0.98480773, -7.4505806e-09, -0.925416589, -0.163175896, 0.342020094),i)
  934. wait()
  935. end
  936. end
  937. for i = 0.2,0.8 , 0.45 do
  938. if shooting then
  939. akweld.C0 = akweld.C0:lerp(CFrame.new(-0.109231472, -2.24730468, -0.300003052, 0.984807491, 1.94707184e-07, 0.173647866, -0.173648044, -2.68220873e-07, 0.984807491, 3.67846468e-07, -0.999999821, -8.00420992e-08),i)
  940. root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.173648223, 0, -0.98480773, 0, 1, 0, 0.98480773, 0, 0.173648223),i)
  941. rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(1.60777056, 0.499999523, -0.81046629, 0.342019439, 0.939691842, 1.55550936e-07, 4.10554577e-08, -3.93739697e-07, -0.999999464, -0.939691901, 0.342019975, -4.77612389e-07),i)
  942. leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.10000956, 0.482372284, -0.926761627, 0.27112025, 0.263066441, 0.925899446, 0.902039289, -0.405109912, -0.149033815, 0.335885197, 0.875603914, -0.347129732),i)
  943. lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.681244373, -2.07163191, 0, 0.98480773, 0.173648283, 0, -0.173648283, 0.98480767, 0, 0, -1.86264515e-09, 0.99999994),i)
  944. righthip.C0 = righthip.C0:lerp(CFrame.new(0.681244612, -2.07163191, -4.76837158e-07, 0.98480773, -0.173648283, 0, 0.173648283, 0.98480767, 0, 0, 1.86264515e-09, 0.99999994),i)
  945. neck.C0 = neck.C0:lerp(CFrame.new(0.121206045, 1.4753027, -0.0450725555, 0.336823881, 0.221664757, 0.915103495, -0.173648164, 0.969846308, -0.171010077, -0.925416648, -0.101305753, 0.365159094),i)
  946. wait()
  947. end
  948. end
  949. end
  950. end
  951. end))
  952. for i,v in pairs(mas:GetChildren()) do
  953. v.Parent = workspace
  954. pcall(function() v:MakeJoints() end)
  955. end
  956. mas:Destroy()
  957. for i,v in pairs(cors) do
  958. spawn(function()
  959. pcall(v)
  960. end)
  961. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement