D_rawest16

Untitled

Feb 22nd, 2020
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.74 KB | None | 0 0
  1. TweenS = game:GetService("TweenService")
  2. anim = script:WaitForChild("Animation")
  3. rad = math.rad(90)
  4. multiplier = 1.5
  5. Tween_Time = 0.3
  6. Destroy_Time = 2.4
  7. Info2_Time = 0.12
  8. StunTime = 1.5
  9. max = 17000
  10. function Disconnect(con)
  11. if con ~= nil then
  12. con:Disconnect()
  13. con = nil
  14. end
  15. end
  16. function CameraShake(root)
  17. for i,v in pairs(game.Workspace:GetChildren()) do
  18. if v:FindFirstChild("HumanoidRootPart") then
  19. if (v.PrimaryPart.Position - root.Position).Magnitude < 200 then
  20. if v:FindFirstChild("Humanoid") then
  21. if game.Players:FindFirstChild(v.Name) then
  22. game.ReplicatedStorage.Event.PassEvent:FireClient(
  23. game.Players:FindFirstChild(v.Name),
  24. 'Shake',
  25. {
  26. ['Hum'] = v.Humanoid,
  27. ['Times'] = 10,
  28. ['Speed'] = 0.1,
  29. ['Multiple'] = 6,
  30. }
  31. )
  32.  
  33. end
  34. end
  35. end
  36. end
  37. end
  38. end
  39.  
  40. info = TweenInfo.new(Tween_Time/1.3,Enum.EasingStyle.Quint,Enum.EasingDirection.In,0,true,0)
  41. Color_Mod = require(game.ServerScriptService.ModuleScripts.ColorScripts.Coloring)
  42. Stun_Mod = require(game.ServerScriptService.ModuleScripts.Stuns.ChangingValues)
  43. Damage_Mod = require(game.ServerScriptService.ModuleScripts.Moves.Damage)
  44.  
  45. local module = {}
  46. function module:Attack(char)
  47. -- // GETTING THE RING PART
  48. local ring = game.ReplicatedStorage.MoveParts.CartoonyMoveParts.BigRing:Clone()
  49. ring.CFrame = char.PrimaryPart.CFrame
  50. ring.Anchored = true
  51. -- // VARIABLES
  52. local Prev_Ring_CFrame = ring.CFrame
  53. local root = char.PrimaryPart
  54. local pos = root.CFrame
  55. local size = Vector3.new(ring.Size.X * multiplier,ring.Size.Y * multiplier*1.5,ring.Size.Z * multiplier)
  56. -- // SETTING CONNECTIONS VARIABLES THAT IM GOING TO DISCONNECT
  57. local connection = nil
  58. local connection2 = nil
  59. local connection3 = nil
  60. -- // TWEENING
  61. TweenS:Create(ring,TweenInfo.new(Tween_Time,0,0),{Size = size}):Play()
  62. local rotate = TweenS:Create(ring,info,{CFrame = ring.CFrame * CFrame.Angles(rad,rad,rad)})
  63. rotate:Play()
  64. -- // PLAYING THE ANIMATION
  65. local track = nil
  66. if char:FindFirstChild(char.Name) then
  67. local hum = nil
  68. for i,v in pairs(char:FindFirstChild(char.Name):GetChildren()) do
  69. if v:IsA("Humanoid") then
  70. hum = v
  71. end
  72. end
  73. if hum then
  74. local track = hum:LoadAnimation(anim)
  75. track:Play()
  76. delay(1.3,function()
  77. track:Stop()
  78. end)
  79. end
  80. end
  81. -- // DOING ALL THE TWEENING
  82. local function TweenComplete()
  83. local move = TweenS:Create(ring,TweenInfo.new(Tween_Time/2,0,0),{CFrame = root.CFrame * CFrame.new(0,0,-5) * CFrame.Angles(math.rad(90),0,0)})
  84. move:Play()
  85. local function Tween2Complete()
  86. -- // GETTING PARTS FOR BLAST EFFECT
  87. local blast = game.ReplicatedStorage.MoveParts.Blast:Clone()
  88. local outside = blast.OutSide
  89. local inside = outside.Inside
  90. local Org_Outside_Size = outside.Size
  91. local Org_Inside_Size = inside.Size
  92. -- // WELDING THE 2 MAIN PARTS TOGETHER
  93. local weld = Instance.new("Weld")
  94. weld.Part0 = outside
  95. weld.Part1 = inside
  96. -- // PROPERTIES FOR THE PARTS
  97. if game.Players:FindFirstChild(char.Name) then
  98. Color_Mod:color(game.Players:FindFirstChild(char.Name),outside)
  99. end
  100. local charge_colors = {
  101. ColorSequenceKeypoint.new(0,outside.Color);
  102. ColorSequenceKeypoint.new(1,outside.Color)
  103. }
  104. outside.Transparency = 0.2
  105. outside.Anchored = true
  106. outside.CFrame = ring.CFrame
  107. outside.Charge.Enabled = true
  108. outside.Charge.Color = ColorSequence.new(charge_colors)
  109. -- // MAKING THE MOVE EFFECTS
  110. local function SizeTween1(which,New_Size,times,rev)
  111. local info2 = TweenInfo.new(Info2_Time,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut,times,rev,0)
  112. TweenS:Create(which,info2,{Size = which.Size * New_Size}):Play()
  113. end
  114. -- // SMALL TWEENING TO SMALL AND A BIT BIGGER
  115. SizeTween1(outside,outside.Size * 1.2,3,true)
  116. SizeTween1(inside,inside.Size * 1.2,3,true)
  117. delay(Info2_Time * 3,function()
  118. -- // TWEENING TO SIZE OF CIRCLE
  119. -- SizeTween1(outside,outside.Size * 1.7,0,false)
  120. -- SizeTween1(inside,inside.Size * 1.7,0,false)
  121. delay(Info2_Time,function()
  122. -- // TWEENING FUNCTIONS
  123. local function SizeTween2(which,Which_Size,Which_Size_2)
  124. local Tween_Time = 0.05
  125. -- // TWEENING TO SKINNY
  126. TweenS:Create(which,TweenInfo.new(Tween_Time,0,0),{Size = Which_Size}):Play()
  127. TweenS:Create(which,TweenInfo.new(Tween_Time,0,0),{Position = ring.CFrame * Vector3.new(0,-150,0) }):Play()
  128. delay(Tween_Time,function()
  129. -- // MAKING IT THICKER
  130. delay(0.05,function()
  131. -- // TWEENING IT EVEN THICKER
  132. SizeTween1(outside,Org_Outside_Size,0,false)
  133. SizeTween1(inside,Org_Inside_Size,0,false)
  134.  
  135. delay(Info2_Time,function()
  136. TweenS:Create(which,TweenInfo.new(0.03,0,0),{Position = ring.CFrame * Vector3.new(0,-150,0) }):Play()
  137. TweenS:Create(which,TweenInfo.new(0.03,0,0),{Size = Vector3.new(Which_Size_2.X*2,Which_Size_2.Y*1.5,Which_Size_2.Z*2)}):Play()
  138. delay(0.01,function()
  139. local info3 = TweenInfo.new(0.05,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut,0,true,0)
  140. TweenS:Create(which,info,{Size = which.Size / 1.1 }):Play()
  141. end)
  142. end)
  143. end)
  144. end)
  145. end
  146. local small = 12
  147. local bigger = 6.6
  148. -- // TWEENING THE CAMERA
  149. CameraShake(root)
  150. -- // CALLING THE FUNCTIONS FOR TWEENING
  151.  
  152. SizeTween2(
  153. outside,
  154. Vector3.new(outside.Size.X / small,outside.Size.Y * 70,outside.Size.Z / small),
  155. Vector3.new(outside.Size.X * bigger,outside.Size.Y * 100,outside.Size.Z * bigger)
  156. )
  157.  
  158. SizeTween2(
  159. inside,
  160. Vector3.new(inside.Size.X / small,inside.Size.Y * 80,inside.Size.Z / small),
  161. Vector3.new(inside.Size.X * bigger,inside.Size.Y * 120,inside.Size.Z * bigger)
  162. )
  163. local Already_Touched = {}
  164. local function OnTouched(hit)
  165. if hit:IsDescendantOf(char) then return end
  166. if Already_Touched[hit.Parent] then return end
  167. if not hit.Parent:FindFirstChild("Humanoid") then return end
  168.  
  169. Already_Touched[hit.Parent] = true
  170.  
  171. local bv = Instance.new("BodyVelocity")
  172. bv.MaxForce = Vector3.new(max,max,max)
  173. bv.Parent = hit.Parent.PrimaryPart
  174.  
  175. game.Debris:AddItem(bv,0.3)
  176.  
  177. Stun_Mod:stun({['Char'] = hit.Parent,['StunTime'] = StunTime})
  178. for i = 1,5 do
  179. if hit.Parent:FindFirstChild("Humanoid") then
  180. Damage_Mod:Damage(
  181. {
  182. ['Char'] = hit.Parent;
  183. ['Effect'] = true;
  184. ['Damage'] = 10;
  185. ['WhoSent'] = char;
  186. ['StunAnim'] = true;
  187. }
  188. )
  189. wait(0.5)
  190. end
  191. end
  192. end
  193. connection3 = outside.Touched:Connect(OnTouched)
  194. delay(4,function()
  195. local function Transparency(which)
  196. TweenS:Create(which,TweenInfo.new(0.3,0,0),{Transparency = 1}):Play()
  197. end
  198. Transparency(outside)
  199. Transparency(inside)
  200. Disconnect(connection3)
  201. end)
  202. end)
  203. end)
  204. -- // PARENTING
  205. weld.Parent = inside
  206. blast.Parent = ring
  207. -- // DELETING THE PART
  208. game.Debris:AddItem(blast,5)
  209. -- // DISCONNECTING THE TWEENING FUNCTIONS
  210. spawn(function()
  211. wait()
  212. Disconnect(connection)
  213. end)
  214. spawn(function()
  215. wait()
  216. Disconnect(connection2)
  217. end)
  218. end
  219. connection2 = move.Completed:Connect(Tween2Complete)
  220. end
  221. connection = rotate.Completed:Connect(TweenComplete)
  222.  
  223.  
  224. ring.Parent = workspace
  225. delay(Destroy_Time,function()
  226. local NewTween = TweenS:Create(ring,TweenInfo.new(0.3,0,0),{Transparency = 1})
  227. NewTween:Play()
  228. local con ; con = NewTween.Completed:Connect(function()
  229. game.Debris:AddItem(ring,0.1)
  230. Disconnect(con)
  231. end)
  232. end)
  233. end
  234. return module
Advertisement
Add Comment
Please, Sign In to add comment