-
Notifications
You must be signed in to change notification settings - Fork 0
/
Emotes
416 lines (391 loc) · 12.2 KB
/
Emotes
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
for i,v in next, game:GetService("Players").LocalPlayer.Character:GetDescendants() do
if v:IsA("BasePart") and v.Name ~="HumanoidRootPart" then
game:GetService("RunService").Heartbeat:connect(function()
v.Velocity = Vector3.new(1, 25, 1)
end)
end
end
wait(3)
local Frame = (60)
local chr = game.Players.LocalPlayer.Character
Service =
setmetatable(
{
Get = function(Self, Serv)
if Service[Serv] then
return Service[Serv]
end
local S = game:GetService(Serv)
if S then
Service[Serv] = S
end
return S
end
},
{
__index = function(Self, Index)
local S = game:GetService(Index)
if S then
Service[Index] = S
end
return S
end
}
)
local LP = Service["Players"].LocalPlayer
local Char = LP["Character"]
local Torso, Root, Humanoid = Char["UpperTorso"], Char["HumanoidRootPart"], Char["Humanoid"]
local TService, UIS = Service["TweenService"], Service["UserInputService"]
coroutine.wrap(
function()
Root["Anchored"] = true
wait(.8)
Root["Anchored"] = false
end
)()
local Create = function(Obj, Parent)
local I = Instance.new(Obj)
I["Parent"] = Parent
return I
end
local Contains = function(Table, KV)
for K, V in next, Table do
if rawequal(KV, K) or rawequal(KV, V) then
return true
end
end
return false
end
local PoseToCF = function(Pose, Motor)
return (Motor["Part0"].CFrame * Motor["C0"] * Pose["CFrame"] * Motor["C1"]:Inverse()):ToObjectSpace(
Motor["Part0"].CFrame
)
end
local Joints = {
["LeftHand"] = game.Players.LocalPlayer.Character.LeftHand["LeftWrist"],
["LeftLowerArm"] = chr.LeftLowerArm["LeftElbow"],
["LeftUpperArm"] = chr.LeftUpperArm["LeftShoulder"],
["RightHand"] = chr.RightHand["RightWrist"],
["RightLowerArm"] = chr.RightLowerArm["RightElbow"],
["RightUpperArm"] = chr.RightUpperArm["RightShoulder"],
["UpperTorso"] = chr.UpperTorso["Waist"],
["LeftFoot"] = chr.LeftFoot["LeftAnkle"],
["LeftLowerLeg"] = chr.LeftLowerLeg["LeftKnee"],
["LeftUpperLeg"] = chr.LeftUpperLeg["LeftHip"],
["RightFoot"] = chr.RightFoot["RightAnkle"],
["RightLowerLeg"] = chr.RightLowerLeg["RightKnee"],
["RightUpperLeg"] = chr.RightUpperLeg["RightHip"],
["LowerTorso"] = chr.LowerTorso["Root"]
}
for K, V in next, Char:GetChildren() do
if V:IsA("BasePart") then
coroutine.wrap(
function()
repeat
V["CanCollide"] = false
Service["RunService"].Stepped:Wait()
until Humanoid["Health"] < 1
end
)()
end
end
for K, V in next, Joints do
local AP, AO, A0, A1 =
Create("AlignPosition", V["Part1"]),
Create("AlignOrientation", V["Part1"]),
Create("Attachment", V["Part1"]),
Create("Attachment", V["Part0"])
AP["RigidityEnabled"] = true
AO["RigidityEnabled"] = true
AP["Attachment0"] = A0
AP["Attachment1"] = A1
AO["Attachment0"] = A0
AO["Attachment1"] = A1
A0["Name"] = "CFAttachment0"
A1["Name"] = "CFAttachment1"
A0["CFrame"] = V["C1"] * V["C0"]:Inverse()
V:Remove()
end
local Edit = function(Part, Value, Duration, Style, Direction)
Style = Style or "Enum.EasingStyle.Linear"
Direction = Direction or "Enum.EasingDirection.In"
local Attachment = Part:FindFirstChild("CFAttachment0")
if Attachment ~= nil then
TService:Create(
Attachment,
TweenInfo.new(
Duration,
Enum["EasingStyle"][tostring(Style):split(".")[3]],
Enum["EasingDirection"][tostring(Direction):split(".")[3]],
0,
false,
0
),
{CFrame = Value}
):Play()
end
end
if not Service["RunService"]:FindFirstChild("Delta") then
local Delta = Create("BindableEvent", Service["RunService"])
Delta["Name"] = "Delta"
local A, B = 0, tick()
Service["RunService"].Delta:Fire()
Service["RunService"].Heartbeat:Connect(
function(C, D)
A = A + C
if A >= (1 / Frame) then
for I = 1, math.floor(A / (1 / Frame)) do
Service["RunService"].Delta:Fire()
end
B = tick()
A = A - (1 / Frame) * math.floor(A / (1 / Frame))
end
end
)
end
coroutine.wrap(
function()
Humanoid["Died"]:Wait()
for K, V in next, Char:GetDescendants() do
if V["Name"]:match("Align") then
V:Destroy()
end
end
end
)()
local PreloadAnimation = function(AssetId)
local Sequence = game:GetObjects("rbxassetid://" .. AssetId)[1]
assert(Sequence:IsA("KeyframeSequence"), "Instance is not a KeyframeSequence.")
wait(.06)
local Class = {}
Class["Speed"] = 1
local Yield = function(Seconds)
local Time = Seconds * (Frame + Sequence:GetKeyframes()[#Sequence:GetKeyframes()].Time)
for I = 1, Time, Class["Speed"] do
Service["RunService"].Delta["Event"]:Wait()
end
end
Class["Stopped"] = false
Class["Complete"] = Instance.new("BindableEvent")
Class["Play"] = function()
Class["Stopped"] = false
coroutine.wrap(
function()
repeat
for K = 1, #Sequence:GetKeyframes() do
local K0, K1, K2 =
Sequence:GetKeyframes()[K - 1],
Sequence:GetKeyframes()[K],
Sequence:GetKeyframes()[K + 1]
if Class["Stopped"] ~= true and Humanoid["Health"] > 0 then
if K0 ~= nil then
Yield(K1["Time"] - K0["Time"])
end
coroutine.wrap(
function()
for I = 1, #K1:GetDescendants() do
local Pose = K1:GetDescendants()[I]
if Contains(Joints, Pose["Name"]) then
local Duration =
K2 ~= nil and (K2["Time"] - K1["Time"]) / Class["Speed"] or .5
Edit(
Char[Pose["Name"]],
PoseToCF(Pose, Joints[Pose["Name"]]),
Duration,
Pose["EasingStyle"],
Pose["EasingDirection"]
)
end
end
end
)()
end
end
Class["Complete"]:Fire()
until Sequence["Loop"] ~= true or Class["Stopped"] ~= false or Humanoid["Health"] < 1
end
)()
end
Class["Stop"] = function()
Class["Stopped"] = true
end
Class["Reset"] = function()
coroutine.wrap(
function()
wait(.02)
assert(Class["Stopped"], "Track Must Be Stopped First!")
for K, V in next, Joints do
local Part = Char[K]
if Part ~= nil then
local Attachment = Part:FindFirstChild("CFAttachment0")
if Attachment ~= nil then
Attachment["CFrame"] = V["C1"] * V["C0"]:Inverse()
end
end
end
end
)()
end
return Class
end
Humanoid.WalkSpeed = 16
local Anims = {
["Idle"] = PreloadAnimation(4211217646),
["Walk"] = PreloadAnimation(913376220),
["Run"] = PreloadAnimation(913376220),
["Jump"] = PreloadAnimation(507765000),
["Fall"] = PreloadAnimation(507767968)
}
wait(1)
local Connections = {}
Mouse = LP:GetMouse()
local Dancing, Running = false, false
local StopAll = function()
for K, V in next, Anims do
if V["Stopped"] ~= true then
V:Stop()
end
end
end
Anims["Idle"]:Play()
Dancing = false
Anims["Walk"].Stopped = true
Anims["Run"].Stopped = true
Connections["Run"] =
Humanoid["Running"]:Connect(
function(Speed)
if Speed > 6 and Dancing ~= true and Anims["Walk"].Stopped ~= false and runnning ~= true then
Anims["Idle"]:Stop()
Anims["Jump"]:Stop()
Anims["Fall"]:Stop()
Anims["Run"]:Stop()
Anims["Walk"]:Play()
elseif Speed < 5 and Dancing ~= true and Anims["Walk"].Stopped ~= true and runnning ~= true then
Anims["Walk"]:Stop()
Anims["Jump"]:Stop()
Anims["Fall"]:Stop()
Anims["Run"]:Stop()
Anims["Idle"]:Play()
elseif Speed < 5 and Dancing ~= true and Anims["Jump"].Stopped ~= true or Anims["Fall"].Stopped ~= true then
Anims["Walk"]:Stop()
Anims["Jump"]:Stop()
Anims["Fall"]:Stop()
Anims["Run"]:Stop()
Anims["Idle"]:Play()
end
end
)
Connections["Jumping"] =
Humanoid["Jumping"]:Connect(
function(active)
if active and Dancing ~= true and Anims["Jump"].Stopped ~= false then
Anims["Idle"]:Stop()
Anims["Walk"]:Stop()
Anims["Fall"]:Stop()
Anims["Run"]:Stop()
Anims["Jump"]:Play()
end
end
)
Connections["FreeFalling"] =
Humanoid["FreeFalling"]:Connect(
function(active)
if active and Dancing ~= true and Anims["Jump"].Stopped ~= false then
Anims["Idle"]:Stop()
Anims["Walk"]:Stop()
Anims["Jump"]:Stop()
Anims["Run"]:Stop()
Anims["Fall"]:Play()
end
end
)
Mouse.KeyDown:connect(
function(key)
if key:lower() == string.char(48) then --string.char(48) is just shift
if Humanoid and Anims["Walk"].Stopped ~= true then
Anims["Walk"]:Stop()
Anims["Jump"]:Stop()
Anims["Fall"]:Stop()
Anims["Idle"]:Stop()
Anims["Run"]:Play()
runnning = true
Humanoid.WalkSpeed = 26
end
end
end
)
--When button is lifted
Mouse.KeyUp:connect(
function(key)
if key:lower() == string.char(48) then --string.char(48) is just shift
if Humanoid then
runnning = false
Humanoid.WalkSpeed = 16
end
end
end
)
wait(1)
local Bind = function(Id, Key, Speed)
Speed = Speed or 1
local Animation = PreloadAnimation(Id)
table.insert(Anims, Animation)
local V =
UIS.InputBegan:Connect(
function(Input, P)
if Input.KeyCode == Enum.KeyCode[Key] and P ~= true then
if Dancing ~= true then
Dancing = true
StopAll()
wait(.1)
Animation:Play()
Animation["Speed"] = Speed
else
Dancing = false
StopAll()
wait(.1)
Anims["Idle"]:Play()
end
end
end
)
end
Bind(10507080897, "Q", 1)
wait(0.1)
Bind(10731649737, "Y", 1)
wait(0.1)
Bind(10724052169 , "E", 1)
wait(0.1)
Bind(10722615238 , "R", 1)
wait(0.1)
Bind(5971749922, "T", 1)
wait(0.1)
Bind(5349599731, "U", 2)
wait(0.1)
Bind(5641878449, "F", 1)
wait(0.1)
Bind(5943669474, "O", 1)
wait(0.1)
Bind(6024896974, "G", 1)
wait(0.1)
Bind(10881761394, "H", 1)
wait(0.1)
Bind(1574383214, "J", 1)
wait(0.1)
Bind(10881753261, "K", 1)
wait(0.1)
Bind(5349600811, "L", 1)
wait(0.1)
Bind(10881645631, "Z", 1)
wait(0.1)
Bind(10881661040, "X", 1)
wait(0.1)
Bind(10881685708, "C", 1)
wait(0.1)
Bind(5943658900, "V", 1)
wait(0.1)
Bind(10881733560, "B", 1)
wait(0.1)
Bind(10881694331, "N", 1)
wait(0.1)
Bind(5927871610, "M", 1)