WarOfEmpilittles

Bird

May 29th, 2015
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. --MADE BY OneLegend (NOT THE SCRIPT) REGULAR SCRIPT: JUST RUN!
  2.  
  3. function prop(part, parent, collide, tran, ref, x, y, z, color, anchor, form)
  4.  
  5. part.Parent = parent
  6.  
  7. part.formFactor = form
  8.  
  9. part.CanCollide = collide
  10.  
  11. part.Transparency = tran
  12.  
  13. part.Reflectance = ref
  14.  
  15. part.Size = Vector3.new(x,y,z)
  16.  
  17. part.BrickColor = BrickColor.new(color)
  18.  
  19. part.TopSurface = 0
  20.  
  21. part.BottomSurface = 0
  22.  
  23. part.Anchored = anchor
  24.  
  25. part.Locked = true
  26.  
  27. part:BreakJoints()
  28.  
  29. end
  30.  
  31.  
  32.  
  33. function weld(w, p, p1, a, b, c, x, y, z)
  34.  
  35. w.Parent = p
  36.  
  37. w.Part0 = p
  38.  
  39. w.Part1 = p1
  40.  
  41. w.C1 = CFrame.fromEulerAnglesXYZ(a,b,c) * CFrame.new(x,y,z)
  42.  
  43. end
  44.  
  45.  
  46.  
  47. function bird(pos)
  48.  
  49. local mod = Instance.new("Model")
  50.  
  51. mod.Name = "Bird"
  52.  
  53. local main = Instance.new("Part")
  54.  
  55. prop(main,mod,true,0,0,1.5,1.4,2.5,"Black",false,"Custom")
  56.  
  57. main.CFrame = CFrame.new(pos) * CFrame.Angles(0,math.random(-32,32)/10,0)
  58.  
  59. main.Name = "Torso"
  60.  
  61. Instance.new("SpecialMesh",main).MeshType = "Sphere"
  62.  
  63.  
  64.  
  65. local pa1 = Instance.new("Part")
  66.  
  67. prop(pa1,mod,false,0,0,0.9,1,0.9,"Black",false,"Custom")
  68.  
  69. pa1.CFrame = main.CFrame
  70.  
  71. pa1.Name = "Head"
  72.  
  73. Instance.new("SpecialMesh",pa1).MeshType = "Sphere"
  74.  
  75.  
  76.  
  77. local pa2 = Instance.new("Part")
  78.  
  79. prop(pa2,mod,false,0,0,0.2,0.4,0.7,"Neon orange",false,"Custom")
  80.  
  81. pa2.CFrame = main.CFrame
  82.  
  83. Instance.new("SpecialMesh",pa2).MeshType = "Wedge"
  84.  
  85.  
  86.  
  87. local wing1 = Instance.new("Part")
  88.  
  89. prop(wing1,mod,false,0,0,0.2,1.8,1.1,"Black",false,"Custom")
  90.  
  91. wing1.CFrame = main.CFrame
  92.  
  93.  
  94.  
  95. local wing2 = Instance.new("Part")
  96.  
  97. prop(wing2,mod,false,0,0,0.2,1.8,1.1,"Black",false,"Custom")
  98.  
  99. wing2.CFrame = main.CFrame
  100.  
  101.  
  102.  
  103.  
  104.  
  105. local w1 = Instance.new("Weld")
  106.  
  107. weld(w1,main,pa1,0.5,0,0,0,-0.6,1.2)
  108.  
  109. w1.Name = "Neck"
  110.  
  111.  
  112.  
  113. local w2 = Instance.new("Weld")
  114.  
  115. weld(w2,main,pa2,-0.2,0,0,0,-0.6,1.7)
  116.  
  117.  
  118.  
  119. local wi1 = Instance.new("Weld")
  120.  
  121. weld(wi1,main,wing1,0,0,math.pi/2,-1,-0.1,0.1)
  122.  
  123. local worig1 = CFrame.new(0.4,0,0) * CFrame.fromEulerAnglesXYZ(0,0,-0.4)
  124.  
  125. wi1.C0 = worig1
  126.  
  127.  
  128.  
  129. local wi2 = Instance.new("Weld")
  130.  
  131. weld(wi2,main,wing2,0,0,-math.pi/2,1,-0.1,0.1)
  132.  
  133. local worig2 = CFrame.new(-0.4,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0.4)
  134.  
  135. wi2.C0 = worig2
  136.  
  137.  
  138.  
  139. local hum = Instance.new("Humanoid",mod)
  140.  
  141. hum.Name = "Humanoid"
  142.  
  143. hum.MaxHealth = 30
  144.  
  145. hum.Health = 30
  146.  
  147.  
  148.  
  149. local bv = Instance.new("BodyVelocity",main)
  150.  
  151. bv.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  152.  
  153. bv.P = 5000
  154.  
  155. bv.velocity = main.CFrame.lookVector * 6
  156.  
  157.  
  158.  
  159. local bav = Instance.new("BodyAngularVelocity",main)
  160.  
  161. bav.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  162.  
  163. bav.P = 5000
  164.  
  165. bav.angularvelocity = Vector3.new(0,0,0)
  166.  
  167.  
  168.  
  169. hum.Died:connect(function()
  170.  
  171. bv:remove()
  172.  
  173. bav:remove()
  174.  
  175. wait(4)
  176.  
  177. mod:remove()
  178.  
  179. end)
  180.  
  181. mod.Parent = workspace
  182.  
  183. mod:MakeJoints()
  184.  
  185. coroutine.resume(coroutine.create(function()
  186.  
  187. while true do
  188.  
  189. for i=0.4,-0.4,-0.15 do
  190.  
  191. wait()
  192.  
  193. wi1.C0 = worig1 * CFrame.fromEulerAnglesXYZ(0,0,i)
  194.  
  195. wi2.C0 = worig2 * CFrame.fromEulerAnglesXYZ(0,0,-i)
  196.  
  197. end
  198.  
  199. for i=0.4,-0.4,-0.15 do
  200.  
  201. wait()
  202.  
  203. wi1.C0 = worig1 * CFrame.fromEulerAnglesXYZ(0,0,-i)
  204.  
  205. wi2.C0 = worig2 * CFrame.fromEulerAnglesXYZ(0,0,i)
  206.  
  207. end
  208.  
  209. end
  210.  
  211. end))
  212.  
  213. coroutine.resume(coroutine.create(function()
  214.  
  215. while true do
  216.  
  217. wait(0.1)
  218.  
  219. local turn = math.random(1,6)
  220.  
  221. coroutine.resume(coroutine.create(function()
  222.  
  223. if turn == 1 then
  224.  
  225. bav.angularvelocity = Vector3.new(0,6,0)
  226.  
  227. wait(1)
  228.  
  229. bav.angularvelocity = Vector3.new(0,0,0)
  230.  
  231. bv.velocity = main.CFrame.lookVector * 6
  232.  
  233. elseif turn == 2 then
  234.  
  235. bav.angularvelocity = Vector3.new(0,-6,0)
  236.  
  237. wait(1)
  238.  
  239. bav.angularvelocity = Vector3.new(0,0,0)
  240.  
  241. bv.velocity = main.CFrame.lookVector * 6
  242.  
  243. end
  244.  
  245. end))
  246.  
  247. end
  248.  
  249. end))
  250.  
  251. end
  252.  
  253.  
  254.  
  255. for i=1, math.random(4,11) do
  256.  
  257. local poz = Vector3.new(math.random(-100,100),math.random(60,80),math.random(-100,100))
  258.  
  259. bird(poz)
  260.  
  261. end
Add Comment
Please, Sign In to add comment