-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathtweenClient.lua
More file actions
193 lines (139 loc) · 4.6 KB
/
tweenClient.lua
File metadata and controls
193 lines (139 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
Copyright (c) 2025 Vincent Situ
All rights reserved.
This work and its contents are the exclusive property of the copyright holder.
You may not copy, modify, distribute, or use this work, in whole or in part,
for any purpose, including commercial, educational, or personal use,
without explicit written permission from the copyright holder.
Unauthorized use of this work is strictly prohibited.
local TS = game:GetService("TweenService")
local event1 = game.ReplicatedStorage.tweenClient
local event2 = game.ReplicatedStorage.delete
local event3 = game.ReplicatedStorage.tweenObjectSequence
local tweenArray = game.ReplicatedStorage.tweenArray
local remote1 = game.ReplicatedStorage.magicEvents.soul.magicActive.demonicHarvest
local remote2 = game.ReplicatedStorage.magicEvents.soul.cooldown.demonicHarvest
local baseAnimationTween = game.ReplicatedStorage.regularTween
event1.OnClientEvent:Connect(function(all)
--part,info,goals
----7/11print(all)
for i = 2, #all do
local copy
if all[1][5] or #all[1] == 3 then
copy = all[i][1]
if all[1][5] and i ~= 3 then
copy.Parent = all[1][5]
end
------7/11print("FOUND")
else
copy = game.ReplicatedStorage.magicParts[all[1][1]]:Clone()
copy.CFrame = all[i][4]
copy.Parent = workspace.effectBlocks
end
if all[1][6] then
copy.Transparency = all[1][6]
end
------7/11print(all)
------7/11print(copy)
----7/11print(all)
------7/11print(all[i][1].Name,all[i][2])
TS:Create(copy,TweenInfo.new(table.unpack(all[i][2])),all[i][3]):Play()
delay(all[i][2][1] + all[i][2][6],function()
if all[1][4] then
wait(all[1][4] )
end
------7/11print("DESTROYED")
pcall(function()
if all[i][5] then
TS:Create(copy,TweenInfo.new(table.unpack(all[i][5])),all[i][6]):Play()
if copy:FindFirstChildOfClass("ParticleEmitter") then
for i,v in pairs(copy:GetChildren()) do
if v.ClassName == "ParticleEmitter" then
v.Enabled = false
end
end
end
delay(all[i][7],function()
end)
end
end)
copy:Destroy()
end)
end
end)
event3.OnClientEvent:Connect(function(object,info)
----7/11print("TWEENING")
----7/11print("TWEENING")
for i,v in info do
local tween = TS:Create(object,TweenInfo.new(table.unpack(v[1])),v[2])
tween:Play()
tween.Completed:Wait()
end
end)
remote1.OnClientEvent:Connect(function(player)
local character = player.Character
local clone = game.ReplicatedStorage.magicParts.demonicHarvest:Clone()
clone.Parent = game.Workspace.visualEffects
clone.Position = character.PrimaryPart.Position
local part = Instance.new("Part",game.Workspace.visualEffects)
part.Transparency = 1
part.Position = character.PrimaryPart.Position
part.Orientation = Vector3.new(0,0,0)
local attachment Instance.new("Attachment",part)
part.CanCollide = false
part.CanTouch = false
part.CanQuery = false
local attachment = Instance.new("Attachment",character.PrimaryPart)
attachment.Name = "demonicHarvestPart" .. player.Name
local alignPos = Instance.new("AlignPosition",part)
alignPos.MaxForce = math.huge
alignPos.Responsiveness = 200
alignPos.RigidityEnabled = true
alignPos.Attachment0 = part.Attachment
alignPos.Attachment1 = character.PrimaryPart["demonicHarvestPart" .. player.Name]
local motor6D = Instance.new("Motor6D",character.PrimaryPart)
motor6D.Part0 = clone
motor6D.Part1 = part
motor6D.C0 = CFrame.new(Vector3.new(-2,0,0))
local online = true
clone.AssemblyAngularVelocity = Vector3.new(0,4,0)
delay(0,function()
while online do
clone.AssemblyAngularVelocity = Vector3.new(0,4,0)
clone.AngularVelocity.AngularVelocity = clone.AngularVelocity.AngularVelocity * 0.9
wait(0.5)
end
end)
local connection1 = nil
connection1 = remote2.OnClientEvent:Connect(function(player2)
if player == player2 then
connection1:Disconnect()
online = false
clone.ParticleEmitter.Enabled = false
TS:Create(clone,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0),{Transparency = 1}):Play()
wait(7)
part:Destroy()
clone:Destroy()
end
end)
end)
event2.OnClientEvent:Connect(function(parts)
for i,v in pairs(parts) do
pcall(function()
v:Destroy()
----7/11print(v)
end)
if typeof(v) ~= "Instance" then
v = nil
end
end
end)
baseAnimationTween.OnClientEvent:Connect(function(object, infoArray, goals)
--** make option
wait(1)
TS:Create(object,TweenInfo.new(table.unpack(infoArray)),goals):Play()
end)
tweenArray.OnClientEvent:Connect(function(array)
for i,v in pairs(array) do
TS:Create(v[1],TweenInfo.new(table.unpack(v[2])),v[3]):Play()
end
end)