Advertisement
Navarone19_CH

Water Dragon

Dec 5th, 2019
8,490
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1.  
  2. ----------------------------- script ---------------------------------
  3.  
  4.  
  5. local Tool = script.Parent
  6. local Cooldown = false
  7. local CDTime = 8
  8. local Speed = 80
  9. local Damage = 35
  10.  
  11. Tool.RemoteEvent.OnServerEvent:Connect(function(Player, Mouse)
  12. if Cooldown then return end
  13.  
  14. spawn(function()
  15. Cooldown = true
  16. wait(CDTime)
  17. Cooldown = false
  18. end)
  19.  
  20. Tool.Roar:Play()
  21. local char = Player.Character
  22. local root = char.HumanoidRootPart
  23. local ball = game.ReplicatedStorage.WaterDragon:Clone()
  24. local siz = 3
  25. local colors = {"Medium blue", "Pastel Blue", "Bright blue","Fossil","Steel blue"}
  26.  
  27.  
  28. spawn(function()
  29.  
  30. for i=1,60 do
  31. wait()
  32. siz = siz + 0.35
  33. local p = game.ReplicatedStorage.DragonPart:Clone()
  34. ball.Mesh.Scale = ball.Mesh.Scale + Vector3.new(0.3,0.3,0.3)
  35. local offset = CFrame.new(math.sin(math.rad(i*20))*siz,math.cos(math.rad(i*20))*siz,0)
  36. p.Size = p.Size + Vector3.new(0.3*i,0.3*i,0.3*i)
  37. p.CFrame = ((CFrame.new(root.CFrame.p,Mouse.p) * offset) + CFrame.new(root.CFrame.p,Mouse.p).lookVector * (i*3.5)) * CFrame.Angles(math.rad(math.random(0,90)),math.rad(math.random(0,90)),math.rad(math.random(0,90)))
  38. ball.CFrame = CFrame.new(p.CFrame.p,p.CFrame.p+ball.CFrame.lookVector)
  39. p.Parent = game.Workspace
  40. p.BrickColor = BrickColor.new(colors[math.random(1,#colors)])
  41. game.Debris:AddItem(p,2)
  42. end
  43. for i=1,15 do
  44. wait()
  45. ball.Transparency = ball.Transparency + 0.07
  46. ball.Mesh.Scale = ball.Mesh.Scale * .5
  47. end
  48. ball.Anchored = true
  49. wait(4)
  50. ball:Destroy()
  51. end)
  52.  
  53. ball.BodyVelocity.Velocity = (ball.CFrame.lookVector * 60)
  54. ball.Parent = game.Workspace
  55. Tool.Hit:Play()
  56.  
  57.  
  58.  
  59. ball.Touched:Connect(function(hit)
  60. if ball.Anchored then return end
  61. if hit and hit.Parent == Player.Character then return end
  62. if hit and hit.Parent:FindFirstChild("Humanoid") then
  63. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(Damage)
  64. Tool.Hit:Play()
  65. ball:Destroy()
  66. end
  67. end)
  68.  
  69. end)
  70.  
  71. ----------------------------- local script ---------------------------------
  72.  
  73. local Tool = script.Parent
  74. local Player = game.Players.LocalPlayer
  75. local Mouse = Player:GetMouse()
  76.  
  77. Tool.Activated:Connect(function()
  78. Tool.RemoteEvent:FireServer(Mouse.Hit)
  79. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement