Advertisement
ttyyuu12345

Evil duck

Jul 6th, 2017
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. -- I made this all by myself {:
  2. --[[
  3. Epic Duck!
  4. By: PenguinAnonymous
  5. Features: Being an evil duck
  6. Version: 1.0
  7. ]]--
  8. function getClass(obj,class)
  9. local ret = {}
  10. local c = obj:GetChildren()
  11. for i=1,#c do
  12. if c[i]:IsA(class) then
  13. table.insert(ret,c[i])
  14. end
  15. local e = getClass(c[i],class)
  16. for j=1,#e do
  17. table.insert(ret,e[j])
  18. end
  19. end
  20. return ret
  21. end
  22. local pl = game:GetService("Players").LocalPlayer
  23. local o1 = Instance.new("Part")
  24. local o2 = Instance.new("SpecialMesh")
  25. o1.Parent = pl.Character
  26. o1.Material = Enum.Material.Slate
  27. o1.BrickColor = BrickColor.new("Dark stone grey")
  28. o1.Position = Vector3.new(-6.5, 0.600004971, -11.5)
  29. o1.Size = Vector3.new(1, 1.20000005, 1)
  30. o1.Color = Color3.new(0.388235, 0.372549, 0.384314)
  31. o1.Position = Vector3.new(-6.5, 0.600004971, -11.5)
  32. o1.Color = Color3.new(0.388235, 0.372549, 0.384314)
  33. o2.Parent = o1
  34. o2.MeshId = "http://www.roblox.com/asset/?id=14810664"
  35. o2.TextureId = "http://www.roblox.com/asset/?id=14810649"
  36. o2.MeshType = Enum.MeshType.FileMesh
  37. o2.Scale = Vector3.new(7,7,7)
  38. local s = Instance.new("Sound",o1)
  39. s.EmitterSize = 100
  40. s.Volume = 10
  41. s.SoundId = "rbxassetid://464979976"
  42. local m = Instance.new("Sound",o1)
  43. m.EmitterSize = 10
  44. m.Volume = 10
  45. m.SoundId = "rbxassetid://130768080"
  46. m.Looped = true
  47. m:Play()
  48. local weld = Instance.new("Weld",o1)
  49. weld.Part0 = o1
  50. weld.Part1 = pl.Character.HumanoidRootPart
  51. local parts = getClass(pl.Character,"Part")
  52. for i=1,#parts do
  53. parts[i].Transparency = 1
  54. parts[i].Touched:connect(function(hit)
  55. local hum = hit.Parent:FindFirstChild("Humanoid")
  56. if hum~=nil and hum.Parent~=pl.Character and hum.Health>0 then
  57. hum.Health = 0
  58. pcall(function() s:Play() end)
  59. end
  60. end)
  61. end
  62. local hum = getClass(pl.Character,"Humanoid")[1]
  63. if hum~=nil then
  64. hum.MaxHealth = math.huge
  65. hum.Health = math.huge
  66. hum.WalkSpeed = 50
  67. end
  68. o1.Transparency = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement