Advertisement
Coryh

Untitled

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