R

[notif] pendelum anim

public
rrixh Apr 17, 2024 Never 108
Clone
Plaintext pendelumAnimator-kredsToOwner_lulaslollipop.jar 537 lines (453 loc) | 18.37 KB
1
local Flinging = false
2
local Highlight = Instance.new("Highlight")
3
local Root = game.Players.LocalPlayer.Character.HumanoidRootPart
4
local Version = "v1.0.3"
5
print(Version)
6
7
Highlight.FillColor = Color3.fromRGB(34, 77, 153)
8
Highlight.OutlineColor = Color3.fromRGB(55, 127, 244)
9
10
getgenv().AntiVoid = true
11
getgenv().ShowReal = true
12
getgenv().Fling = true
13
getgenv().AutoReclaim = true
14
getgenv().AntiSleep = true
15
getgenv().EnableSpin = true
16
loadstring(game:HttpGetAsync("https://raw.githubusercontent.com/CenteredSniper/Kenzen/master/ZendeyReanimate.lua", true))()
17
Root.Transparency = 0
18
19
Highlight.Parent = Root
20
Highlight.Adornee = Root
21
22
23
24
local PASettings = {
25
WalkSpeed = 16,
26
JumpPower = 125,
27
ScriptCreator = "Anonymous Creator",
28
HatsBeingAnimated = {
29
30
},
31
Teleportation = {
32
Enabled = false,
33
Key = "t"
34
},
35
Animations = {
36
IdleAnimation = {
37
AnimationID = nil,
38
FrameSpeed = math.huge,
39
TweenSpeed = nil
40
},
41
WalkAnimation = {
42
AnimationID = nil,
43
FrameSpeed = math.huge,
44
TweenSpeed = nil
45
},
46
SprintAnimation = {
47
SprintingEnabled = false,
48
Key = "52",
49
SprintSpeed = nil,
50
AnimationID = nil,
51
FrameSpeed = math.huge,
52
TweenSpeed = nil
53
},
54
55
Attacks = {
56
OneKeyAttack = {
57
--[[ Attack1 = {
58
Key = "q",
59
AnimationID = 7142973417,
60
FrameSpeed = math.huge,
61
TweenSpeed = .1,
62
AttackWalkSpeed = 2
63
},
64
]]
65
}
66
}
67
}
68
}
69
70
71
getgenv().Methods = {}
72
73
local Methods = getgenv().Methods
74
local CurrentType = "Idle"
75
local Mouse = game:GetService("Players").LocalPlayer:GetMouse()
76
local Sprinting = false
77
78
local Attacking = false
79
80
local Player = game:GetService("Players").LocalPlayer
81
local Character = Player.Character
82
83
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
84
Humanoid.WalkSpeed = PASettings.WalkSpeed
85
86
task.spawn(function()
87
while task.wait() do
88
if not Flinging then
89
Root.Position = Character.Torso.Position - Vector3.new(0, 5, 0)
90
end
91
end
92
end)
93
94
function Methods:SetWalkSpeed(Value)
95
PASettings.WalkSpeed = Value
96
Humanoid.WalkSpeed = Value
97
end
98
99
function Methods:PlaySound(SoundID, Looped)
100
local Sound = Instance.new("Sound", Character.Torso)
101
Sound.SoundId = "rbxassetid://"..SoundID
102
Sound.Volume = 5
103
if Looped then Sound.Looped = true else Sound.Looped = false end
104
Sound:Play()
105
end
106
107
function Methods:Chat(Message)
108
local args = {
109
[1] = Message,
110
[2] = "All"
111
}
112
113
game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(unpack(args))
114
end
115
116
local FakeRoot = getgenv().CloneRig.HumanoidRootPart
117
118
function Methods:FreezeChar()
119
FakeRoot.Anchored = true
120
end
121
122
function Methods:ThawChar()
123
FakeRoot.Anchored = false
124
end
125
126
function Methods:NoYield(fn)
127
task.spawn(fn)
128
end
129
130
function Methods:ApplyVelocityFoward(Distance)
131
FakeRoot.Velocity = FakeRoot.CFrame.LookVector.Unit * Distance * 25
132
end
133
134
function Methods:ApplyVelocityUpward(Distance)
135
FakeRoot.Velocity = Vector3.new(FakeRoot.Velocity.X,Distance,FakeRoot.Velocity.Z)
136
end
137
138
function Methods:LookAtMouse()
139
Character.HumanoidRootPart.CFrame = CFrame.lookAt(Character.HumanoidRootPart.Position, Vector3.new(Mouse.Hit.p.X, Character.HumanoidRootPart.Position.Y, Mouse.Hit.p.Z))
140
end
141
142
function Methods:SetWalkAnimation(AnimationID, FrameSpeed)
143
PASettings.Animations.WalkAnimation.AnimationID = AnimationID
144
PASettings.Animations.WalkAnimation.TweenSpeed = FrameSpeed
145
end
146
147
function Methods:SetIdleAnimation(AnimationID, FrameSpeed)
148
PASettings.Animations.IdleAnimation.AnimationID = AnimationID
149
PASettings.Animations.IdleAnimation.TweenSpeed = FrameSpeed
150
end
151
152
function Methods:SetJumpPower(Value)
153
PASettings.JumpPower = Value
154
end
155
156
function Methods:NewAttack(AttackName, Key, AnimationID, TweenSpeed, Speed)
157
PASettings.Animations.Attacks.OneKeyAttack[AttackName] = {}
158
local Attack = PASettings.Animations.Attacks.OneKeyAttack[AttackName]
159
Attack.Key = Key
160
Attack.AnimationID = AnimationID
161
Attack.FrameSpeed = math.huge
162
Attack.TweenSpeed = TweenSpeed
163
Attack.AttackWalkSpeed = Speed
164
end
165
166
function Methods:EnableSprinting(AnimationID, TweenSpeed, Speed)
167
local Sprint = PASettings.Animations.SprintAnimation
168
Sprint.SprintingEnabled = true
169
Sprint.AnimationID = AnimationID
170
Sprint.TweenSpeed = TweenSpeed
171
Sprint.SprintSpeed = Speed
172
end
173
174
175
function Methods:HatToAnimate(HatName, WeldedTo)
176
PASettings.HatsBeingAnimated[HatName] = HatName.."\\\\"..WeldedTo
177
end
178
179
function Methods:HatFlingOnTouch(Hat)
180
local Hat = Character[Hat].Handle
181
Hat.Touched:Connect(function(BasePart)
182
if BasePart.Parent:FindFirstChildOfClass("Humanoid") and BasePart.Parent.Name ~= Player.Name and Attacking and not Flinging then
183
Flinging = true
184
local Connection = game:GetService("RunService").Heartbeat:Connect(function()
185
Root.Position = BasePart.Parent.PrimaryPart.Position
186
end)
187
task.wait(1)
188
Connection:Disconnect()
189
Flinging = false
190
elseif BasePart.Parent.Parent:FindFirstAncestorOfClass("Humanoid") and BasePart.Parent.Parent.Name ~= Player.Name and Attacking and not Flinging then
191
Flinging = true
192
local Connection = game:GetService("RunService").Heartbeat:Connect(function()
193
Root.Position = BasePart.Parent.Parent.PrimaryPart.Position
194
end)
195
task.wait(1)
196
Connection:Disconnect()
197
Flinging = false
198
end
199
end)
200
end
201
202
203
function Methods:BodyPartFlingOnTouch(BodyPart)
204
local Hat = Character[BodyPart]
205
Hat.Touched:Connect(function(BasePart)
206
if BasePart.Parent:FindFirstChildOfClass("Humanoid") and BasePart.Parent.Name ~= Player.Name and Attacking and not Flinging then
207
Flinging = true
208
local Connection = game:GetService("RunService").Heartbeat:Connect(function()
209
Root.Position = BasePart.Parent.PrimaryPart.Position
210
end)
211
task.wait(1)
212
Connection:Disconnect()
213
Flinging = false
214
elseif BasePart.Parent.Parent:FindFirstAncestorOfClass("Humanoid") and BasePart.Parent.Parent.Name ~= Player.Name and Attacking and not Flinging then
215
Flinging = true
216
local Connection = game:GetService("RunService").Heartbeat:Connect(function()
217
Root.Position = BasePart.Parent.Parent.PrimaryPart.Position
218
end)
219
task.wait(1)
220
Connection:Disconnect()
221
Flinging = false
222
end
223
end)
224
end
225
226
function Methods:ChangeHatName(OGName, NewName)
227
Character[OGName].Name = NewName
228
end
229
230
function Methods:OnKeyPress(Key, Main)
231
Mouse.KeyDown:Connect(function(Pressed)
232
if string.lower(Key) == Pressed then
233
Main()
234
end
235
end)
236
end
237
238
function Methods:Wait(Time)
239
task.wait(Time)
240
end
241
242
function Methods:SystemMessage(Text)
243
game.StarterGui:SetCore( "ChatMakeSystemMessage", { Text = Text, Color = Color3.fromRGB(43,98,255), Font = Enum.Font.Ubuntu} )
244
end
245
246
Methods:SystemMessage("Current Version: "..Version)
247
248
function Methods:RemoveMesh(HatName)
249
local success, failed = pcall(function()
250
getgenv().CloneRig[HatName].Handle:FindFirstChildOfClass("SpecialMesh"):Destroy()
251
getgenv().RealRig[HatName].Handle:FindFirstChildOfClass("SpecialMesh"):Destroy()
252
end)
253
if success then
254
print("Successfully destroyed "..HatName.." mesh!")
255
else
256
warn("Failed to destroy "..HatName..". This may have happened because the mesh is already destroyed, or your avatar type is R15.")
257
end
258
end
259
260
local Global = getgenv()
261
Global.Dancing = true
262
263
function Methods:SetScriptCreator(Name)
264
PASettings.ScriptCreator = Name
265
end
266
267
function Methods:RunScript()
268
269
function LoadIntro()
270
game:GetService("ContentProvider"):PreloadAsync({"http://www.roblox.com/asset/?id=8955607825"})
271
272
task.wait()
273
local ScreenGui = Instance.new("ScreenGui")
274
local ImageLabel = Instance.new("ImageLabel")
275
local TextLabel = Instance.new("TextLabel")
276
local Blur = Instance.new("BlurEffect")
277
Blur.Size = 0
278
Blur.Parent = game:GetService("Lighting")
279
ScreenGui.Parent = game:GetService("CoreGui")
280
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
281
282
local Sound0 = Instance.new("Sound")
283
local Sound1 = Instance.new("Sound")
284
local Sound2 = Instance.new("Sound")
285
Sound0.Name = "Swish Suck Reversed Metallic Swoosh Impact 2 (SFX)"
286
Sound0.Parent = workspace
287
Sound0.SoundId = "rbxassetid://9119707271"
288
Sound0.Volume = 10
289
Sound1.Name = "Swoosh"
290
Sound1.Parent = workspace
291
Sound1.SoundId = "rbxassetid://9125527144"
292
Sound1.Volume = 10
293
Sound2.Name = "Typewriter 4 (SFX)"
294
Sound2.Parent = workspace
295
Sound2.SoundId = "rbxassetid://9113880610"
296
Sound2.Volume = 10
297
298
ImageLabel.Parent = ScreenGui
299
ImageLabel.AnchorPoint = Vector2.new(0.5, 0.5)
300
ImageLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
301
ImageLabel.BackgroundTransparency = 1.000
302
ImageLabel.Position = UDim2.new(0.5, 0, 1.5, 0)
303
ImageLabel.Size = UDim2.new(0, 300, 0, 300)
304
ImageLabel.Image = "http://www.roblox.com/asset/?id=8955607825"
305
306
TextLabel.Parent = ScreenGui
307
TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
308
TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
309
TextLabel.BackgroundTransparency = 1.000
310
TextLabel.Position = UDim2.new(0.5, 0, 0.699999988, 0)
311
TextLabel.Size = UDim2.new(0, 200, 0, 50)
312
TextLabel.Font = Enum.Font.Ubuntu
313
TextLabel.Text = ""
314
TextLabel.TextColor3 = Color3.fromRGB(43, 97, 191)
315
TextLabel.TextSize = 52.000
316
TextLabel.TextStrokeColor3 = Color3.fromRGB(21, 23, 30)
317
TextLabel.TextStrokeTransparency = .500
318
319
local BlurIn = game:GetService("TweenService"):Create(Blur, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0), {Size = 56})
320
BlurIn:Play()
321
workspace.Swoosh:Play()
322
ImageLabel:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Back, 1)
323
324
task.wait(1.25)
325
326
local function Type(Text, Object)
327
for letter,_ in string.gmatch(Text, ".") do
328
workspace["Typewriter 4 (SFX)"]:Play()
329
Object.Text = Object.Text..letter
330
task.wait(.05)
331
end
332
end
333
BlurIn:Pause()
334
Type("Credits:\nScript created using Pendulum Animator.\nScript created by "..PASettings.ScriptCreator..".", TextLabel)
335
task.wait(1)
336
workspace["Swish Suck Reversed Metallic Swoosh Impact 2 (SFX)"]:Play()
337
338
local function TweenTransparency(Object, Time, PropertyTable)
339
game:GetService("TweenService"):Create(Object, TweenInfo.new(Time, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut), PropertyTable):Play()
340
end
341
342
TweenTransparency(TextLabel, workspace["Swish Suck Reversed Metallic Swoosh Impact 2 (SFX)"].TimeLength, {TextTransparency = 1, TextStrokeTransparency = 1})
343
TweenTransparency(ImageLabel, workspace["Swish Suck Reversed Metallic Swoosh Impact 2 (SFX)"].TimeLength, {ImageTransparency = 1})
344
game:GetService("TweenService"):Create(Blur, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut, 0), {Size = 0}):Play()
345
task.wait(2)
346
print("Intro done.")
347
end
348
LoadIntro()
349
350
if PASettings.Teleportation.Enabled then
351
Mouse.KeyDown:Connect(function(Key)
352
if Key == string.lower(PASettings.Teleportation.Key) and not Attacking then
353
Character:MoveTo(Mouse.Hit.Position)
354
end
355
end)
356
end
357
358
Mouse.KeyDown:Connect(function(Key)
359
if not Sprinting and PASettings.Animations.SprintAnimation.SprintingEnabled and tostring(string.byte(Key)) == "52" then
360
Sprinting = true
361
Humanoid.WalkSpeed = PASettings.Animations.SprintAnimation.SprintSpeed
362
end
363
end)
364
365
Mouse.KeyUp:Connect(function(Key)
366
if Sprinting and PASettings.Animations.SprintAnimation.SprintingEnabled and tostring(string.byte(Key)) == "52" then
367
Sprinting = false
368
Humanoid.WalkSpeed = PASettings.WalkSpeed
369
end
370
end)
371
372
task.spawn(
373
function()
374
while task.wait() do
375
if Humanoid.MoveDirection.X == 0 and not Attacking or Humanoid.MoveDirection.Z == 0 and not Attacking then -- MoveDirection is much more efficent.
376
CurrentType = "Idle"
377
elseif not Attacking and Sprinting and not Attacking then
378
CurrentType = "Sprinting"
379
elseif not Attacking and not Sprinting and not Attacking then
380
CurrentType = "Running"
381
elseif Attacking then
382
CurrentType = "Attacking"
383
end
384
end
385
end
386
)
387
388
local function PAError(Message)
389
error("PA error: \n" .. Message)
390
end
391
392
393
local function PlayAnimation(ID, FrameSpeed, TweenSpeed, Type)
394
395
local number = ID
396
397
if Global.Dancing == true then
398
Global.Dancing = false
399
end
400
401
local aaa = "rbxassetid://" .. number
402
403
local NeededAssets = game:GetObjects(aaa)[1]
404
local TweenService = game:GetService "TweenService"
405
if game.Players.LocalPlayer.Character.Humanoid:FindFirstChild("Animator") then
406
game.Players.LocalPlayer.Character.Humanoid.Animator:Destroy()
407
end
408
if game.Players.LocalPlayer.Character:FindFirstChild("Animate") then
409
game.Players.LocalPlayer.Character:FindFirstChild("Animate"):Destroy()
410
end
411
local Joints = {
412
["Torso"] = game.Players.LocalPlayer.Character.HumanoidRootPart["RootJoint"],
413
["Right Arm"] = game.Players.LocalPlayer.Character.Torso["Right Shoulder"],
414
["Left Arm"] = game.Players.LocalPlayer.Character.Torso["Left Shoulder"],
415
["Head"] = game.Players.LocalPlayer.Character.Torso["Neck"],
416
["Left Leg"] = game.Players.LocalPlayer.Character.Torso["Left Hip"],
417
["Right Leg"] = game.Players.LocalPlayer.Character.Torso["Right Hip"],
418
["RootJoint"] = game.Players.LocalPlayer.Character.HumanoidRootPart["RootJoint"]
419
}
420
421
for _, v in pairs(PASettings.HatsBeingAnimated) do
422
Joints[string.split(v, "\\\\")[1]] = Character[string.split(v, "\\\\")[1]].Handle.Motor6D
423
end
424
425
Global.dancing = true
426
local speed = 1
427
local keyframes = NeededAssets:GetKeyframes()
428
for ii, frame in ipairs(keyframes) do
429
if CurrentType ~= Type then
430
print("breaking")
431
break
432
end
433
local duration = keyframes[ii + 1] and keyframes[ii + 1].Time - frame.Time or task.wait(1 / 120)
434
if keyframes[ii - 1] then
435
task.wait(1 / FrameSpeed)
436
end
437
438
if TweenSpeed == nil or TweenSpeed == 0 then
439
TweenSpeed = .1
440
end
441
442
if FrameSpeed == nil or FrameSpeed == 0 then
443
TweenSpeed = 120
444
end
445
446
for i, v in ipairs(frame:GetDescendants()) do
447
if Joints[v.Name] then
448
if CurrentType ~= Type then
449
print("breaking")
450
break
451
else
452
TweenService:Create(Joints[v.Name], TweenInfo.new(TweenSpeed), {Transform = v.CFrame}):Play()
453
end
454
end
455
end
456
end
457
end
458
459
460
for _,v in pairs(PASettings.Animations.Attacks.OneKeyAttack) do
461
if type(v) == "table" then
462
print("Found attack")
463
local Attack = v
464
warn(Attack.Key)
465
Mouse.KeyDown:Connect(function(Key)
466
if string.lower(Key) == string.lower(Attack.Key) and not Attacking then
467
print("Attacking")
468
local CanSprint
469
if PASettings.Animations.SprintAnimation.SprintingEnabled then
470
CanSprint = true
471
PASettings.Animations.SprintAnimation.SprintingEnabled = false
472
end
473
474
Humanoid.WalkSpeed = Attack.AttackWalkSpeed
475
Attacking = true
476
task.wait()
477
PlayAnimation(Attack.AnimationID, Attack.FrameSpeed, Attack.TweenSpeed, "Attacking")
478
Attacking = false
479
480
if CanSprint then
481
PASettings.Animations.SprintAnimation.SprintingEnabled = true
482
end
483
Humanoid.WalkSpeed = PASettings.WalkSpeed
484
end
485
end)
486
else
487
continue
488
end
489
end
490
491
for _, v in pairs(PASettings.HatsBeingAnimated) do
492
local Handle = Character[string.split(v, "\\\\")[1]].Handle
493
Handle:BreakJoints()
494
local Controller = Instance.new("Motor6D")
495
Controller.Parent = Handle
496
Controller.Part1 = Handle
497
Controller.Part0 = Character[string.split(v, "\\\\")[2]]
498
end
499
500
501
502
function Methods:PlayAnimation(ID, TweenSpeed, Speed)
503
if not Attacking then
504
local CanSprint
505
if PASettings.Animations.SprintAnimation.SprintingEnabled then
506
CanSprint = true
507
PASettings.Animations.SprintAnimation.SprintingEnabled = false
508
end
509
510
Humanoid.WalkSpeed = Speed
511
Attacking = true
512
task.wait()
513
PlayAnimation(ID, math.huge, TweenSpeed, "Attacking")
514
Attacking = false
515
516
if CanSprint then
517
PASettings.Animations.SprintAnimation.SprintingEnabled = true
518
end
519
Humanoid.WalkSpeed = PASettings.WalkSpeed
520
end
521
end
522
523
524
Methods:SystemMessage("PENDULUM ANIMATOR: Script Hash is "..script:GetHash())
525
Methods:SystemMessage("PENDULUM ANIMATOR: Script finished loading!")
526
while task.wait() do
527
if CurrentType == "Idle" and Humanoid.Health >= 0 and not Attacking then
528
PlayAnimation(PASettings.Animations.IdleAnimation.AnimationID, PASettings.Animations.IdleAnimation.FrameSpeed, PASettings.Animations.IdleAnimation.TweenSpeed, "Idle")
529
elseif CurrentType == "Sprinting" and Humanoid.Health >= 0 and Sprinting and not Attacking then
530
PlayAnimation(PASettings.Animations.SprintAnimation.AnimationID, PASettings.Animations.SprintAnimation.FrameSpeed, PASettings.Animations.SprintAnimation.TweenSpeed, "Sprinting")
531
elseif CurrentType == "Running" and Humanoid.Health >= 0 and not Attacking then
532
PlayAnimation(PASettings.Animations.WalkAnimation.AnimationID, PASettings.Animations.WalkAnimation.FrameSpeed, PASettings.Animations.WalkAnimation.TweenSpeed, "Running")
533
534
end
535
end
536
end
537
return Methods