Advertisement
cat568

Untitled

Mar 8th, 2019
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.77 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Model0 = Instance.new("Model")
  20. Part1 = Instance.new("Part")
  21. SpecialMesh2 = Instance.new("SpecialMesh")
  22. Decal3 = Instance.new("Decal")
  23. Part4 = Instance.new("Part")
  24. Part5 = Instance.new("Part")
  25. Part6 = Instance.new("Part")
  26. Humanoid7 = Instance.new("Humanoid")
  27. Part8 = Instance.new("Part")
  28. Script9 = Instance.new("Script")
  29. Part10 = Instance.new("Part")
  30. Script11 = Instance.new("Script")
  31. ObjectValue12 = Instance.new("ObjectValue")
  32. IntValue13 = Instance.new("IntValue")
  33. Script14 = Instance.new("Script")
  34. Script15 = Instance.new("Script")
  35. Script16 = Instance.new("Script")
  36. Model0.Name = "Zombie"
  37. Model0.Parent = mas
  38. Model0.PrimaryPart = Part1
  39. Part1.Name = "Head"
  40. Part1.Parent = Model0
  41. Part1.CFrame = CFrame.new(-179.456482, 4.50000429, 27.0912628, 3.4228453e-08, -5.1348214e-21, 0.99999696, 3.85277586e-21, 1, 5.1348214e-21, -0.99999696, 3.85276576e-21, 3.4228453e-08)
  42. Part1.Orientation = Vector3.new(0, 90, 0)
  43. Part1.Position = Vector3.new(-179.456482, 4.50000429, 27.0912628)
  44. Part1.Rotation = Vector3.new(0, 89.8600006, 0)
  45. Part1.Color = Color3.new(0.631373, 0.768627, 0.54902)
  46. Part1.Velocity = Vector3.new(3.64787943e-20, 0.00686328812, 3.64330182e-20)
  47. Part1.Size = Vector3.new(2, 1, 1)
  48. Part1.BrickColor = BrickColor.new("Medium green")
  49. Part1.RotVelocity = Vector3.new(4.07127958e-25, 3.33696291e-22, 6.94702468e-25)
  50. Part1.TopSurface = Enum.SurfaceType.Smooth
  51. Part1.brickColor = BrickColor.new("Medium green")
  52. Part1.FormFactor = Enum.FormFactor.Symmetric
  53. Part1.formFactor = Enum.FormFactor.Symmetric
  54. SpecialMesh2.Parent = Part1
  55. SpecialMesh2.Scale = Vector3.new(1.25, 1.25, 1.25)
  56. Decal3.Name = "face"
  57. Decal3.Parent = Part1
  58. Part4.Name = "Torso"
  59. Part4.Parent = Model0
  60. Part4.CFrame = CFrame.new(-179.456482, 3.00000906, 27.0912628, 3.4228453e-08, -5.1348214e-21, 0.99999696, 3.85277586e-21, 1, 5.1348214e-21, -0.99999696, 3.85276576e-21, 3.4228453e-08)
  61. Part4.Orientation = Vector3.new(0, 90, 0)
  62. Part4.Position = Vector3.new(-179.456482, 3.00000906, 27.0912628)
  63. Part4.Rotation = Vector3.new(0, 89.8600006, 0)
  64. Part4.Color = Color3.new(0.411765, 0.25098, 0.156863)
  65. Part4.Size = Vector3.new(2, 2, 1)
  66. Part4.BrickColor = BrickColor.new("Reddish brown")
  67. Part4.LeftParamA = 0
  68. Part4.LeftParamB = 0
  69. Part4.LeftSurface = Enum.SurfaceType.Weld
  70. Part4.RightParamA = 0
  71. Part4.RightParamB = 0
  72. Part4.RightSurface = Enum.SurfaceType.Weld
  73. Part4.brickColor = BrickColor.new("Reddish brown")
  74. Part4.FormFactor = Enum.FormFactor.Symmetric
  75. Part4.formFactor = Enum.FormFactor.Symmetric
  76. Part5.Name = "Left Leg"
  77. Part5.Parent = Model0
  78. Part5.CFrame = CFrame.new(-179.456482, 1.00000906, 27.5912609, 3.4228453e-08, -5.1348214e-21, 0.99999696, 3.85277586e-21, 1, 5.1348214e-21, -0.99999696, 3.85276576e-21, 3.4228453e-08)
  79. Part5.Orientation = Vector3.new(0, 90, 0)
  80. Part5.Position = Vector3.new(-179.456482, 1.00000906, 27.5912609)
  81. Part5.Rotation = Vector3.new(0, 89.8600006, 0)
  82. Part5.Color = Color3.new(0.411765, 0.25098, 0.156863)
  83. Part5.Velocity = Vector3.new(3.66480722e-20, 0.00686328812, 3.64315933e-20)
  84. Part5.Size = Vector3.new(1, 2, 1)
  85. Part5.BottomSurface = Enum.SurfaceType.Smooth
  86. Part5.BrickColor = BrickColor.new("Reddish brown")
  87. Part5.CanCollide = false
  88. Part5.RotVelocity = Vector3.new(4.07127958e-25, 3.33696291e-22, 6.94702468e-25)
  89. Part5.brickColor = BrickColor.new("Reddish brown")
  90. Part5.FormFactor = Enum.FormFactor.Symmetric
  91. Part5.formFactor = Enum.FormFactor.Symmetric
  92. Part6.Name = "Right Leg"
  93. Part6.Parent = Model0
  94. Part6.CFrame = CFrame.new(-179.456482, 1.00000906, 26.5912647, 3.4228453e-08, -5.1348214e-21, 0.99999696, 3.85277586e-21, 1, 5.1348214e-21, -0.99999696, 3.85276576e-21, 3.4228453e-08)
  95. Part6.Orientation = Vector3.new(0, 90, 0)
  96. Part6.Position = Vector3.new(-179.456482, 1.00000906, 26.5912647)
  97. Part6.Rotation = Vector3.new(0, 89.8600006, 0)
  98. Part6.Color = Color3.new(0.411765, 0.25098, 0.156863)
  99. Part6.Velocity = Vector3.new(3.6314376e-20, 0.00686328812, 3.64315933e-20)
  100. Part6.Size = Vector3.new(1, 2, 1)
  101. Part6.BottomSurface = Enum.SurfaceType.Smooth
  102. Part6.BrickColor = BrickColor.new("Reddish brown")
  103. Part6.CanCollide = false
  104. Part6.RotVelocity = Vector3.new(4.07127958e-25, 3.33696291e-22, 6.94702468e-25)
  105. Part6.brickColor = BrickColor.new("Reddish brown")
  106. Part6.FormFactor = Enum.FormFactor.Symmetric
  107. Part6.formFactor = Enum.FormFactor.Symmetric
  108. Humanoid7.Parent = Model0
  109. Humanoid7.LeftLeg = Part5
  110. Humanoid7.RightLeg = Part6
  111. Humanoid7.Torso = Part4
  112. Part8.Name = "zarm"
  113. Part8.Parent = Model0
  114. Part8.CFrame = CFrame.new(-179.956482, 3.50000906, 28.591259, -0.99999696, -5.1348214e-21, 3.4228453e-08, -5.1348214e-21, 1, 3.85277586e-21, -3.4228453e-08, 3.85276576e-21, -0.99999696)
  115. Part8.Orientation = Vector3.new(0, 180, 0)
  116. Part8.Position = Vector3.new(-179.956482, 3.50000906, 28.591259)
  117. Part8.Rotation = Vector3.new(-180, 0, 180)
  118. Part8.Color = Color3.new(0.631373, 0.768627, 0.54902)
  119. Part8.Velocity = Vector3.new(3.69800334e-20, 0.00686328812, 3.65994592e-20)
  120. Part8.Size = Vector3.new(2, 1, 1)
  121. Part8.BottomSurface = Enum.SurfaceType.Smooth
  122. Part8.BrickColor = BrickColor.new("Medium green")
  123. Part8.RotVelocity = Vector3.new(4.07127958e-25, 3.33696291e-22, 6.94702468e-25)
  124. Part8.TopSurface = Enum.SurfaceType.Smooth
  125. Part8.brickColor = BrickColor.new("Medium green")
  126. Part8.FormFactor = Enum.FormFactor.Symmetric
  127. Part8.formFactor = Enum.FormFactor.Symmetric
  128. Script9.Parent = Part8
  129. table.insert(cors,sandbox(Script9,function()
  130. wait(1)
  131. owner=script.Parent.Parent.Name
  132.  
  133. function onTouched(part)
  134. if part.Parent ~= nil then
  135. local h = part.Parent:findFirstChild("Humanoid")
  136. if h~=nil then
  137. if cantouch~=0 then
  138. if h.Parent.Name~=owner then
  139.  
  140. if h.Parent:findFirstChild("zarm")~=nil then return end
  141.  
  142. cantouch=0
  143.  
  144. local larm=h.Parent:findFirstChild("Left Arm")
  145. local rarm=h.Parent:findFirstChild("Right Arm")
  146.  
  147. if larm~=nil then
  148. larm:remove()
  149. end
  150. if rarm~=nil then
  151. rarm:remove()
  152. end
  153. local zee=script.Parent.Parent:findFirstChild("zarm")
  154. if zee~=nil then
  155. local zlarm=zee:clone()
  156. local zrarm=zee:clone()
  157. if zlarm~=nil then
  158.  
  159. local rot=CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  160. zlarm.CFrame=h.Parent.Torso.CFrame * CFrame.new(Vector3.new(-1.5,0.5,-0.5)) * rot
  161. zrarm.CFrame=h.Parent.Torso.CFrame * CFrame.new(Vector3.new(1.5,0.5,-0.5)) * rot
  162. zlarm.Parent=h.Parent
  163. zrarm.Parent=h.Parent
  164. zlarm:makeJoints()
  165. zrarm:makeJoints()
  166. zlarm.Anchored=false
  167. zrarm.Anchored=false
  168. wait(0.1)
  169. h.Parent.Head.Color=zee.Color
  170. else print("no zee"); return end
  171. end
  172. wait(1)
  173. cantouch=1
  174. end
  175. end
  176. end
  177. end
  178. end
  179.  
  180. script.Parent.Touched:connect(onTouched)
  181. end))
  182. Part10.Name = "zarm"
  183. Part10.Parent = Model0
  184. Part10.CFrame = CFrame.new(-179.956482, 3.50000906, 25.5912666, -0.99999696, -5.1348214e-21, 3.4228453e-08, -5.1348214e-21, 1, 3.85277586e-21, -3.4228453e-08, 3.85276576e-21, -0.99999696)
  185. Part10.Orientation = Vector3.new(0, 180, 0)
  186. Part10.Position = Vector3.new(-179.956482, 3.50000906, 25.5912666)
  187. Part10.Rotation = Vector3.new(-180, 0, 180)
  188. Part10.Color = Color3.new(0.631373, 0.768627, 0.54902)
  189. Part10.Velocity = Vector3.new(3.59789445e-20, 0.00686328812, 3.65994592e-20)
  190. Part10.Size = Vector3.new(2, 1, 1)
  191. Part10.BottomSurface = Enum.SurfaceType.Smooth
  192. Part10.BrickColor = BrickColor.new("Medium green")
  193. Part10.RotVelocity = Vector3.new(4.07127958e-25, 3.33696291e-22, 6.94702468e-25)
  194. Part10.TopSurface = Enum.SurfaceType.Smooth
  195. Part10.brickColor = BrickColor.new("Medium green")
  196. Part10.FormFactor = Enum.FormFactor.Symmetric
  197. Part10.formFactor = Enum.FormFactor.Symmetric
  198. Script11.Parent = Part10
  199. table.insert(cors,sandbox(Script11,function()
  200. wait(1)
  201. owner=script.Parent.Parent.Name
  202.  
  203. function onTouched(part)
  204. if part.Parent ~= nil then
  205. local h = part.Parent:findFirstChild("Humanoid")
  206. if h~=nil then
  207. if cantouch~=0 then
  208. if h.Parent.Name~=owner then
  209.  
  210. if h.Parent:findFirstChild("zarm")~=nil then return end
  211.  
  212. cantouch=0
  213.  
  214. local larm=h.Parent:findFirstChild("Left Arm")
  215. local rarm=h.Parent:findFirstChild("Right Arm")
  216.  
  217. if larm~=nil then
  218. larm:remove()
  219. end
  220. if rarm~=nil then
  221. rarm:remove()
  222. end
  223. local zee=script.Parent.Parent:findFirstChild("zarm")
  224. if zee~=nil then
  225. local zlarm=zee:clone()
  226. local zrarm=zee:clone()
  227. if zlarm~=nil then
  228.  
  229. local rot=CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  230. zlarm.CFrame=h.Parent.Torso.CFrame * CFrame.new(Vector3.new(-1.5,0.5,-0.5)) * rot
  231. zrarm.CFrame=h.Parent.Torso.CFrame * CFrame.new(Vector3.new(1.5,0.5,-0.5)) * rot
  232. zlarm.Parent=h.Parent
  233. zrarm.Parent=h.Parent
  234. zlarm:makeJoints()
  235. zrarm:makeJoints()
  236. zlarm.Anchored=false
  237. zrarm.Anchored=false
  238. wait(0.1)
  239. h.Parent.Head.Color=zee.Color
  240. else print("no zee"); return end
  241. end
  242. wait(1)
  243. cantouch=1
  244. end
  245. end
  246. end
  247. end
  248. end
  249.  
  250. script.Parent.Touched:connect(onTouched)
  251. end))
  252. ObjectValue12.Name = "IsNZ"
  253. ObjectValue12.Parent = Model0
  254. IntValue13.Name = "Mode"
  255. IntValue13.Parent = Model0
  256. Script14.Parent = Model0
  257. table.insert(cors,sandbox(Script14,function()
  258. local larm = script.Parent:FindFirstChild("Left Arm")
  259. local rarm = script.Parent:FindFirstChild("Right Arm")
  260.  
  261. function findNearestTorso(pos)
  262. local list = game.Workspace:children()
  263. local torso = nil
  264. local dist = 1000
  265. local temp = nil
  266. local human = nil
  267. local temp2 = nil
  268. for x = 1, #list do
  269. temp2 = list[x]
  270. if (temp2.className == "Model") and (temp2 ~= script.Parent) then
  271. temp = temp2:findFirstChild("Right Arm")
  272. human = temp2:findFirstChild("Humanoid")
  273. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  274. if (temp.Position - pos).magnitude < dist then
  275. torso = temp
  276. dist = (temp.Position - pos).magnitude
  277. end
  278. end
  279. end
  280. end
  281. return torso
  282. end
  283.  
  284.  
  285.  
  286.  
  287. while true do
  288. wait(math.random(1,5))
  289. local target = findNearestTorso(script.Parent.Torso.Position)
  290. if target ~= nil then
  291. script.Parent.Humanoid:MoveTo(target.Position, target)
  292. end
  293.  
  294. end
  295.  
  296. end))
  297. Script15.Name = "Health"
  298. Script15.Parent = Model0
  299. table.insert(cors,sandbox(Script15,function()
  300. function waitForChild(parent, childName)
  301. while true do
  302. local child = parent:findFirstChild(childName)
  303. if child then
  304. return child
  305. end
  306. parent.ChildAdded:wait()
  307. end
  308. end
  309.  
  310. -- declarations
  311.  
  312. local Figure = script.Parent
  313. local Head = waitForChild(Figure, "Head")
  314. local Humanoid = waitForChild(Figure, "Humanoid")
  315. Humanoid.Health=500
  316. -- regeneration
  317. while true do
  318. local s = wait(4)
  319. local health = Humanoid.Health
  320. if health > 0 and health < Humanoid.MaxHealth then
  321. health = health + 0.08 * s * Humanoid.MaxHealth
  322. if health * 1.05 < Humanoid.MaxHealth then
  323. Humanoid.Health = health
  324. else
  325. Humanoid.Health = Humanoid.MaxHealth
  326. end
  327. end
  328. end
  329.  
  330. end))
  331. Script16.Name = "Respawn"
  332. Script16.Parent = Model0
  333. table.insert(cors,sandbox(Script16,function()
  334. name="Humanoid"
  335.  
  336. robo=script.Parent:clone()
  337.  
  338. while true do
  339. wait(1)
  340. if script.Parent.Humanoid.Health<1 then
  341. robot=robo:clone()
  342. robot.Parent=script.Parent.Parent
  343. robot:makeJoints()
  344. script.Parent:remove()
  345. end
  346. end
  347.  
  348.  
  349.  
  350.  
  351. end))
  352. for i,v in pairs(mas:GetChildren()) do
  353. v.Parent = workspace
  354. pcall(function() v:MakeJoints() end)
  355. end
  356. mas:Destroy()
  357. for i,v in pairs(cors) do
  358. spawn(function()
  359. pcall(v)
  360. end)
  361. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement