Advertisement
UhhLegoboy

Sanic

Dec 30th, 2016
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. wait(1)
  2. local Dummy = game.Workspace:FindFirstChild("Dummy")
  3. if Dummy == nil then
  4. error("Dummy not found! Please Do \"g/dummy\"")
  5. return
  6. end
  7. wait(0.5)
  8. for i,v in pairs(Dummy:GetChildren()) do
  9. if v.ClassName == "Part" then
  10. v.Transparency = 10
  11. end
  12. end
  13. local Humanoid = Dummy:FindFirstChild("Humanoid")
  14. local Head = Dummy:FindFirstChild("Head")
  15. local ishead = true
  16. if Humanoid == nil then error("Humanoid not found!") return end
  17. if Head == nil then ishead = false end
  18. if ishead == true then
  19. if Head:FindFirstChild("face") then
  20. Head:FindFirstChild("face"):Destroy()
  21. end
  22. end
  23. Humanoid.MaxHealth = math.huge
  24. Humanoid.Health = math.huge
  25. Humanoid.WalkSpeed = 600
  26. Humanoid.Name = "Zombie"
  27. local Billboard = Instance.new("BillboardGui", Dummy)
  28. Billboard.Adornee = Dummy.Torso
  29. Billboard.Size = UDim2.new(7.5, 0, 7.5, 0)
  30. local SanicImg = Instance.new("ImageLabel", Billboard)
  31. SanicImg.Size = UDim2.new(1, 0, 1, 0)
  32. SanicImg.BackgroundTransparency = 10
  33. SanicImg.Image = "http://www.roblox.com/asset/?id=135813071"
  34. local Music = Instance.new("Sound", Dummy.Head)
  35. Music.SoundId = "http://www.roblox.com/asset/?id=224705079"
  36. Music.Looped = true
  37. Music.Volume = 1
  38. Music:Play()
  39. function onTouchedDeath(part)
  40. if part.Parent ~= nil then
  41. local h = part.Parent:findFirstChild("Humanoid")
  42. if h ~= nil then
  43. local has_health = h.Health > 0
  44. h:TakeDamage(h.MaxHealth + 10)
  45. end
  46. end
  47. end
  48. Dummy["Left Arm"].Touched:connect(onTouchedDeath)
  49. Dummy["Right Arm"].Touched:connect(onTouchedDeath)
  50. local larm = script.Parent:FindFirstChild("Left Arm")
  51. local rarm = script.Parent:FindFirstChild("Right Arm")
  52. function findNearestTorso(pos)
  53. local list = game.Workspace:children()
  54. local torso = nil
  55. local dist = 1000
  56. local temp = nil
  57. local human = nil
  58. local temp2 = nil
  59. for x = 1, #list do
  60. temp2 = list[x]
  61. if (temp2.className == "Model") and (temp2 ~= script.Parent) then
  62. temp = temp2:findFirstChild("Right Arm")
  63. human = temp2:findFirstChild("Humanoid")
  64. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  65. if (temp.Position - pos).magnitude < dist then
  66. torso = temp
  67. dist = (temp.Position - pos).magnitude
  68. end
  69. end
  70. end
  71. end
  72. return torso
  73. end
  74. while true do
  75. wait(0.3)
  76. local target = findNearestTorso(Dummy["Right Arm"].Position)
  77. if target ~= nil then
  78. Humanoid:MoveTo(target.Position, target)
  79. end
  80. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement