Advertisement
ERROR_CODE

RunlabelTest

Nov 30th, 2023 (edited)
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 47.33 KB | None | 0 0
  1. local ScreenGui = Instance.new("ScreenGui")
  2. local RunLabel = Instance.new("TextLabel")
  3. local HeartBeat = Instance.new("Sound")
  4. local Id = "9116795681"
  5. HeartBeat.Parent = game.Workspace
  6. HeartBeat.SoundId = "rbxassetid://"..Id
  7. HeartBeat.Playing = true
  8. HeartBeat.Looped = false
  9. HeartBeat.Volume = 1
  10. HeartBeat:Stop()
  11. ScreenGui.Parent = game.CoreGui
  12.  
  13. function createZombie()
  14. function sandbox(var,func)
  15.     local env = getfenv(func)
  16.     local newenv = setmetatable({},{
  17.         __index = function(self,k)
  18.             if k=="script" then
  19.                 return var
  20.             else
  21.                 return env[k]
  22.             end
  23.         end,
  24.     })
  25.     setfenv(func,newenv)
  26.     return func
  27. end
  28. cors = {}
  29. mas = Instance.new("Model",game:GetService("Lighting"))
  30. Model0 = Instance.new("Model")
  31. Script1 = Instance.new("Script")
  32. Part1 = Instance.new("Part")
  33. SpecialMesh2 = Instance.new("SpecialMesh")
  34. Vector3Value3 = Instance.new("Vector3Value")
  35. Motor6D4 = Instance.new("Motor6D")
  36. Decal5 = Instance.new("Decal")
  37. Decal5A = Instance.new("Decal")
  38. Decal5B = Instance.new("Decal")
  39. Decal5C = Instance.new("Decal")
  40. Decal5D = Instance.new("Decal")
  41. Decal5E = Instance.new("Decal")
  42. Decal5F = Instance.new("Decal")
  43. Decal5G = Instance.new("Decal")
  44. Decal5H = Instance.new("Decal")
  45. Decal6H = Instance.new("Decal")
  46. Decal7H = Instance.new("Decal")
  47. Decal8H = Instance.new("Decal")
  48. Decal9H = Instance.new("Decal")
  49. Decal10H = Instance.new("Decal")
  50. Decal11H = Instance.new("Decal")
  51. Decal12H = Instance.new("Decal")
  52. Decal13H = Instance.new("Decal")
  53. Decal14H = Instance.new("Decal")
  54. Decal15H = Instance.new("Decal")
  55. Decal16H = Instance.new("Decal")
  56. Sound6 = Instance.new("Sound")
  57. Sound7 = Instance.new("Sound")
  58. Sound8 = Instance.new("Sound")
  59. Sound9 = Instance.new("Sound")
  60. Sound10 = Instance.new("Sound")
  61. Part11 = Instance.new("Part")
  62. Vector3Value12 = Instance.new("Vector3Value")
  63. BodyColors13 = Instance.new("BodyColors")
  64. MeshPart14 = Instance.new("MeshPart")
  65. Vector3Value15 = Instance.new("Vector3Value")
  66. Motor6D16 = Instance.new("Motor6D")
  67. Script17 = Instance.new("Script")
  68. Humanoid18 = Instance.new("Humanoid")
  69. Script19 = Instance.new("Script")
  70. MeshPart20 = Instance.new("MeshPart")
  71. Vector3Value21 = Instance.new("Vector3Value")
  72. Motor6D22 = Instance.new("Motor6D")
  73. MeshPart23 = Instance.new("MeshPart")
  74. Vector3Value24 = Instance.new("Vector3Value")
  75. Motor6D25 = Instance.new("Motor6D")
  76. MeshPart26 = Instance.new("MeshPart")
  77. Vector3Value27 = Instance.new("Vector3Value")
  78. Motor6D28 = Instance.new("Motor6D")
  79. MeshPart29 = Instance.new("MeshPart")
  80. Vector3Value30 = Instance.new("Vector3Value")
  81. Motor6D31 = Instance.new("Motor6D")
  82. MeshPart32 = Instance.new("MeshPart")
  83. Vector3Value33 = Instance.new("Vector3Value")
  84. Motor6D34 = Instance.new("Motor6D")
  85. MeshPart35 = Instance.new("MeshPart")
  86. Vector3Value36 = Instance.new("Vector3Value")
  87. Motor6D37 = Instance.new("Motor6D")
  88. MeshPart38 = Instance.new("MeshPart")
  89. Vector3Value39 = Instance.new("Vector3Value")
  90. Motor6D40 = Instance.new("Motor6D")
  91. MeshPart41 = Instance.new("MeshPart")
  92. Vector3Value42 = Instance.new("Vector3Value")
  93. Motor6D43 = Instance.new("Motor6D")
  94. Script44 = Instance.new("Script")
  95. MeshPart45 = Instance.new("MeshPart")
  96. Vector3Value46 = Instance.new("Vector3Value")
  97. Motor6D47 = Instance.new("Motor6D")
  98. MeshPart48 = Instance.new("MeshPart")
  99. Vector3Value49 = Instance.new("Vector3Value")
  100. Motor6D50 = Instance.new("Motor6D")
  101. MeshPart51 = Instance.new("MeshPart")
  102. Vector3Value52 = Instance.new("Vector3Value")
  103. Motor6D53 = Instance.new("Motor6D")
  104. MeshPart54 = Instance.new("MeshPart")
  105. Vector3Value55 = Instance.new("Vector3Value")
  106. Motor6D56 = Instance.new("Motor6D")
  107. MeshPart57 = Instance.new("MeshPart")
  108. Vector3Value58 = Instance.new("Vector3Value")
  109. Motor6D59 = Instance.new("Motor6D")
  110. Script60 = Instance.new("Script")
  111. Script61 = Instance.new("Script")
  112. Script62 = Instance.new("Script")
  113. StringValue63 = Instance.new("StringValue")
  114. StringValue64 = Instance.new("StringValue")
  115. Animation65 = Instance.new("Animation")
  116. StringValue66 = Instance.new("StringValue")
  117. Animation67 = Instance.new("Animation")
  118. StringValue68 = Instance.new("StringValue")
  119. Animation69 = Instance.new("Animation")
  120. NumberValue70 = Instance.new("NumberValue")
  121. Animation71 = Instance.new("Animation")
  122. NumberValue72 = Instance.new("NumberValue")
  123. StringValue73 = Instance.new("StringValue")
  124. Animation74 = Instance.new("Animation")
  125. StringValue75 = Instance.new("StringValue")
  126. Animation76 = Instance.new("Animation")
  127. StringValue77 = Instance.new("StringValue")
  128. Animation78 = Instance.new("Animation")
  129. StringValue79 = Instance.new("StringValue")
  130. Animation80 = Instance.new("Animation")
  131. StringValue81 = Instance.new("StringValue")
  132. Animation82 = Instance.new("Animation")
  133. StringValue83 = Instance.new("StringValue")
  134. Animation84 = Instance.new("Animation")
  135. Script85 = Instance.new("Script")
  136. Model0.Name = "Nightmare"
  137. Model0.Parent = mas
  138. Part1.Name = "Head"
  139. Part1.Parent = Model0
  140. Part1.CFrame = CFrame.new(-0.695644557, 4.56509781, -2.19861078, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
  141. Part1.Orientation = Vector3.new(0, 90.1399994, 0)
  142. Part1.Position = Vector3.new(-0.695644557, 4.56509781, -2.19861078)
  143. Part1.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
  144. Part1.Color = Color3.new(0, 0, 0)
  145. Part1.Size = Vector3.new(1, 1, 1)
  146. Part1.BottomSurface = Enum.SurfaceType.Smooth
  147. Part1.BrickColor = BrickColor.new("Artichoke")
  148. Part1.TopSurface = Enum.SurfaceType.Smooth
  149. Part1.brickColor = BrickColor.new("Artichoke")
  150. Part1.FormFactor = Enum.FormFactor.Custom
  151. Part1.formFactor = Enum.FormFactor.Custom
  152. SpecialMesh2.Parent = Part1
  153. SpecialMesh2.MeshId = "http://www.roblox.com/asset?id=419776358"
  154. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  155. Vector3Value3.Name = "OriginalSize"
  156. Vector3Value3.Parent = Part1
  157. Vector3Value3.Value = Vector3.new(1, 1, 1)
  158. Motor6D4.Name = "Neck"
  159. Motor6D4.Parent = Part1
  160. Motor6D4.C0 = CFrame.new(0.000338107347, 0.806032121, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  161. Motor6D4.C1 = CFrame.new(-2.72095203e-05, -0.565615535, 0.00386685133, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  162. Motor6D4.Part0 = MeshPart14
  163. Motor6D4.Part1 = Part1
  164. Motor6D4.part1 = Part1
  165. Decal5.Parent = Part1
  166. Decal5.Texture = "http://www.roblox.com/asset/?id=2939749348"
  167. Sound6.Name = "Moan"
  168. Sound6.Parent = Part1
  169. Sound6.SoundId = "rbxassetid://8248226944"
  170. Sound6.Volume = 1
  171. Sound7.Name = "Moan2"
  172. Sound7.Parent = Part1
  173. Sound7.SoundId = "rbxassetid://5786242867"
  174. Sound7.Volume = 1
  175. Sound8.Name = "Moan3"
  176. Sound8.Parent = Part1
  177. Sound8.SoundId = "rbxassetid://5721184414"
  178. Sound8.Volume = 1
  179. Sound9.Name = "Moan4"
  180. Sound9.Parent = Part1
  181. Sound9.SoundId = "rbxassetid://9067505447"
  182. Sound9.Volume = 1
  183. Sound10.Name = "Death"
  184. Sound10.Parent = Part1
  185. Part11.Name = "HumanoidRootPart"
  186. Part11.Parent = Model0
  187. Part11.CFrame = CFrame.new(-0.691856027, 2.32588005, -2.1985929, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
  188. Part11.Orientation = Vector3.new(0, 90.1399994, 0)
  189. Part11.Position = Vector3.new(-145.023, 908.978, 334.575)
  190. Part11.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
  191. Part11.Transparency = 1
  192. Part11.Size = Vector3.new(2, 2, 1)
  193. Part11.CanCollide = false
  194. Vector3Value12.Name = "OriginalSize"
  195. Vector3Value12.Parent = Part11
  196. Vector3Value12.Value = Vector3.new(2, 2, 1)
  197. BodyColors13.Parent = Model0
  198. BodyColors13.HeadColor = BrickColor.new("Really Black")
  199. BodyColors13.HeadColor3 = Color3.new(0, 0, 0)
  200. BodyColors13.LeftArmColor = BrickColor.new("Really Black")
  201. BodyColors13.LeftArmColor3 = Color3.new(0, 0, 0)
  202. BodyColors13.LeftLegColor = BrickColor.new("Really Black")
  203. BodyColors13.LeftLegColor3 = Color3.new(0, 0, 0)
  204. BodyColors13.RightArmColor = BrickColor.new("Really Black")
  205. BodyColors13.RightArmColor3 = Color3.new(0, 0, 0)
  206. BodyColors13.RightLegColor = BrickColor.new("Really Black")
  207. BodyColors13.RightLegColor3 = Color3.new(0, 0, 0)
  208. BodyColors13.TorsoColor = BrickColor.new("Really Black")
  209. BodyColors13.TorsoColor3 = Color3.new(0, 0, 0)
  210. MeshPart14.Name = "UpperTorso"
  211. MeshPart14.Parent = Model0
  212. Decal5A.Parent = MeshPart14
  213. Decal5A.Texture = "http://www.roblox.com/asset/?id=15507643492"
  214. MeshPart14.CFrame = CFrame.new(-0.676263928, 3.1934495, -2.19829226, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
  215. MeshPart14.Orientation = Vector3.new(0, 90.1399994, 0)
  216. MeshPart14.Position = Vector3.new(-0.676263928, 3.1934495, -2.19829226)
  217. MeshPart14.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
  218. MeshPart14.Color = Color3.new(0, 0, 0)
  219. MeshPart14.Size = Vector3.new(2.00029206, 1.60093355, 1.0005368)
  220. MeshPart14.BrickColor = BrickColor.new("Dark green")
  221. MeshPart14.brickColor = BrickColor.new("Dark green")
  222. Vector3Value15.Name = "OriginalSize"
  223. Vector3Value15.Parent = MeshPart14
  224. Vector3Value15.Value = Vector3.new(2.00029206, 1.60093355, 1.0005368)
  225. Motor6D16.Name = "Waist"
  226. Motor6D16.Parent = MeshPart14
  227. Motor6D16.C0 = CFrame.new(0.000280171633, 0.537143946, -0.0142721087, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  228. Motor6D16.C1 = CFrame.new(0.000338107347, -0.463463932, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  229. Motor6D16.Part0 = MeshPart41
  230. Motor6D16.Part1 = MeshPart14
  231. Motor6D16.part1 = MeshPart14
  232. Script17.Name = "Damage Script"
  233. Script17.Parent = MeshPart14
  234. table.insert(cors,sandbox(Script17,function()
  235. function onTouched(hit)
  236.         local human = hit.Parent:findFirstChild("Humanoid")
  237.         if (human ~= nil) then
  238.                 human.Health = human.Health - 999
  239.         end
  240. end
  241. script.Parent.Touched:connect(onTouched)
  242. end))
  243. Humanoid18.Name = "Zombie"
  244. Humanoid18.Parent = Model0
  245. Humanoid18.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.Subject
  246. Humanoid18.Health = 125
  247. Humanoid18.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
  248. Humanoid18.HipHeight = 1.3500000238419
  249. Humanoid18.LeftLeg = MeshPart45
  250. Humanoid18.MaxHealth = 125
  251. Humanoid18.NameOcclusion = Enum.NameOcclusion.NoOcclusion
  252. Humanoid18.RigType = Enum.HumanoidRigType.R15
  253. Humanoid18.RightLeg = MeshPart20
  254. Humanoid18.Torso = Part11
  255. Humanoid18.WalkSpeed = 100
  256. Humanoid18.maxHealth = 125
  257. Script19.Parent = Model0
  258. table.insert(cors,sandbox(Script19,function()
  259. local larm = script.Parent:FindFirstChild("HumanoidRootPart")
  260. local rarm = script.Parent:FindFirstChild("HumanoidRootPart")
  261. local char = script.Parent
  262. local pathFinder = game:GetService("PathfindingService")
  263. local path = pathFinder:CreatePath()
  264.  
  265. function findNearestTorso(pos)
  266.     local list = game.Workspace:children()
  267.     local torso = nil
  268.     local dist = 100
  269.     local temp = nil
  270.     local human = nil
  271.     local temp2 = nil
  272.     for x = 1, #list do
  273.         temp2 = list[x]
  274.         if (temp2.className == "Model") and (temp2 ~= script.Parent) then
  275.             temp = temp2:findFirstChild("HumanoidRootPart")
  276.             human = temp2:findFirstChild("Humanoid")
  277.             if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  278.                 if (temp.Position - pos).magnitude < dist then
  279.                     torso = temp
  280.                     dist = (temp.Position - pos).magnitude
  281.                 end
  282.             end
  283.         end
  284.     end
  285.     return torso
  286. end
  287.  
  288. while true do
  289.     wait()
  290.     local target = findNearestTorso(script.Parent.HumanoidRootPart.Position)
  291.     if target ~= nil then
  292.         path:ComputeAsync(char.HumanoidRootPart.Position, target.Position)
  293.  
  294.         for i, wayPoint in pairs(path:GetWaypoints()) do
  295.             char.Zombie:MoveTo(wayPoint.Position)
  296.  
  297.             if wayPoint.Action == Enum.PathWaypointAction.Jump then
  298.                 char.Zombie:ChangeState(Enum.HumanoidStateType.Jumping)
  299.             end
  300.  
  301.             char.Zombie.MoveToFinished:wait()
  302.         end
  303.     end
  304. end
  305.  
  306. end))
  307. MeshPart20.Name = "RightUpperLeg"
  308. MeshPart20.Parent = Model0
  309. Decal5B.Parent = MeshPart20
  310. Decal5B.Texture = "http://www.roblox.com/asset/?id=15507643492"
  311. MeshPart20.CFrame = CFrame.new(-0.67828238, 1.46466565, -2.69960117, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
  312. MeshPart20.Orientation = Vector3.new(0, 90.1399994, 0)
  313. MeshPart20.Position = Vector3.new(-0.67828238, 1.46466565, -2.69960117)
  314. MeshPart20.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
  315. MeshPart20.Color = Color3.new(0, 0, 0)
  316. MeshPart20.Size = Vector3.new(1.00027561, 1.5362649, 1.00092912)
  317. MeshPart20.BrickColor = BrickColor.new("Bright blue")
  318. MeshPart20.CanCollide = false
  319. MeshPart20.brickColor = BrickColor.new("Bright blue")
  320. Vector3Value21.Name = "OriginalSize"
  321. Vector3Value21.Parent = MeshPart20
  322. Vector3Value21.Value = Vector3.new(1.00027561, 1.5362649, 1.00092912)
  323. Motor6D22.Name = "RightHip"
  324. Motor6D22.Parent = MeshPart22
  325. Motor6D22.C0 = CFrame.new(0.505080223, -0.243262246, 0.00102789141, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  326. Motor6D22.C1 = CFrame.new(0.00382620096, 0.484913796, 0.000486815348, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  327. Motor6D22.Part0 = MeshPart41
  328. Motor6D22.Part1 = MeshPart20
  329. Motor6D22.part1 = MeshPart20
  330. MeshPart23.Name = "RightUpperArm"
  331. MeshPart23.Parent = Model0
  332.  
  333. MeshPart23.CFrame = CFrame.new(-0.685997844, 3.29312539, -3.69646788, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
  334. MeshPart23.Orientation = Vector3.new(0, 90.1399994, 0)
  335. MeshPart23.Position = Vector3.new(-0.685997844, 3.29312539, -3.69646788)
  336. MeshPart23.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
  337. MeshPart23.Color = Color3.new(0, 0, 0)
  338. MeshPart23.Size = Vector3.new(1.00027633, 1.39554, 1.00025082)
  339. MeshPart23.BrickColor = BrickColor.new("Cool yellow")
  340. MeshPart23.CanCollide = false
  341. Decal5C.Parent = MeshPart23
  342. Decal5C.Texture = "http://www.roblox.com/asset/?id=15507643492"
  343. MeshPart23.brickColor = BrickColor.new("Cool yellow")
  344. Vector3Value24.Name = "OriginalSize"
  345. Vector3Value24.Parent = MeshPart23
  346. Vector3Value24.Value = Vector3.new(1.00027633, 1.39554, 1.00025082)
  347. Motor6D25.Name = "RightShoulder"
  348. Motor6D25.Parent = MeshPart23
  349. Motor6D25.C0 = CFrame.new(1.25031853, 0.5565539, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  350. Motor6D25.C1 = CFrame.new(-0.24787569, 0.456878304, -0.00944012403, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  351. Motor6D25.Part0 = MeshPart14
  352. Motor6D25.Part1 = MeshPart23
  353. Motor6D25.part1 = MeshPart23
  354. MeshPart26.Name = "RightLowerLeg"
  355. MeshPart26.Parent = Model0
  356. MeshPart26.CFrame = CFrame.new(-0.678020656, 0.910310864, -2.69960189, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
  357. MeshPart26.Orientation = Vector3.new(0, 90.1399994, 0)
  358. MeshPart26.Position = Vector3.new(-0.678020656, 0.910310864, -2.69960189)
  359. MeshPart26.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
  360. MeshPart26.Color = Color3.new(0.0509804, 0.411765, 0.67451)
  361. MeshPart26.Size = Vector3.new(1.00027585, 1.48964536, 1.00032854)
  362. MeshPart26.BrickColor = BrickColor.new("Bright blue")
  363. MeshPart26.CanCollide = false
  364. Decal5D.Parent = MeshPart26
  365. Decal5D.Texture = "http://www.roblox.com/asset/?id=15507643492"
  366. MeshPart26.brickColor = BrickColor.new("Bright blue")
  367. Vector3Value27.Name = "OriginalSize"
  368. Vector3Value27.Parent = MeshPart26
  369. Vector3Value27.Value = Vector3.new(1.00027585, 1.48964536, 1.00032854)
  370. Motor6D28.Name = "RightKnee"
  371. Motor6D28.Parent = MeshPart26
  372. Motor6D28.C0 = CFrame.new(0.00382620096, -0.265086174, 0.000426991843, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  373. Motor6D28.C1 = CFrame.new(0.00382620096, 0.289268613, 0.000145851634, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  374. Motor6D28.Part0 = MeshPart20
  375. Motor6D28.Part1 = MeshPart26
  376. Motor6D28.part1 = MeshPart26
  377. MeshPart29.Name = "RightLowerArm"
  378. MeshPart29.Parent = Model0
  379. local RightLowerArmFire = Instance.new("Fire", MeshPart29)
  380. RightLowerArmFire.Size = 2
  381. RightLowerArmFire.Color = Color3.new(255,255,255)
  382. RightLowerArmFire.Heat = 0
  383. Decal5E.Parent = MeshPart29
  384. Decal5E.Texture = "http://www.roblox.com/asset/?id=15507643492"
  385. MeshPart29.CFrame = CFrame.new(-0.685555518, 2.90703535, -3.69646835, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
  386. MeshPart29.Orientation = Vector3.new(0, 90.1399994, 0)
  387. MeshPart29.Position = Vector3.new(-0.685555518, 2.90703535, -3.69646835)
  388. MeshPart29.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
  389. MeshPart29.Color = Color3.new(0.992157, 0.917647, 0.552941)
  390. MeshPart29.Size = Vector3.new(1.00027657, 1.26567209, 1.00025082)
  391. MeshPart29.BrickColor = BrickColor.new("Cool yellow")
  392. MeshPart29.CanCollide = false
  393. MeshPart29.brickColor = BrickColor.new("Cool yellow")
  394. Vector3Value30.Name = "OriginalSize"
  395. Vector3Value30.Parent = MeshPart29
  396. Vector3Value30.Value = Vector3.new(1.00027657, 1.26567209, 1.00025082)
  397. Motor6D31.Name = "RightElbow"
  398. Motor6D31.Parent = MeshPart29
  399. Motor6D31.C0 = CFrame.new(0.00214397907, -0.263139546, -0.00944012403, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  400. Motor6D31.C1 = CFrame.new(0.00214457512, 0.122950554, -0.00989595056, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  401. Motor6D31.Part0 = MeshPart23
  402. Motor6D31.Part1 = MeshPart29
  403. Motor6D31.part1 = MeshPart29
  404. MeshPart32.Name = "RightHand"
  405. MeshPart32.Parent = Model0
  406. Decal5F.Parent = MeshPart32
  407. Decal5F.Texture = "http://www.roblox.com/asset/?id=15507643492"
  408. MeshPart32.CFrame = CFrame.new(-0.680041432, 2.1668787, -3.69776106, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
  409. MeshPart32.Orientation = Vector3.new(0, 90.1399994, 0)
  410. MeshPart32.Position = Vector3.new(-0.680041432, 2.1668787, -3.69776106)
  411. MeshPart32.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
  412. MeshPart32.Color = Color3.new(0.992157, 0.917647, 0.552941)
  413. MeshPart32.Size = Vector3.new(0.999299049, 0.335255772, 1.00029743)
  414. MeshPart32.BrickColor = BrickColor.new("Cool yellow")
  415. MeshPart32.CanCollide = false
  416. MeshPart32.brickColor = BrickColor.new("Cool yellow")
  417. Vector3Value33.Name = "OriginalSize"
  418. Vector3Value33.Parent = MeshPart32
  419. Vector3Value33.Value = Vector3.new(0.999299049, 0.335255772, 1.00029743)
  420. Motor6D34.Name = "RightWrist"
  421. Motor6D34.Parent = MeshPart32
  422. Motor6D34.C0 = CFrame.new(0.00214457512, -0.682049513, -0.00989595056, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  423. Motor6D34.C1 = CFrame.new(0.000865101814, 0.058106944, -0.0154390335, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  424. Motor6D34.Part0 = MeshPart29
  425. Motor6D34.Part1 = MeshPart32
  426. Motor6D34.part1 = MeshPart32
  427. MeshPart35.Name = "RightFoot"
  428. MeshPart35.Parent = Model0
  429. Decal5G.Parent = MeshPart35
  430. Decal5G.Texture = "http://www.roblox.com/asset/?id=15507643492"
  431. MeshPart35.CFrame = CFrame.new(-0.677906275, 0.167736173, -2.69441152, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
  432. MeshPart35.Orientation = Vector3.new(0, 90.1399994, 0)
  433. MeshPart35.Position = Vector3.new(-0.677906275, 0.167736173, -2.69441152)
  434. MeshPart35.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
  435. MeshPart35.Color = Color3.new(0.0509804, 0.411765, 0.67451)
  436. MeshPart35.Size = Vector3.new(1.00063133, 0.335407376, 1.00020337)
  437. MeshPart35.BrickColor = BrickColor.new("Bright blue")
  438. MeshPart35.CanCollide = false
  439. MeshPart35.brickColor = BrickColor.new("Bright blue")
  440. Vector3Value36.Name = "OriginalSize"
  441. Vector3Value36.Parent = MeshPart35
  442. Vector3Value36.Value = Vector3.new(1.00063133, 0.335407376, 1.00020337)
  443. Motor6D37.Name = "RightAnkle"
  444. Motor6D37.Parent = MeshPart35
  445. Motor6D37.C0 = CFrame.new(0.00382620096, -0.710731506, 0.000283418223, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  446. Motor6D37.C1 = CFrame.new(0.00901681185, 0.0318431854, 0.000155551359, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  447. Motor6D37.Part0 = MeshPart26
  448. Motor6D37.Part1 = MeshPart35
  449. Motor6D37.part1 = MeshPart35
  450. MeshPart38.Name = "LeftFoot"
  451. MeshPart38.Parent = Model0
  452. Decal5H.Parent = MeshPart38
  453. Decal5H.Texture = "http://www.roblox.com/asset/?id=15507643492"
  454. MeshPart38.CFrame = CFrame.new(-0.675512314, 0.167736173, -1.70284736, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
  455. MeshPart38.Orientation = Vector3.new(0, 90.1399994, 0)
  456. MeshPart38.Position = Vector3.new(-0.675512314, 0.167736173, -1.70284736)
  457. MeshPart38.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
  458. MeshPart38.Color = Color3.new(0.0509804, 0.411765, 0.67451)
  459. MeshPart38.Size = Vector3.new(1.00063133, 0.335407257, 1.00020337)
  460. MeshPart38.BrickColor = BrickColor.new("Bright blue")
  461. MeshPart38.CanCollide = false
  462. MeshPart38.brickColor = BrickColor.new("Bright blue")
  463. Vector3Value39.Name = "OriginalSize"
  464. Vector3Value39.Parent = MeshPart38
  465. Vector3Value39.Value = Vector3.new(1.00063133, 0.335407257, 1.00020337)
  466. Motor6D40.Name = "LeftAnkle"
  467. Motor6D40.Parent = MeshPart38
  468. Motor6D40.C0 = CFrame.new(-0.00382620096, -0.710131407, 0.00030554086, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  469. Motor6D40.C1 = CFrame.new(-0.00901681185, 0.032443285, 0.000177569687, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  470. Motor6D40.Part0 = MeshPart51
  471. Motor6D40.Part1 = MeshPart38
  472. Motor6D40.part1 = MeshPart38
  473. MeshPart41.Name = "LowerTorso"
  474. MeshPart41.Parent = Model0
  475. Decal6H.Parent = MeshPart41
  476. Decal6H.Texture = "http://www.roblox.com/asset/?id=15507643492"
  477. MeshPart41.CFrame = CFrame.new(-0.677587926, 2.19284177, -2.19834709, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
  478. MeshPart41.Orientation = Vector3.new(0, 90.1399994, 0)
  479. MeshPart41.Position = Vector3.new(-0.677587926, 2.19284177, -2.19834709)
  480. MeshPart41.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
  481. MeshPart41.Color = Color3.new(0.156863, 0.498039, 0.278431)
  482. MeshPart41.Size = Vector3.new(2.00017595, 0.400037616, 1.00021255)
  483. MeshPart41.BrickColor = BrickColor.new("Dark green")
  484. MeshPart41.brickColor = BrickColor.new("Dark green")
  485. Vector3Value42.Name = "OriginalSize"
  486. Vector3Value42.Parent = MeshPart41
  487. Vector3Value42.Value = Vector3.new(2.00017595, 0.400037616, 1.00021255)
  488. Motor6D43.Name = "Root"
  489. Motor6D43.Parent = MeshPart41
  490. Motor6D43.C1 = CFrame.new(0.000280171633, 0.133037761, -0.0142721087, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  491. Motor6D43.Part0 = Part11
  492. Motor6D43.Part1 = MeshPart41
  493. Motor6D43.part1 = MeshPart41
  494. Script44.Name = "Damage Script"
  495. Script44.Parent = MeshPart41
  496. table.insert(cors,sandbox(Script44,function()
  497. function onTouched(hit)
  498.         local human = hit.Parent:findFirstChild("Humanoid")
  499.         if (human ~= nil) then
  500.                 human.Health = human.Health - 999
  501.         end
  502. end
  503. script.Parent.Touched:connect(onTouched)
  504. end))
  505. MeshPart45.Name = "LeftUpperLeg"
  506. MeshPart45.Parent = Model0
  507. Decal7H.Parent = MeshPart45
  508. Decal7H.Texture = "http://www.roblox.com/asset/?id=15507643492"
  509. MeshPart45.CFrame = CFrame.new(-0.675863564, 1.46466565, -1.69765592, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
  510. MeshPart45.Orientation = Vector3.new(0, 90.1399994, 0)
  511. MeshPart45.Position = Vector3.new(-0.675863564, 1.46466565, -1.69765592)
  512. MeshPart45.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
  513. MeshPart45.Color = Color3.new(0.0509804, 0.411765, 0.67451)
  514. MeshPart45.Size = Vector3.new(1.00027561, 1.5362649, 1.00092912)
  515. MeshPart45.BrickColor = BrickColor.new("Bright blue")
  516. MeshPart45.CanCollide = false
  517. MeshPart45.brickColor = BrickColor.new("Bright blue")
  518. Vector3Value46.Name = "OriginalSize"
  519. Vector3Value46.Parent = MeshPart45
  520. Vector3Value46.Value = Vector3.new(1.00027561, 1.5362649, 1.00092912)
  521. Motor6D47.Name = "LeftHip"
  522. Motor6D47.Parent = MeshPart45
  523. Motor6D47.C0 = CFrame.new(-0.50451982, -0.243062243, 0.00122789107, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  524. Motor6D47.C1 = CFrame.new(-0.00382620096, 0.4851138, 0.000686740503, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  525. Motor6D47.Part0 = MeshPart41
  526. Motor6D47.Part1 = MeshPart45
  527. Motor6D47.part1 = MeshPart45
  528. MeshPart48.Name = "LeftUpperArm"
  529. MeshPart48.Parent = Model0
  530. Decal8H.Parent = MeshPart48
  531. Decal8H.Texture = "http://www.roblox.com/asset/?id=15507643492"
  532. MeshPart48.CFrame = CFrame.new(-0.678766429, 3.29312539, -0.700763106, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
  533. MeshPart48.Orientation = Vector3.new(0, 90.1399994, 0)
  534. MeshPart48.Position = Vector3.new(-0.678766429, 3.29312539, -0.700763106)
  535. MeshPart48.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
  536. MeshPart48.Color = Color3.new(0.992157, 0.917647, 0.552941)
  537. MeshPart48.Size = Vector3.new(1.00027633, 1.39554, 1.00025082)
  538. MeshPart48.BrickColor = BrickColor.new("Cool yellow")
  539. MeshPart48.CanCollide = false
  540. MeshPart48.brickColor = BrickColor.new("Cool yellow")
  541. Vector3Value49.Name = "OriginalSize"
  542. Vector3Value49.Parent = MeshPart48
  543. Vector3Value49.Value = Vector3.new(1.00027633, 1.39554, 1.00025082)
  544. Motor6D50.Name = "LeftShoulder"
  545. Motor6D50.Parent = MeshPart48
  546. Motor6D50.C0 = CFrame.new(-1.24955308, 0.556408584, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  547. Motor6D50.C1 = CFrame.new(0.247964978, 0.456732988, -0.00943991542, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  548. Motor6D50.Part0 = MeshPart14
  549. Motor6D50.Part1 = MeshPart48
  550. Motor6D50.part1 = MeshPart48
  551. MeshPart51.Name = "LeftLowerLeg"
  552. MeshPart51.Parent = Model0
  553. Decal9H.Parent = MeshPart51
  554. Decal9H.Texture = "http://www.roblox.com/asset/?id=15507643492"
  555. MeshPart51.CFrame = CFrame.new(-0.67560178, 0.910310864, -1.69765651, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
  556. MeshPart51.Orientation = Vector3.new(0, 90.1399994, 0)
  557. MeshPart51.Position = Vector3.new(-0.67560178, 0.910310864, -1.69765651)
  558. MeshPart51.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
  559. MeshPart51.Color = Color3.new(0, 0, 0)
  560. MeshPart51.Size = Vector3.new(1.00027585, 1.48964536, 1.00032866)
  561. MeshPart51.BrickColor = BrickColor.new("Bright blue")
  562. MeshPart51.CanCollide = false
  563. MeshPart51.brickColor = BrickColor.new("Bright blue")
  564. Vector3Value52.Name = "OriginalSize"
  565. Vector3Value52.Parent = MeshPart51
  566. Vector3Value52.Value = Vector3.new(1.00027585, 1.48964536, 1.00032866)
  567. Motor6D53.Name = "LeftKnee"
  568. Motor6D53.Parent = MeshPart51
  569. Motor6D53.C0 = CFrame.new(-0.00382620096, -0.264486194, 0.000586740673, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  570. Motor6D53.C1 = CFrame.new(-0.00382620096, 0.289868593, 0.00030554086, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  571. Motor6D53.Part0 = MeshPart45
  572. Motor6D53.Part1 = MeshPart51
  573. Motor6D53.part1 = MeshPart51
  574. MeshPart54.Name = "LeftLowerArm"
  575. MeshPart54.Parent = Model0
  576. local LeftLowerArmFire = Instance.new("Fire", MeshPart54)
  577. LeftLowerArmFire.Size = 2
  578. LeftLowerArmFire.Color = Color3.new(255,255,255)
  579. LeftLowerArmFire.Heat = 0
  580. Decal10H.Parent = MeshPart54
  581. Decal10H.Texture = "http://www.roblox.com/asset/?id=15507643492"
  582. MeshPart54.CFrame = CFrame.new(-0.678323925, 2.90703535, -0.700764775, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
  583. MeshPart54.Orientation = Vector3.new(0, 90.1399994, 0)
  584. MeshPart54.Position = Vector3.new(-0.678323925, 2.90703535, -0.700764775)
  585. MeshPart54.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
  586. MeshPart54.Color = Color3.new(0.992157, 0.917647, 0.552941)
  587. MeshPart54.Size = Vector3.new(1.00027657, 1.26567209, 1.00025082)
  588. MeshPart54.BrickColor = BrickColor.new("Cool yellow")
  589. MeshPart54.CanCollide = false
  590. MeshPart54.brickColor = BrickColor.new("Cool yellow")
  591. Vector3Value55.Name = "OriginalSize"
  592. Vector3Value55.Parent = MeshPart54
  593. Vector3Value55.Value = Vector3.new(1.00027657, 1.26567209, 1.00025082)
  594. Motor6D56.Name = "LeftElbow"
  595. Motor6D56.Parent = MeshPart54
  596. Motor6D56.C0 = CFrame.new(-0.00166511536, -0.263139546, -0.00943991542, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  597. Motor6D56.C1 = CFrame.new(-0.0016657114, 0.122950554, -0.00989592075, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  598. Motor6D56.Part0 = MeshPart48
  599. Motor6D56.Part1 = MeshPart54
  600. Motor6D56.part1 = MeshPart54
  601. MeshPart57.Name = "LeftHand"
  602. MeshPart57.Parent = Model0
  603. Decal11H.Parent = MeshPart57
  604. Decal11H.Texture = "http://www.roblox.com/asset/?id=15507643492"
  605. MeshPart57.CFrame = CFrame.new(-0.67280364, 2.1668787, -0.699498653, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
  606. MeshPart57.Orientation = Vector3.new(0, 90.1399994, 0)
  607. MeshPart57.Position = Vector3.new(-0.67280364, 2.1668787, -0.699498653)
  608. MeshPart57.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
  609. MeshPart57.Color = Color3.new(0.992157, 0.917647, 0.552941)
  610. MeshPart57.Size = Vector3.new(0.999299049, 0.335255831, 1.00029743)
  611. MeshPart57.BrickColor = BrickColor.new("Cool yellow")
  612. MeshPart57.CanCollide = false
  613. MeshPart57.brickColor = BrickColor.new("Cool yellow")
  614. Vector3Value58.Name = "OriginalSize"
  615. Vector3Value58.Parent = MeshPart57
  616. Vector3Value58.Value = Vector3.new(0.999299049, 0.335255831, 1.00029743)
  617. Motor6D59.Name = "LeftWrist"
  618. Motor6D59.Parent = MeshPart57
  619. Motor6D59.C0 = CFrame.new(-0.0016657114, -0.682255626, -0.00989592075, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  620. Motor6D59.C1 = CFrame.new(-0.000386238098, 0.0579008311, -0.0154390335, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  621. Motor6D59.Part0 = MeshPart54
  622. Motor6D59.Part1 = MeshPart57
  623. Motor6D59.part1 = MeshPart57
  624. Script60.Name = "Respawn"
  625. Script60.Parent = Model0
  626. table.insert(cors,sandbox(Script60,function()
  627. z = Part11
  628.  
  629. backup = z:clone()
  630.  
  631. while true do
  632.     wait(5)
  633.     if z.Zombie.Health == 0 then
  634.         z:Remove()
  635.         wait(4)
  636.         backup.Parent = game.Workspace
  637.         backup.Head:MakeJoints()
  638.         backup.Torso:MakeJoints()
  639.     end
  640.     if z == nil then
  641.         wait(4)
  642.         backup.Parent = game.Workspace
  643.         backup.Head:MakeJoints()
  644.         backup.Torso:MakeJoints()
  645.     end
  646. end
  647. end))
  648. Script61.Name = "Health"
  649. Script61.Parent = Model0
  650. table.insert(cors,sandbox(Script61,function()
  651. --Responsible for regening a player's humanoid's health
  652.  
  653. -- declarations
  654. local Figure = script.Parent
  655. local Head = Figure:WaitForChild("Head")
  656. local Humanoid = Figure:WaitForChild("Humanoid")
  657. local regening = false
  658.  
  659. -- regeneration
  660. function regenHealth()
  661.     if regening then return end
  662.     regening = true
  663.    
  664.     while Humanoid.Health < Humanoid.MaxHealth do
  665.         local s = wait(1)
  666.         local health = Humanoid.Health
  667.         if health > 0 and health < Humanoid.MaxHealth then
  668.             local newHealthDelta = 0.01 * s * Humanoid.MaxHealth
  669.             health = health + newHealthDelta
  670.             Humanoid.Health = math.min(health,Humanoid.MaxHealth)
  671.         end
  672.     end
  673.    
  674.     if Humanoid.Health > Humanoid.MaxHealth then
  675.         Humanoid.Health = Humanoid.MaxHealth
  676.     end
  677.    
  678.     regening = false
  679. end
  680.  
  681. Humanoid.HealthChanged:connect(regenHealth)
  682.  
  683. end))
  684. Script62.Name = "Animate"
  685. Script62.Parent = Model0
  686. table.insert(cors,sandbox(Script62,function()
  687. function   waitForChild(parent, childName)
  688.     local child = parent:findFirstChild(childName)
  689.     if child then return child end
  690.     while true do
  691.         child = parent.ChildAdded:wait()
  692.         if child.Name==childName then return child end
  693.     end
  694. end
  695.  
  696. local Figure = script.Parent
  697. local Humanoid = waitForChild(Figure, "Zombie")
  698. local pose = "Standing"
  699.  
  700. local currentAnim = ""
  701. local currentAnimInstance = nil
  702. local currentAnimTrack = nil
  703. local currentAnimKeyframeHandler = nil
  704. local currentAnimSpeed = 1.0
  705. local animTable = {}
  706. local animNames = {
  707.     idle =  {  
  708.                 { id = "http://www.roblox.com/asset/?id=", weight = 1 },
  709.                 { id = "http://www.roblox.com/asset/?id=", weight = 1 },
  710.                 { id = "http://www.roblox.com/asset/?id=", weight = 9 }
  711.             },
  712.     walk =  {  
  713.                 { id = "http://www.roblox.com/asset/?id=", weight = 10 }
  714.             },
  715.     run =   {
  716.                 { id = "http://www.roblox.com/asset/?id=", weight = 10 }
  717.             },
  718.     swim =  {
  719.                 { id = "http://www.roblox.com/asset/?id=", weight = 10 }
  720.             },
  721.     swimidle =  {
  722.                 { id = "http://www.roblox.com/asset/?id=", weight = 10 }
  723.             },
  724.     jump =  {
  725.                 { id = "http://www.roblox.com/asset/?id=", weight = 10 }
  726.             },
  727.     fall =  {
  728.                 { id = "http://www.roblox.com/asset/?id=", weight = 10 }
  729.             },
  730.     climb = {
  731.                 { id = "http://www.roblox.com/asset/?id=", weight = 10 }
  732.             },
  733.     sit =   {
  734.                 { id = "http://www.roblox.com/asset/?id=507768133", weight = 10 }
  735.             }, 
  736.     toolnone = {
  737.                 { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
  738.             },
  739.     toolslash = {
  740.                 { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
  741. --              { id = "slash.xml", weight = 10 }
  742.             },
  743.     toollunge = {
  744.                 { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
  745.             },
  746.     wave = {
  747.                 { id = "http://www.roblox.com/asset/?id=507770239", weight = 10 }
  748.             },
  749.     point = {
  750.                 { id = "http://www.roblox.com/asset/?id=507770453", weight = 10 }
  751.             },
  752.     dance = {
  753.                 { id = "http://www.roblox.com/asset/?id=507771019", weight = 10 },
  754.                 { id = "http://www.roblox.com/asset/?id=507771955", weight = 10 },
  755.                 { id = "http://www.roblox.com/asset/?id=507772104", weight = 10 }
  756.             },
  757.     dance2 = {
  758.                 { id = "http://www.roblox.com/asset/?id=507776043", weight = 10 },
  759.                 { id = "http://www.roblox.com/asset/?id=507776720", weight = 10 },
  760.                 { id = "http://www.roblox.com/asset/?id=507776879", weight = 10 }
  761.             },
  762.     dance3 = {
  763.                 { id = "http://www.roblox.com/asset/?id=507777268", weight = 10 },
  764.                 { id = "http://www.roblox.com/asset/?id=507777451", weight = 10 },
  765.                 { id = "http://www.roblox.com/asset/?id=507777623", weight = 10 }
  766.             },
  767.     laugh = {
  768.                 { id = "http://www.roblox.com/asset/?id=507770818", weight = 10 }
  769.             },
  770.     cheer = {
  771.                 { id = "http://www.roblox.com/asset/?id=507770677", weight = 10 }
  772.             },
  773. }
  774.  
  775. -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
  776. local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
  777.  
  778. math.randomseed(tick())
  779.  
  780. function configureAnimationSet(name, fileList)
  781.     if (animTable[name] ~= nil) then
  782.         for _, connection in pairs(animTable[name].connections) do
  783.             connection:disconnect()
  784.         end
  785.     end
  786.     animTable[name] = {}
  787.     animTable[name].count = 0
  788.     animTable[name].totalWeight = 0
  789.     animTable[name].connections = {}
  790.  
  791.     -- check for config values
  792.     local config = script:FindFirstChild(name)
  793.     if (config ~= nil) then
  794. --      print("Loading anims " .. name)
  795.         table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
  796.         table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
  797.         local idx = 1
  798.         for _, childPart in pairs(config:GetChildren()) do
  799.             if (childPart:IsA("Animation")) then
  800.                 table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
  801.                 animTable[name][idx] = {}
  802.                 animTable[name][idx].anim = childPart
  803.                 local weightObject = childPart:FindFirstChild("Weight")
  804.                 if (weightObject == nil) then
  805.                     animTable[name][idx].weight = 1
  806.                 else
  807.                     animTable[name][idx].weight = weightObject.Value
  808.                 end
  809.                 animTable[name].count = animTable[name].count + 1
  810.                 animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  811. --              print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  812.                 idx = idx + 1
  813.             end
  814.         end
  815.     end
  816.  
  817.     -- fallback to defaults
  818.     if (animTable[name].count <= 0) then
  819.         for idx, anim in pairs(fileList) do
  820.             animTable[name][idx] = {}
  821.             animTable[name][idx].anim = Instance.new("Animation")
  822.             animTable[name][idx].anim.Name = name
  823.             animTable[name][idx].anim.AnimationId = anim.id
  824.             animTable[name][idx].weight = anim.weight
  825.             animTable[name].count = animTable[name].count + 1
  826.             animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  827. --          print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  828.         end
  829.     end
  830. end
  831.  
  832. -- Setup animation objects
  833. function scriptChildModified(child)
  834.     local fileList = animNames[child.Name]
  835.     if (fileList ~= nil) then
  836.         configureAnimationSet(child.Name, fileList)
  837.     end
  838. end
  839.  
  840. script.ChildAdded:connect(scriptChildModified)
  841. script.ChildRemoved:connect(scriptChildModified)
  842.  
  843.  
  844. for name, fileList in pairs(animNames) do
  845.     configureAnimationSet(name, fileList)
  846. end
  847.  
  848. -- ANIMATION
  849.  
  850. -- declarations
  851. local toolAnim = "None"
  852. local toolAnimTime = 0
  853.  
  854. local jumpAnimTime = 0
  855. local jumpAnimDuration = 0.31
  856.  
  857. local toolTransitionTime = 0.1
  858. local fallTransitionTime = 0.2
  859.  
  860. -- functions
  861.  
  862. function stopAllAnimations()
  863.     local oldAnim = currentAnim
  864.  
  865.     -- return to idle if finishing an emote
  866.     if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  867.         oldAnim = "idle"
  868.     end
  869.  
  870.     currentAnim = ""
  871.     currentAnimInstance = nil
  872.     if (currentAnimKeyframeHandler ~= nil) then
  873.         currentAnimKeyframeHandler:disconnect()
  874.     end
  875.  
  876.     if (currentAnimTrack ~= nil) then
  877.         currentAnimTrack:Stop()
  878.         currentAnimTrack:Destroy()
  879.         currentAnimTrack = nil
  880.     end
  881.     return oldAnim
  882. end
  883.  
  884. function setAnimationSpeed(speed)
  885.     if speed ~= currentAnimSpeed then
  886.         currentAnimSpeed = speed
  887.         currentAnimTrack:AdjustSpeed(currentAnimSpeed)
  888.     end
  889. end
  890.  
  891. function keyFrameReachedFunc(frameName)
  892.     if (frameName == "End") then
  893. --      print("Keyframe : ".. frameName)
  894.  
  895.         local repeatAnim = currentAnim
  896.         -- return to idle if finishing an emote
  897.         if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
  898.             repeatAnim = "idle"
  899.         end
  900.        
  901.         local animSpeed = currentAnimSpeed
  902.         playAnimation(repeatAnim, 0.15, Humanoid)
  903.         setAnimationSpeed(animSpeed)
  904.     end
  905. end
  906.  
  907. -- Preload animations
  908. function playAnimation(animName, transitionTime, humanoid)
  909.        
  910.     local roll = math.random(1, animTable[animName].totalWeight)
  911.     local origRoll = roll
  912.     local idx = 1
  913.     while (roll > animTable[animName][idx].weight) do
  914.         roll = roll - animTable[animName][idx].weight
  915.         idx = idx + 1
  916.     end
  917.    
  918. --  print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  919.    
  920.     local anim = animTable[animName][idx].anim
  921.  
  922.     -- switch animation    
  923.     if (anim ~= currentAnimInstance) then
  924.        
  925.         if (currentAnimTrack ~= nil) then
  926.             currentAnimTrack:Stop(transitionTime)
  927.             currentAnimTrack:Destroy()
  928.         end
  929.  
  930.         currentAnimSpeed = 1.0
  931.    
  932.         -- load it to the humanoid; get AnimationTrack
  933.         currentAnimTrack = humanoid:LoadAnimation(anim)
  934.          
  935.         -- play the animation
  936.         currentAnimTrack:Play(transitionTime)
  937.         currentAnim = animName
  938.         currentAnimInstance = anim
  939.  
  940.         -- set up keyframe name triggers
  941.         if (currentAnimKeyframeHandler ~= nil) then
  942.             currentAnimKeyframeHandler:disconnect()
  943.         end
  944.         currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  945.        
  946.     end
  947.  
  948. end
  949.  
  950. -------------------------------------------------------------------------------------------
  951. -------------------------------------------------------------------------------------------
  952.  
  953. local toolAnimName = ""
  954. local toolAnimTrack = nil
  955. local toolAnimInstance = nil
  956. local currentToolAnimKeyframeHandler = nil
  957.  
  958. function toolKeyFrameReachedFunc(frameName)
  959.     if (frameName == "End") then
  960. --      print("Keyframe : ".. frameName)   
  961.         playToolAnimation(toolAnimName, 0.0, Humanoid)
  962.     end
  963. end
  964.  
  965.  
  966. function playToolAnimation(animName, transitionTime, humanoid)   
  967.        
  968.         local roll = math.random(1, animTable[animName].totalWeight)
  969.         local origRoll = roll
  970.         local idx = 1
  971.         while (roll > animTable[animName][idx].weight) do
  972.             roll = roll - animTable[animName][idx].weight
  973.             idx = idx + 1
  974.         end
  975. --      print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  976.         local anim = animTable[animName][idx].anim
  977.  
  978.         if (toolAnimInstance ~= anim) then
  979.            
  980.             if (toolAnimTrack ~= nil) then
  981.                 toolAnimTrack:Stop()
  982.                 toolAnimTrack:Destroy()
  983.                 transitionTime = 0
  984.             end
  985.                    
  986.             -- load it to the humanoid; get AnimationTrack
  987.             toolAnimTrack = humanoid:LoadAnimation(anim)
  988.              
  989.             -- play the animation
  990.             toolAnimTrack:Play(transitionTime)
  991.             toolAnimName = animName
  992.             toolAnimInstance = anim
  993.  
  994.             currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  995.         end
  996. end
  997.  
  998. function stopToolAnimations()
  999.     local oldAnim = toolAnimName
  1000.  
  1001.     if (currentToolAnimKeyframeHandler ~= nil) then
  1002.         currentToolAnimKeyframeHandler:disconnect()
  1003.     end
  1004.  
  1005.     toolAnimName = ""
  1006.     toolAnimInstance = nil
  1007.     if (toolAnimTrack ~= nil) then
  1008.         toolAnimTrack:Stop()
  1009.         toolAnimTrack:Destroy()
  1010.         toolAnimTrack = nil
  1011.     end
  1012.  
  1013.  
  1014.     return oldAnim
  1015. end
  1016.  
  1017. -------------------------------------------------------------------------------------------
  1018. -------------------------------------------------------------------------------------------
  1019.  
  1020.  
  1021. function onRunning(speed)
  1022.     if speed > 0.01 then
  1023.         local scale = 15.0
  1024.         playAnimation("walk", 0.1, Humanoid)
  1025.         setAnimationSpeed(speed / scale)
  1026.         pose = "Running"
  1027.     else
  1028.         playAnimation("idle", 0.1, Humanoid)
  1029.         pose = "Standing"
  1030.     end
  1031. end
  1032.  
  1033. function onDied()
  1034.     pose = "Dead"
  1035. end
  1036.  
  1037. function onJumping()
  1038.     playAnimation("jump", 0.1, Humanoid)
  1039.     jumpAnimTime = jumpAnimDuration
  1040.     pose = "Jumping"
  1041. end
  1042.  
  1043. function onClimbing(speed)
  1044.     local scale = 5.0
  1045.     playAnimation("climb", 0.1, Humanoid)
  1046.     setAnimationSpeed(speed / scale)
  1047.     pose = "Climbing"
  1048. end
  1049.  
  1050. function onGettingUp()
  1051.     pose = "GettingUp"
  1052. end
  1053.  
  1054. function onFreeFall()
  1055.     if (jumpAnimTime <= 0) then
  1056.         playAnimation("fall", fallTransitionTime, Humanoid)
  1057.     end
  1058.     pose = "FreeFall"
  1059. end
  1060.  
  1061. function onFallingDown()
  1062.     pose = "FallingDown"
  1063. end
  1064.  
  1065. function onSeated()
  1066.     pose = "Seated"
  1067. end
  1068.  
  1069. function onPlatformStanding()
  1070.     pose = "PlatformStanding"
  1071. end
  1072.  
  1073. function onSwimming(speed)
  1074.     if speed > 1.00 then
  1075.         local scale = 10.0
  1076.         playAnimation("swim", 0.4, Humanoid)
  1077.         setAnimationSpeed(speed / scale)
  1078.         pose = "Swimming"
  1079.     else
  1080.         playAnimation("swimidle", 0.4, Humanoid)
  1081.         pose = "Standing"
  1082.     end
  1083. end
  1084.  
  1085. function getTool() 
  1086.     for _, kid in ipairs(Figure:GetChildren()) do
  1087.         if kid.className == "Tool" then return kid end
  1088.     end
  1089.     return nil
  1090. end
  1091.  
  1092. function getToolAnim(tool)
  1093.     for _, c in ipairs(tool:GetChildren()) do
  1094.         if c.Name == "toolanim" and c.className == "StringValue" then
  1095.             return c
  1096.         end
  1097.     end
  1098.     return nil
  1099. end
  1100.  
  1101. function animateTool()
  1102.    
  1103.     if (toolAnim == "None") then
  1104.         playToolAnimation("toolnone", toolTransitionTime, Humanoid)
  1105.         return
  1106.     end
  1107.  
  1108.     if (toolAnim == "Slash") then
  1109.         playToolAnimation("toolslash", 0, Humanoid)
  1110.         return
  1111.     end
  1112.  
  1113.     if (toolAnim == "Lunge") then
  1114.         playToolAnimation("toollunge", 0, Humanoid)
  1115.         return
  1116.     end
  1117. end
  1118.  
  1119. function moveSit()
  1120.     RightShoulder.MaxVelocity = 0.15
  1121.     LeftShoulder.MaxVelocity = 0.15
  1122.     RightShoulder:SetDesiredAngle(3.14 /2)
  1123.     LeftShoulder:SetDesiredAngle(-3.14 /2)
  1124.     RightHip:SetDesiredAngle(3.14 /2)
  1125.     LeftHip:SetDesiredAngle(-3.14 /2)
  1126. end
  1127.  
  1128. local lastTick = 0
  1129.  
  1130. function move(time)
  1131.     local amplitude = 1
  1132.     local frequency = 1
  1133.     local deltaTime = time - lastTick
  1134.     lastTick = time
  1135.  
  1136.     local climbFudge = 0
  1137.     local setAngles = false
  1138.  
  1139.     if (jumpAnimTime > 0) then
  1140.         jumpAnimTime = jumpAnimTime - deltaTime
  1141.     end
  1142.  
  1143.     if (pose == "FreeFall" and jumpAnimTime <= 0) then
  1144.         playAnimation("fall", fallTransitionTime, Humanoid)
  1145.     elseif (pose == "Seated") then
  1146.         playAnimation("sit", 0.5, Humanoid)
  1147.         return
  1148.     elseif (pose == "Running") then
  1149.         playAnimation("walk", 0.1, Humanoid)
  1150.     elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  1151.         stopAllAnimations()
  1152.         amplitude = 0.1
  1153.         frequency = 1
  1154.         setAngles = true
  1155.     end
  1156.  
  1157.     -- Tool Animation handling
  1158.     local tool = getTool()
  1159.     if tool then
  1160.    
  1161.         animStringValueObject = getToolAnim(tool)
  1162.  
  1163.         if animStringValueObject then
  1164.             toolAnim = animStringValueObject.Value
  1165.             -- message recieved, delete StringValue
  1166.             animStringValueObject.Parent = nil
  1167.             toolAnimTime = time + .3
  1168.         end
  1169.  
  1170.         if time > toolAnimTime then
  1171.             toolAnimTime = 0
  1172.             toolAnim = "None"
  1173.         end
  1174.  
  1175.         animateTool()      
  1176.     else
  1177.         stopToolAnimations()
  1178.         toolAnim = "None"
  1179.         toolAnimInstance = nil
  1180.         toolAnimTime = 0
  1181.     end
  1182. end
  1183.  
  1184. -- connect events
  1185. Humanoid.Died:connect(onDied)
  1186. Humanoid.Running:connect(onRunning)
  1187. Humanoid.Jumping:connect(onJumping)
  1188. Humanoid.Climbing:connect(onClimbing)
  1189. Humanoid.GettingUp:connect(onGettingUp)
  1190. Humanoid.FreeFalling:connect(onFreeFall)
  1191. Humanoid.FallingDown:connect(onFallingDown)
  1192. Humanoid.Seated:connect(onSeated)
  1193. Humanoid.PlatformStanding:connect(onPlatformStanding)
  1194. Humanoid.Swimming:connect(onSwimming)
  1195.  
  1196. -- setup emote chat hook
  1197. script.msg.Changed:connect(function(msg)
  1198.     script.msg.Value = ""
  1199.     local emote = ""
  1200.     if (string.sub(msg, 1, 3) == "/e ") then
  1201.         emote = string.sub(msg, 4)
  1202.     elseif (string.sub(msg, 1, 7) == "/emote ") then
  1203.         emote = string.sub(msg, 8)
  1204.     end
  1205.    
  1206.     if (pose == "Standing" and emoteNames[emote] ~= nil) then
  1207.         playAnimation(emote, 0.1, Humanoid)
  1208.     end
  1209. --  print("===> " .. string.sub(msg, 1, 3) .. "(" .. emote .. ")")
  1210. end)
  1211.  
  1212.  
  1213. -- main program
  1214.  
  1215. local runService = game:service("RunService");
  1216.  
  1217. -- print("bottom")
  1218.  
  1219. -- initialize to idle
  1220. playAnimation("idle", 0.1, Humanoid)
  1221. pose = "Standing"
  1222.  
  1223. while Figure.Parent~=nil do
  1224.     local _, time = wait(0.1)
  1225.     move(time)
  1226. end
  1227.  
  1228.  
  1229.  
  1230. end))
  1231. StringValue63.Name = "msg"
  1232. StringValue63.Parent = Script62
  1233. StringValue64.Name = "climb"
  1234. StringValue64.Parent = Script62
  1235. Animation65.Name = "ClimbAnim"
  1236. Animation65.Parent = StringValue64
  1237. Animation65.AnimationId = "http://www.roblox.com/asset/?id="
  1238. StringValue66.Name = "fall"
  1239. StringValue66.Parent = Script62
  1240. Animation67.Name = "FallAnim"
  1241. Animation67.Parent = StringValue66
  1242. Animation67.AnimationId = "http://www.roblox.com/asset/?id="
  1243. StringValue68.Name = "idle"
  1244. StringValue68.Parent = Script62
  1245. Animation69.Name = "Animation1"
  1246. Animation69.Parent = StringValue68
  1247. Animation69.AnimationId = "http://www.roblox.com/asset/?id="
  1248. NumberValue70.Name = "Weight"
  1249. NumberValue70.Parent = Animation69
  1250. NumberValue70.Value = 9
  1251. Animation71.Name = "Animation2"
  1252. Animation71.Parent = StringValue68
  1253. Animation71.AnimationId = "http://www.roblox.com/asset/?id="
  1254. NumberValue72.Name = "Weight"
  1255. NumberValue72.Parent = Animation71
  1256. NumberValue72.Value = 1
  1257. StringValue73.Name = "jump"
  1258. StringValue73.Parent = Script62
  1259. Animation74.Name = "JumpAnim"
  1260. Animation74.Parent = StringValue73
  1261. Animation74.AnimationId = "http://www.roblox.com/asset/?id="
  1262. StringValue75.Name = "sit"
  1263. StringValue75.Parent = Script62
  1264. Animation76.Name = "SitAnim"
  1265. Animation76.Parent = StringValue75
  1266. Animation76.AnimationId = "http://www.roblox.com/asset/?id="
  1267. StringValue77.Name = "swim"
  1268. StringValue77.Parent = Script62
  1269. Animation78.Name = "Swim"
  1270. Animation78.Parent = StringValue77
  1271. Animation78.AnimationId = "http://www.roblox.com/asset/?id="
  1272. StringValue79.Name = "swimidle"
  1273. StringValue79.Parent = Script62
  1274. Animation80.Name = "SwimIdle"
  1275. Animation80.Parent = StringValue79
  1276. Animation80.AnimationId = "http://www.roblox.com/asset/?id="
  1277. StringValue81.Name = "toolnone"
  1278. StringValue81.Parent = Script62
  1279. Animation82.Name = "ToolNoneAnim"
  1280. Animation82.Parent = StringValue81
  1281. Animation82.AnimationId = "http://www.roblox.com/asset/?id="
  1282. StringValue83.Name = "walk"
  1283. StringValue83.Parent = Script62
  1284. Animation84.Name = "RunAnim"
  1285. Animation84.Parent = StringValue83
  1286. Animation84.AnimationId = "http://www.roblox.com/asset/?id="
  1287. Script85.Name = "SoundScript"
  1288. Script85.Parent = Model0
  1289. table.insert(cors,sandbox(Script85,function()
  1290. local moan = script.Parent.Head.Moan
  1291. local moan2 = script.parent.Head.Moan2
  1292. local moan3 = script.parent.Head.Moan3
  1293. local moan4 = script.Parent.Head.Moan4
  1294.  
  1295. while true do
  1296.     moan:Play()
  1297.     wait(8)
  1298.    
  1299.     moan2:Play()
  1300.     wait(5)
  1301.    
  1302.     moan3:Play()
  1303.     wait(7)
  1304.    
  1305.     moan4:Play()
  1306.     wait(6)
  1307. end
  1308.  
  1309.  
  1310. local death = script.Parent.Head.Death
  1311.  
  1312.  
  1313. end))
  1314. for i,v in pairs(mas:GetChildren()) do
  1315.     v.Parent = workspace
  1316.     pcall(function() v:MakeJoints() end)
  1317. end
  1318. mas:Destroy()
  1319. for i,v in pairs(cors) do
  1320.     spawn(function()
  1321.         pcall(v)
  1322.     end)
  1323. end
  1324. end
  1325.  
  1326. for i = 1,1 do
  1327. createZombie()
  1328. end
  1329.  
  1330.  
  1331. RunLabel.Parent = ScreenGui
  1332. RunLabel.BackgroundTransparency = 1
  1333. RunLabel.Size = UDim2.new(2, 0, 2, 0)
  1334. RunLabel.Position = UDim2.new(-0.5, 0, -0.4 ,-255)
  1335. RunLabel.TextXAlignment = Enum.TextXAlignment.Center
  1336. RunLabel.TextScaled = true
  1337. RunLabel.Text = ""
  1338. RunLabel.TextColor3 = Color3.new(155, 0, 0)
  1339. RunLabel.Font = Enum.Font.IndieFlower
  1340.  
  1341. while wait(1) do
  1342. for _,plrs in pairs(game.Players:GetPlayers()) do
  1343.  if (Part11.Position - plrs.Character.HumanoidRootPart.Position).magnitude <= 20 then
  1344. HeartBeat:Play()
  1345. RunLabel.Text = "Run!!!"
  1346. else
  1347. HeartBeat:Stop()
  1348. RunLabel.Text = ""
  1349. end
  1350. end
  1351. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement