Advertisement
DenisPitu06_YT

OP Zombie script

Aug 7th, 2019
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function dmg()
  2. local h = hit.Parent:FindFirstChild("Humanoid")
  3. if h ~= nil then
  4. h.Health = h.Health - 1
  5. h.WalkSpeed = 0
  6. end
  7. end
  8. function infect(hit)
  9. local h = hit.Parent:FindFirstChild("Humanoid")
  10. if h ~= nil and hit.Parent ~= script.Parent then
  11. local infection = script:Clone()
  12. infection.Parent = hit.Parent
  13. end
  14. end
  15. script.Parent.Torso.Touched:connect(infect)
  16. script.Parent["Left Arm"].Touched:connect(dmg)
  17. script.Parent["Right Arm"].Touched:connect(dmg)
  18. while true do
  19. wait(.1)
  20. script.Parent["Head"].BrickColor = BrickColor.new("Forest green")
  21. script.Parent["Left Arm"].BrickColor = BrickColor.new("Forest green")
  22. script.Parent["Left Leg"].BrickColor = BrickColor.new("Dirt brown")
  23. script.Parent["Right Arm"].BrickColor = BrickColor.new("Forest green")
  24. script.Parent["Right Leg"].BrickColor = BrickColor.new("Dirt brown")
  25. script.Parent["Torso"].BrickColor = BrickColor.new("Dirt brown")
  26. script.Parent.Humanoid.MaxHealth = 35
  27. script.Parent.Humanoid.Health = 35
  28. script.Parent.Humanoid.WalkSpeed = 2
  29. script.Parent.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=956920334"
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement