SHOW:
|
|
- or go back to the newest paste.
1 | local replicatedStorage = game:GetService("ReplicatedStorage") | |
2 | local tweenService = game:GetService("TweenService") | |
3 | ||
4 | script.Parent.OnServerEvent:Connect(function(player,Mouse) | |
5 | local char = player.Character | |
6 | local humanoid = char:WaitForChild("Humanoid") | |
7 | local rightarm = char:WaitForChild("Right Arm") | |
8 | local leftarm = char:WaitForChild("Left Arm") | |
9 | ||
10 | ||
11 | local Track2 = Instance.new("Animation") | |
12 | Track2.AnimationId = "rbxassetid://6167980352" --paste iceball animation here | |
13 | local anim2 = humanoid:LoadAnimation(Track2) | |
14 | anim2:Play() | |
15 | ||
16 | ||
17 | ||
18 | spawn(function() | |
19 | char.HumanoidRootPart.Anchored = true | |
20 | wait(3) | |
21 | char.HumanoidRootPart.Anchored = false | |
22 | end) | |
23 | ||
24 | local tornado = game.ReplicatedStorage.Effects.Tornado:Clone() | |
25 | tornado.Position = Mouse.p + Vector3.new(0,20,0) | |
26 | tornado.Parent = workspace | |
27 | game.Debris:AddItem(tornado,5) | |
28 | ||
29 | local whirl = game.ReplicatedStorage.Effects.Circle:Clone() | |
30 | whirl.Position = tornado.Position + Vector3.new(0,-5,0) | |
31 | whirl.Parent = workspace | |
32 | game.Debris:AddItem(whirl,5) | |
33 | ||
34 | ||
35 | local info = TweenInfo.new(3,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0) | |
36 | local goal = {} | |
37 | goal.Size = whirl.Size * 1 | |
38 | goal.Transparency = 1 | |
39 | local tween = tweenService:Create(whirl,info,goal) | |
40 | tween:Play() | |
41 | print("played") | |
42 | ||
43 | ||
44 | local info2 = TweenInfo.new(3,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0) | |
45 | local goal2 = {} | |
46 | goal2.Size = whirl.Size * 1 | |
47 | goal2.Transparency = 1 | |
48 | local tween2 = tweenService:Create(tornado,info2,goal2) | |
49 | tween2:Play() | |
50 | print("played") | |
51 | ||
52 | local ball = game.ReplicatedStorage.Effects.Iceball:Clone() | |
53 | ball.Position = tornado.Position + Vector3.new(0,-2,0) | |
54 | ball.Parent = workspace | |
55 | game.Debris:AddItem(ball,5) | |
56 | ||
57 | ||
58 | local info3 = TweenInfo.new(3,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0) | |
59 | local goal3 = {} | |
60 | goal3.Size = whirl.Size * 3 | |
61 | goal3.Anchored = false | |
62 | local tween3 = tweenService:Create(ball,info3,goal3) | |
63 | tween3:Play() | |
64 | print("played") | |
65 | ||
66 | local sound = Instance.new("Sound") | |
67 | sound.SoundId = "rbxassetid://130852656" | |
68 | sound.Parent = player.Character | |
69 | sound:Play() | |
70 | game.Debris:AddItem(sound,3) | |
71 | ||
72 | ||
73 | ball.Touched:Connect(function(Hit) | |
74 | ||
75 | if Hit.Parent:FindFirstChild("Humanoid") then | |
76 | local explosion1 = game.ReplicatedStorage.Effects:WaitForChild("Explosion5"):Clone() | |
77 | explosion1.CFrame = Hit.CFrame * CFrame.new(0,4,0) | |
78 | explosion1.Parent = workspace | |
79 | game.Debris:AddItem(explosion1,1) | |
80 | ||
81 | local explosion2 = game.ReplicatedStorage.Effects:WaitForChild("Explosion6"):Clone() | |
82 | explosion2.CFrame = Hit.CFrame * CFrame.new(0,4,0) | |
83 | explosion2.Parent = workspace | |
84 | game.Debris:AddItem(explosion2,1) | |
85 | ||
86 | local whirl = game.ReplicatedStorage.Effects["Whirl"]:Clone() | |
87 | whirl.CFrame = Hit.CFrame * CFrame.new(0,4,0) | |
88 | whirl.Parent = workspace | |
89 | game.Debris:AddItem(whirl,1) | |
90 | ||
91 | ||
92 | local info = TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0) | |
93 | local goal = {} | |
94 | goal.Size = explosion1.Size * 4 | |
95 | goal.Transparency = 1 | |
96 | local tween = tweenService:Create(explosion1,info,goal) | |
97 | tween:Play() | |
98 | print("played") | |
99 | ||
100 | local info2 = TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0) | |
101 | local goal2 = {} | |
102 | goal2.Size = explosion2.Size * 4 | |
103 | goal2.Transparency = 1 | |
104 | local tween2 = tweenService:Create(explosion2,info2,goal2) | |
105 | tween2:Play() | |
106 | print("played") | |
107 | ||
108 | local info3 = TweenInfo.new(0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0) | |
109 | local goal3 = {} | |
110 | goal3.Size = whirl.Size * 6 | |
111 | goal3.Transparency = 1 | |
112 | local tween3 = tweenService:Create(whirl,info3,goal3) | |
113 | tween3:Play() | |
114 | print("played") | |
115 | ||
116 | for i,m in pairs(workspace:GetChildren()) do | |
117 | if m:FindFirstChild("HumanoidRootPart") and m:FindFirstChild("Humanoid") and m~= player.Character then | |
118 | if (m.HumanoidRootPart.Position - ball.Position).Magnitude < 15 then | |
119 | ||
120 | local sound2 = Instance.new("Sound") | |
121 | sound2.SoundId = "rbxassetid://3154829820" | |
122 | sound2.Parent = m.HumanoidRootPart | |
123 | sound2:Play() | |
124 | game.Debris:AddItem(sound,3) | |
125 | ||
126 | m.Humanoid:TakeDamage(20) | |
127 | ball:Destroy() | |
128 | ||
129 | end | |
130 | end | |
131 | end | |
132 | ||
133 | end | |
134 | end) | |
135 | ||
136 | ||
137 | ||
138 | ||
139 | ||
140 | ||
141 | end) |