Advertisement
worm246411

Eagle/Hawk

Jan 12th, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.91 KB | None | 0 0
  1. if script.Parent.className ~= "HopperBin" then
  2. bin = Instance.new("HopperBin")
  3. bin.Name = "Eagle"
  4. bin.Parent = game.Players.LocalPlayer.Backpack
  5. script.Parent = bin
  6. end
  7. eaglesize = 1.0
  8. speed = 50
  9. bin = script.Parent
  10. bv = Instance.new("BodyVelocity")
  11. bv.Name = "BV"
  12. bv.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  13. bg = Instance.new("BodyGyro")
  14. bg.Name = "BG"
  15. bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  16. morphed = false
  17. morphing = false
  18. EagleStreamer = true
  19. face = nil
  20. mesh = nil
  21. -- Eagle MeshID http://www.roblox.com/asset/?id=51226819
  22. --Eagle TextureID http://www.roblox.com/asset/?id=51226825
  23. -- Eagle Screach http://www.roblox.com/asset/?id=51322486
  24. function EagleMorph()
  25. morphing = true
  26. player = bin.Parent.Parent.Character
  27. s = Instance.new("Smoke")
  28. s.Name = "Smokez"
  29. s.Color = Color3.new(0.65,0,0.8)
  30. s.RiseVelocity = 0.5
  31. s.Size = 12
  32. s.Opacity = 1
  33. s.Parent = player.Torso
  34. wait(1.8)
  35. s:remove()
  36. p = Instance.new("Part")
  37. p.Name = "Eagle"
  38. p.formFactor = "Custom"
  39. p.Size = Vector3.new(0.5,0.5,0.5)
  40. p.Position = player.Torso.Position
  41. p.TopSurface = 0
  42. p.BottomSurface = 0
  43. p.Locked = true
  44. p.CanCollide = true
  45. p.Anchored = false
  46. pm = Instance.new("SpecialMesh")
  47. pm.Name = "EagleMesh"
  48. pm.MeshId = "http://www.roblox.com/asset/?id=51226819"
  49. pm.TextureId = "http://www.roblox.com/asset/?id=51226825"
  50. pm.Scale = Vector3.new(eaglesize,eaglesize,eaglesize)
  51. pm.Parent = p
  52. mesh = pm
  53. p.Parent = player
  54. pw = Instance.new("Weld")
  55. pw.Parent = p
  56. pw.Part0 = player.Torso
  57. pw.Part1 = p
  58. pw.C0 = CFrame.new(0,0,0) * CFrame.Angles(-math.pi/1.65,0,0)
  59. b = Instance.new("Part")
  60. b.Name = "EagleHoldUp"
  61. b.formFactor = "Custom"
  62. b.Size = Vector3.new(0.5,0.5,0.5)
  63. b.Position = player.Torso.Position
  64. b.TopSurface = 0
  65. b.BottomSurface = 0
  66. b.Locked = true
  67. b.CanCollide = false
  68. b.Anchored = false
  69. bw = Instance.new("Weld")
  70. bw.Parent = b
  71. bw.Part0 = player.Torso
  72. bw.Part1 = b
  73. b.Parent = player
  74. bv.velocity = Vector3.new(0,0,0)
  75. bv.Parent = b
  76. bg.cframe = player.Torso.CFrame * CFrame.Angles(0,0,0)
  77. bg.Parent = b
  78. for i, v in pairs(player:children()) do
  79. if v.className == "Part" and v.Name ~= "Eagle" then
  80. v.Transparency = 1
  81. end
  82. if v.className == "Hat" then
  83. if v:findFirstChild("Handle") ~= nil then
  84. v.Handle.Transparency = 1
  85. end
  86. end
  87. if v.Name == "Head" then
  88. if v:findFirstChild("face") ~= nil then
  89. face = v.face
  90. face.Parent = nil
  91. end
  92. end
  93. end
  94. morphing = false
  95. morphed = true
  96. player.Humanoid.PlatformStand = true
  97. end
  98. function ShrinkMesh()
  99. for i = 1, eaglesize*10 do
  100. mesh.Scale = mesh.Scale + Vector3.new(-0.1,-0.1,-0.1)
  101. wait(0.065)
  102. end
  103. end
  104. function NormalMorph()
  105. morphing = true
  106. player = bin.Parent.Parent.Character
  107. s2 = Instance.new("Smoke")
  108. s2.Name = "Smokez"
  109. s2.Color = Color3.new(0,0.8,0.65)
  110. s2.RiseVelocity = 0.5
  111. s2.Size = 12
  112. s2.Opacity = 1
  113. s2.Parent = player.Torso
  114. coroutine.resume(coroutine.create(ShrinkMesh))
  115. wait(1.8)
  116. s2:remove()
  117. for i, v in pairs(player:children()) do
  118. if v.className == "Part" then
  119. v.Transparency = 0
  120. end
  121. if v.Name == "Eagle" or v.Name == "EagleHoldUp" and v.className == "Part" then
  122. v:remove()
  123. end
  124. if v.className == "Hat" then
  125. if v:findFirstChild("Handle") ~= nil then
  126. v.Handle.Transparency = 0
  127. end
  128. end
  129. if v.Name == "Head" then
  130. face.Parent = v
  131. end
  132. end
  133. morphing = false
  134. morphed = false
  135. player.Humanoid.PlatformStand = false
  136. end
  137. function Del(E, T)
  138. wait(T)
  139. E:remove()
  140. end
  141. function Streamer(ob)
  142. for i = 1, 12 do
  143. ob.Transparency = ob.Transparency + 0.05
  144. wait(0.01)
  145. end
  146. coroutine.resume(coroutine.create(Del), ob, 0)
  147. end
  148. down = false
  149. function onButton1Down(mouse)
  150. down = true
  151. player = bin.Parent.Parent.Character
  152. while down == true do
  153. if morphed == true then
  154. player.Humanoid.PlatformStand = true
  155. bv.velocity = CFrame.new(player.Torso.Position, mouse.Hit.p).lookVector * speed
  156. bg.cframe = CFrame.new(player.Torso.Position, mouse.Hit.p) * CFrame.Angles(0,0,0)
  157. if EagleStreamer == true then
  158. if player:findFirstChild("Eagle") ~= nil then
  159. ea = player.Eagle:Clone()
  160. ea.Anchored = true
  161. ea.Name = "EagleEcho"
  162. ea.CanCollide = false
  163. ea.Locked = true
  164. ea.Parent = player
  165. ea.CFrame = player.Eagle.CFrame
  166. ea.Transparency = 0.4
  167. coroutine.resume(coroutine.create(Streamer), ea)
  168. end
  169. end
  170. end
  171. wait()
  172. end
  173. end
  174. function onButton1Up(mouse)
  175. bv.velocity = CFrame.new(player.Torso.Position, mouse.Hit.p).lookVector * 4
  176. player = bin.Parent.Parent.Character
  177. down = false
  178. end
  179. function KillRadius(ob, mag, helth)
  180. for i, v in pairs(workspace:children()) do
  181. if v.className == "Model" and v:findFirstChild("Humanoid") ~= nil and v:findFirstChild("Torso") ~= nil then
  182. if v.Name ~= bin.Parent.Parent.Character.Name then
  183. if (ob.Position - v.Torso.Position).magnitude < mag then
  184. v.Humanoid.Health = v.Humanoid.Health - helth
  185. end
  186. end
  187. end
  188. end
  189. end
  190. function Splat(ob, rad, dmg)
  191. ob.Touched:connect(function(hit)
  192. if hit.Parent.Name ~= bin.Parent.Parent.Character.Name then
  193. ob.CFrame = CFrame.new(ob.Position.x,ob.Position.y+hit.Size.y/2,ob.Position.z)
  194. ob.Anchored = true
  195. ob.Meshz.Scale = Vector3.new(1,0.15,1)
  196. coroutine.resume(coroutine.create(KillRadius), ob, rad, dmg)
  197. for i = 1, 12 do
  198. ob.Meshz.Scale = ob.Meshz.Scale + Vector3.new(0.42,0,0.42)
  199. ob.Transparency = ob.Transparency + 0.05
  200. wait()
  201. end
  202. ob:remove()
  203. end
  204. end)
  205. end
  206. function Poop()
  207. player = bin.Parent.Parent.Character
  208. if morphed == true then
  209. poo = Instance.new("Part")
  210. poo.Name = "Eagle Poop"
  211. poo.formFactor = "Symmetric"
  212. poo.Size = Vector3.new(2,2,2)
  213. poo.BrickColor = BrickColor.new("White")
  214. poo.Locked = true
  215. poo.CanCollide = true
  216. poo.Anchored = false
  217. poo.TopSurface = 0
  218. poo.BottomSurface = 0
  219. poo.Position = player.Eagle.Position + Vector3.new(0,-3.4,0)
  220. poom = Instance.new("CylinderMesh")
  221. poom.Name = "Meshz"
  222. poom.Parent = poo
  223. poom.Scale = Vector3.new(0.25,0.65,0.25)
  224. poov = Instance.new("BodyVelocity")
  225. poov.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  226. poov.velocity = Vector3.new(0,-75,0)
  227. poov.Parent = poo
  228. poo.Parent = player
  229. coroutine.resume(coroutine.create(Splat), poo, 4.4, 40)
  230. end
  231. end
  232. function Tranz(ob)
  233. for i = 1, 10 do
  234. ob.Scale = ob.Scale - Vector3.new(0.1,0,0.1)
  235. ob.Parent.Transparency = ob.Parent.Transparency + 0.05
  236. wait(0.025)
  237. end
  238. ob.Parent:remove()
  239. end
  240. function Partz(col, sta, en)
  241. r = Instance.new("Part")
  242. r.Parent = bin.Parent.Parent.Character
  243. r.Name = "Ray Line"
  244. r.formFactor = "Custom"
  245. r.Size = Vector3.new(0.4,1,0.4)
  246. r.BrickColor = BrickColor.new(col)
  247. r.CanCollide = false
  248. r.Locked = false
  249. r.Anchored = true
  250. r.CFrame = CFrame.new((sta + en)/2, sta) * CFrame.Angles(math.pi/2,0,0)
  251. r.TopSurface = 0
  252. r.Reflectance = 0.1
  253. r.BottomSurface = 0
  254. rm = Instance.new("CylinderMesh")
  255. rm.Parent = r
  256. rm.Name = "LineMesh"
  257. rm.Scale = Vector3.new(1,((sta - en).magnitude)+0.2,1)
  258. coroutine.resume(coroutine.create(Tranz), rm)
  259. end
  260. function Grow(ob, ob2, ob3)
  261. coroutine.resume(coroutine.create(KillRadius), ob.Parent, 6, 20)
  262. for i = 1, 10 do
  263. ob.Scale = ob.Scale + Vector3.new(3.5,3.5,3.5)
  264. ob.Parent.Transparency = ob.Parent.Transparency + 0.1
  265. ob2.Scale = ob2.Scale + Vector3.new(2.25,2.25,2.25)
  266. ob2.Parent.Transparency = ob2.Parent.Transparency + 0.07
  267. ob3.Scale = ob3.Scale + Vector3.new(1.5,1.5,1.5)
  268. ob3.Parent.Transparency = ob3.Parent.Transparency + 0.04
  269. wait(0.028)
  270. end
  271. ob.Parent:remove()
  272. ob2.Parent:remove()
  273. ob3.Parent:remove()
  274. end
  275. function Grow2(ob, ob2, ob3)
  276. coroutine.resume(coroutine.create(KillRadius), ob.Parent, 6, 70)
  277. for i = 1, 10 do
  278. ob.Scale = ob.Scale + Vector3.new(3.5,0,3.5)
  279. ob.Parent.Transparency = ob.Parent.Transparency + 0.1
  280. ob2.Scale = ob2.Scale + Vector3.new(2.25,0,2.25)
  281. ob2.Parent.Transparency = ob2.Parent.Transparency + 0.07
  282. ob3.Scale = ob3.Scale + Vector3.new(1.5,0,1.5)
  283. ob3.Parent.Transparency = ob3.Parent.Transparency + 0.04
  284. wait(0.028)
  285. end
  286. ob.Parent:remove()
  287. ob2.Parent:remove()
  288. ob3.Parent:remove()
  289. end
  290. function EndShot(pos)
  291. se = Instance.new("Part")
  292. se.formFactor = "Symmetric"
  293. se.Size = Vector3.new(1,1,1)
  294. se.Locked = true
  295. se.Anchored = true
  296. se.CanCollide = false
  297. se.BrickColor = BrickColor.new("Really black")
  298. se.Reflectance = 0
  299. se.TopSurface = 0
  300. se.BottomSurface = 0
  301. se.CFrame = CFrame.new(pos)
  302. se.Parent = bin.Parent.Parent.Character
  303. se.Name = "Bewm1"
  304. sem = Instance.new("SpecialMesh")
  305. sem.Parent = se
  306. sem.MeshType = "Sphere"
  307. se2 = Instance.new("Part")
  308. se2.formFactor = "Symmetric"
  309. se2.Size = Vector3.new(1,1,1)
  310. se2.Locked = true
  311. se2.Anchored = true
  312. se2.CanCollide = false
  313. se2.BrickColor = BrickColor.new("Really black")
  314. se2.Reflectance = 0
  315. se2.TopSurface = 0
  316. se2.BottomSurface = 0
  317. se2.CFrame = CFrame.new(pos)
  318. se2.Parent = bin.Parent.Parent.Character
  319. se2.Name = "Bewm1"
  320. sem2 = Instance.new("SpecialMesh")
  321. sem2.Parent = se2
  322. sem2.MeshType = "Sphere"
  323. se3 = Instance.new("Part")
  324. se3.formFactor = "Symmetric"
  325. se3.Size = Vector3.new(1,1,1)
  326. se3.Locked = true
  327. se3.Anchored = true
  328. se3.CanCollide = false
  329. se3.BrickColor = BrickColor.new("Dark stone grey")
  330. se3.Reflectance = 0
  331. se3.TopSurface = 0
  332. se3.BottomSurface = 0
  333. se3.CFrame = CFrame.new(pos)
  334. se3.Parent = bin.Parent.Parent.Character
  335. se3.Name = "Bewm1"
  336. sem3 = Instance.new("SpecialMesh")
  337. sem3.Parent = se3
  338. sem3.MeshType = "Sphere"
  339. coroutine.resume(coroutine.create(Grow), sem, sem2, sem3)
  340. end
  341. function EndShot2(pos)
  342. se = Instance.new("Part")
  343. se.formFactor = "Symmetric"
  344. se.Size = Vector3.new(1,1,1)
  345. se.Locked = true
  346. se.Anchored = true
  347. se.CanCollide = false
  348. se.BrickColor = BrickColor.new("Really black")
  349. se.Reflectance = 0
  350. se.TopSurface = 0
  351. se.BottomSurface = 0
  352. se.CFrame = CFrame.new(pos)
  353. se.Parent = bin.Parent.Parent.Character
  354. se.Name = "Bewm1"
  355. sem = Instance.new("CylinderMesh")
  356. sem.Parent = se
  357. sem.Scale = Vector3.new(1,0.4,1)
  358. se2 = Instance.new("Part")
  359. se2.formFactor = "Symmetric"
  360. se2.Size = Vector3.new(1,1,1)
  361. se2.Locked = true
  362. se2.Anchored = true
  363. se2.CanCollide = false
  364. se2.BrickColor = BrickColor.new("Really black")
  365. se2.Reflectance = 0
  366. se2.TopSurface = 0
  367. se2.BottomSurface = 0
  368. se2.CFrame = CFrame.new(pos)
  369. se2.Parent = bin.Parent.Parent.Character
  370. se2.Name = "Bewm1"
  371. sem2 = Instance.new("CylinderMesh")
  372. sem2.Parent = se2
  373. sem2.Scale = Vector3.new(1,0.4,1)
  374. se3 = Instance.new("Part")
  375. se3.formFactor = "Symmetric"
  376. se3.Size = Vector3.new(1,1,1)
  377. se3.Locked = true
  378. se3.Anchored = true
  379. se3.CanCollide = false
  380. se3.BrickColor = BrickColor.new("Dark stone grey")
  381. se3.Reflectance = 0
  382. se3.TopSurface = 0
  383. se3.BottomSurface = 0
  384. se3.CFrame = CFrame.new(pos)
  385. se3.Parent = bin.Parent.Parent.Character
  386. se3.Name = "Bewm1"
  387. sem3 = Instance.new("CylinderMesh")
  388. sem3.Parent = se3
  389. sem3.Scale = Vector3.new(1,0.4,1)
  390. coroutine.resume(coroutine.create(Grow2), sem, sem2, sem3)
  391. end
  392. function onKeyDown(key, mouse)
  393. if key ~= nil then
  394. key:lower()
  395. if key == "r" then
  396. bin.Name = "Deselect = Remove"
  397. bin.Deselected:connect(function() wait() bin:remove() end)
  398. elseif key == "e" then
  399. if morphing == false then
  400. if morphed == false then
  401. coroutine.resume(coroutine.create(EagleMorph))
  402. elseif morphed == true then
  403. coroutine.resume(coroutine.create(NormalMorph))
  404. end
  405. end
  406. elseif key == "q" then
  407. coroutine.resume(coroutine.create(Poop))
  408. elseif key == "f" then
  409. dwn = true
  410. while dwn == true do
  411. if morphed == true then
  412. ray = Ray.new(bin.Parent.Parent.Character.Torso.Position, bin.Parent.Parent.Character.Torso.CFrame.lookVector*999)
  413. hit, enz = workspace:findPartOnRay(ray, bin.Parent.Parent.Character)
  414. Partz("Really red", bin.Parent.Parent.Character.Torso.Position, enz)
  415. coroutine.resume(coroutine.create(EndShot), enz)
  416. end
  417. wait(0.08)
  418. end
  419. end
  420. end
  421. end
  422. function DiveTuch(ob)
  423. enab = false
  424. ob.Touched:connect(function(hitz)
  425. if enab == false then
  426. enab = true
  427. coroutine.resume(coroutine.create(EndShot2), hitz.Position)
  428. ob:remove()
  429. end
  430. end)
  431. end
  432. function DiveBomb()
  433. bo = Instance.new("Part")
  434. bo.formFactor = "Custom"
  435. bo.Size = Vector3.new(3,1.6,1.6)
  436. bo.Name = "DiveBomb"
  437. bo.Transparency = 1
  438. bo.Locked = true
  439. bo.CanCollide = false
  440. bo.BrickColor = BrickColor.new("Black")
  441. bo.Parent = bin.Parent.Parent.Character
  442. bo.TopSurface = 0
  443. bo.BottomSurface = 0
  444. w = Instance.new("Weld")
  445. w.Parent = bo
  446. w.Name = "Weld"
  447. w.Part0 = bin.Parent.Parent.Character.Torso
  448. w.Part1 = bo
  449. w.C0 = CFrame.new(0,0,-2.5)
  450. coroutine.resume(coroutine.create(DiveTuch), bo)
  451. end
  452. dwnz = false
  453. function onKeyDownz(key)
  454. if key ~= nil then
  455. key:lower()
  456. if key == "v" then
  457. if morphed == true then
  458. dwnz = true
  459. speed = 120
  460. coroutine.resume(coroutine.create(DiveBomb))
  461. end
  462. elseif key == "c" then
  463. dwnz = true
  464. speed = 100
  465. end
  466. end
  467. end
  468. function onKeyUp(key)
  469. if key ~= nil then
  470. key:lower()
  471. if key == "f" then
  472. dwn = false
  473. elseif key == "v" or key == "c" then
  474. dwnz = false
  475. speed = 50
  476. for i, v in pairs(bin.Parent.Parent.Character:children()) do
  477. if v.Name == "DiveBomb" then
  478. v:remove()
  479. end
  480. end
  481. end
  482. end
  483. end
  484. bin.Selected:connect(function(mouse)
  485. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  486. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  487. mouse.Button1Up:connect(function() onButton1Up(mouse) end)
  488. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  489. mouse.KeyDown:connect(function(key) onKeyDownz(key, mouse) end)
  490. mouse.KeyUp:connect(function(key) onKeyUp(key) end)
  491. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement