R

Fe sadboy

public
rrixh Jul 22, 2024 Never 52
Clone
Bash FEsadboy.xls 1278 lines (1172 loc) | 40.72 KB
1
local clone_transparency = 1 --Set Value How you want to fake body be transparenty.
2
3
local Motors = {
4
["Left Hip"] = 0,
5
["Neck"] = 0,
6
["Left Shoulder"] = 0,
7
["Right Hip"] = 0,
8
["Right Shoulder"] = 0
9
}
10
local TS = game:GetService("TweenService")
11
local count2, maxcount2, count
12
13
local function getnext(tbl, number)
14
local c = 100
15
local rtrnv = 0
16
for i, v in pairs(tbl) do
17
if i > number and i - number < c then
18
c = i - number
19
rtrnv = i
20
end
21
end
22
return rtrnv
23
end
24
25
local function kftotbl(kf)
26
local tbl3 = {}
27
for i, v in pairs(kf:GetDescendants()) do
28
if v:IsA("Pose") then
29
tbl3[string.sub(v.Name, 1, 1) .. string.sub(v.Name, #v.Name, #v.Name)] = v.CFrame
30
end
31
end
32
return tbl3
33
end
34
35
local function getSpeed(lastTimeStamp, currentTimeStamp)
36
if currentTimeStamp == 0 then return 0 end
37
return math.abs(lastTimeStamp - currentTimeStamp)
38
end
39
40
local function getAnimation(animationId)
41
local animationObject
42
local S, E = pcall(function()
43
animationObject = game:GetObjects(animationId)[1]
44
end)
45
return animationObject
46
end
47
48
local Main = {}
49
Main.__index = Main
50
51
function Main.LoadDummy(DummyChar)
52
local metatable = {}
53
setmetatable(metatable, Main)
54
metatable.char = DummyChar
55
return metatable
56
end
57
58
function Main:LoadAnimation(animationId)
59
local Character = self.char
60
local animationObject = getAnimation(animationId)
61
if animationObject == nil then return end
62
print(animationObject)
63
local metatable = {}
64
setmetatable(metatable, Main)
65
metatable.char = Character
66
metatable.animObject = animationObject
67
return metatable
68
end
69
70
function Main:Play()
71
local Character = self.char
72
local animationObject = self.animObject
73
local Looped = true
74
local anim = {}
75
for i, v in pairs(animationObject:GetChildren()) do
76
if v:IsA("Keyframe") then
77
anim[v.Time] = kftotbl(v)
78
end
79
end
80
local LH = Character.Torso["Left Hip"].C0
81
local RH = Character.Torso["Right Hip"].C0
82
local LS = Character.Torso["Left Shoulder"].C0
83
local RS = Character.Torso["Right Shoulder"].C0
84
local RoH = Character.HumanoidRootPart["RootJoint"].C0
85
local N = Character.Torso["Neck"].C0
86
count = -1
87
local lastTimeStamp = 0
88
local char = Character
89
self.played = false
90
local times = {
91
Lg = 0,
92
Rg = 0,
93
Lm = 0,
94
Rm = 0,
95
To = 0,
96
Hd = 0
97
}
98
local timepassed = 0
99
local lasttime = tick()
100
while task.wait() do
101
timepassed = tick() - lasttime
102
if self.played then
103
Character.Torso["Left Hip"].C0 = LH
104
Character.Torso["Right Hip"].C0 = RH
105
Character.Torso["Left Shoulder"].C0 = LS
106
Character.Torso["Right Shoulder"].C0 = RS
107
Character.HumanoidRootPart["RootJoint"].C0 = RoH
108
Character.Torso["Neck"].C0 = N
109
break
110
end
111
if not Looped then
112
self.played = true
113
end
114
for i, oasjdadlasdkadkldjkl in pairs(anim) do
115
local asdf = getnext(anim, count)
116
local v = anim[asdf]
117
count2 = 0
118
maxcount2 = asdf - count
119
count = asdf
120
wait(asdf - count)
121
count2 = maxcount2
122
if v["Lg"] then
123
local Ti = TweenInfo.new(getSpeed(lastTimeStamp, asdf) + times.Lg + getSpeed(lastTimeStamp, asdf))
124
times.Lg = 0
125
TS:Create(Character.Torso["Left Hip"], Ti, { C0 = LH * v["Lg"] }):Play()
126
else
127
times.Lg = times.Lg + getSpeed(lastTimeStamp, asdf)
128
end
129
if v["Rg"] then
130
local Ti = TweenInfo.new(getSpeed(lastTimeStamp, asdf) + times.Rg + getSpeed(lastTimeStamp, asdf))
131
times.Rg = 0
132
TS:Create(Character.Torso["Right Hip"], Ti, { C0 = RH * v["Rg"] }):Play()
133
else
134
times.Rg = times.Rg + getSpeed(lastTimeStamp, asdf)
135
end
136
if v["Lm"] then
137
local Ti = TweenInfo.new(getSpeed(lastTimeStamp, asdf) + times.Lm + getSpeed(lastTimeStamp, asdf))
138
times.Lm = 0
139
TS:Create(Character.Torso["Left Shoulder"], Ti, { C0 = LS * v["Lm"] }):Play()
140
else
141
times.Lm = times.Lm + getSpeed(lastTimeStamp, asdf)
142
end
143
if v["Rm"] then
144
local Ti = TweenInfo.new(getSpeed(lastTimeStamp, asdf) + times.Rm + getSpeed(lastTimeStamp, asdf))
145
times.Rm = 0
146
TS:Create(Character.Torso["Right Shoulder"], Ti, { C0 = RS * v["Rm"] }):Play()
147
else
148
times.Rm = times.Rm + getSpeed(lastTimeStamp, asdf)
149
end
150
if v["To"] then
151
local Ti = TweenInfo.new(getSpeed(lastTimeStamp, asdf) + times.To + getSpeed(lastTimeStamp, asdf))
152
times.To = 0
153
TS:Create(Character.HumanoidRootPart["RootJoint"], Ti, { C0 = RoH * v["To"] }):Play()
154
else
155
times.To = times.To + getSpeed(lastTimeStamp, asdf)
156
end
157
if v["Hd"] then
158
local Ti = TweenInfo.new(getSpeed(lastTimeStamp, asdf) + times.Hd + getSpeed(lastTimeStamp, asdf))
159
times.Hd = 0
160
TS:Create(Character.Torso["Neck"], Ti, { C0 = N * v["Hd"] }):Play()
161
else
162
times.Hd = times.Hd + getSpeed(lastTimeStamp, asdf)
163
end
164
task.wait(getSpeed(lastTimeStamp, asdf))
165
lastTimeStamp = asdf
166
end
167
end
168
end
169
170
function Main:Stop()
171
self.played = true
172
end
173
174
local animationplayer = Main
175
local LoadedAnimationTable = {}
176
177
local Players = game:GetService("Players")
178
local Player = Players.LocalPlayer
179
local RunService = game:GetService("RunService")
180
game.Players.LocalPlayer.Character.Archivable = true
181
local FakeCharacter = game.Players.LocalPlayer.Character:Clone()
182
Player.Character:BreakJoints()
183
Player.Character = nil
184
local Connection
185
Connection = game.Workspace.DescendantAdded:Connect(function(c)
186
if c.Name == "Animate" and c.Parent == Player.Character then
187
c.Enabled = false
188
Connection:Disconnect()
189
end
190
end)
191
repeat task.wait() until game.Players.LocalPlayer.Character
192
task.wait(0.1)
193
local RealChar = Player.Character
194
RealChar.Archivable = true
195
FakeCharacter.Name = Player.Name .. "_Fake"
196
FakeCharacter.Parent = workspace
197
local rig = animationplayer.LoadDummy(FakeCharacter)
198
199
-- Comment out the following lines to not load and play any animation
200
-- local track = rig:LoadAnimation("rbxassetid://17603135849")
201
-- coroutine.wrap(function()
202
-- track:Play()
203
-- end)()
204
205
task.spawn(function()
206
for i, LS in ipairs(FakeCharacter:GetChildren()) do
207
if LS:IsA("LocalScript") then
208
LS.Enabled = false
209
task.wait(0.1)
210
LS.Enabled = false
211
end
212
end
213
end)
214
215
for i, Part in ipairs(FakeCharacter:GetDescendants()) do
216
if Part:IsA("BasePart") then
217
Part.Transparency = clone_transparency
218
end
219
end
220
221
for i, Decal in ipairs(FakeCharacter:GetDescendants()) do
222
if Decal:IsA("Decal") then
223
Decal.Transparency = clone_transparency
224
end
225
end
226
227
Player.Character = FakeCharacter
228
229
local function MotorAngle()
230
if RealChar:FindFirstChild("Torso") then
231
for MotorName, Motor6DAngle in pairs(Motors) do
232
if RealChar:FindFirstChild("Torso"):FindFirstChild(MotorName) then
233
RealChar:FindFirstChild("Torso"):FindFirstChild(MotorName).CurrentAngle = Motor6DAngle
234
end
235
end
236
end
237
end
238
239
local function SetAngles()
240
if FakeCharacter:FindFirstChild("Torso") then
241
for MotorName, Motor6DAngle in pairs(Motors) do
242
if FakeCharacter:FindFirstChild("Torso"):FindFirstChild(MotorName) then
243
local Motor = FakeCharacter:FindFirstChild("Torso"):FindFirstChild(MotorName)
244
local rx, ry, rz = Motor.Part1.CFrame:ToObjectSpace(FakeCharacter:FindFirstChild("Torso").CFrame):ToOrientation()
245
if Motor.Name == "Right Shoulder" then
246
Motors[MotorName] = -rx
247
end
248
if Motor.Name == "Left Shoulder" then
249
Motors[MotorName] = rx
250
end
251
if Motor.Name == "Right Hip" then
252
Motors[MotorName] = -rx
253
end
254
if Motor.Name == "Left Hip" then
255
Motors[MotorName] = rx
256
end
257
if Motor.Name == "Neck" then
258
Motors[MotorName] = -ry
259
end
260
end
261
end
262
end
263
end
264
265
local function BaseCol()
266
for i, Part in ipairs(RealChar:GetChildren()) do
267
if Part:IsA("BasePart") then
268
Part.CanCollide = false
269
end
270
end
271
for i, Part in ipairs(FakeCharacter:GetChildren()) do
272
if Part:IsA("BasePart") then
273
Part.CanCollide = false
274
end
275
end
276
end
277
278
RunService.Heartbeat:Connect(function()
279
SetAngles()
280
MotorAngle()
281
pcall(function()
282
RealChar.HumanoidRootPart.CFrame = FakeCharacter.Torso.CFrame
283
end)
284
end)
285
286
RunService.PreSimulation:Connect(function()
287
BaseCol()
288
end)
289
290
--[[
291
FE SAD
292
made by MyWorld#4430
293
discord.gg/pYVHtSJmEY
294
works on R6, R15, no hats needed
295
controls: F to fly
296
]]
297
298
if "its sad enough to use MyWorld's reanimate" then
299
--reanimate by MyWorld#4430 discord.gg/pYVHtSJmEY
300
local Vector3_101 = Vector3.new(1, 0, 1)
301
local netless_Y = Vector3.new(0, 25.1, 0)
302
local function getNetlessVelocity(realPartVelocity) --edit this if you have a better netless method
303
local netlessVelocity = realPartVelocity * Vector3_101
304
local mag = netlessVelocity.Magnitude
305
if mag > 0.1 then
306
netlessVelocity *= 100 / mag
307
end
308
netlessVelocity += netless_Y
309
return netlessVelocity
310
end
311
local simradius = "shp" --simulation radius (net bypass) method
312
--"shp" - sethiddenproperty
313
--"ssr" - setsimulationradius
314
--false - disable
315
local noclipAllParts = true --set it to true if you want noclip
316
local flingpart = "HumanoidRootPart" --the part that will be used to fling (ctrl + F "fling function")
317
local antiragdoll = true --removes hingeConstraints and ballSocketConstraints from your character
318
local newanimate = true --disables the animate script and enables after reanimation
319
local discharscripts = true --disables all localScripts parented to your character before reanimation
320
local R15toR6 = true --tries to convert your character to r6 if its r15
321
local hatcollide = true --makes hats cancollide (credit to ShownApe) (works only with reanimate method 0)
322
local humState16 = true --enables collisions for limbs before the humanoid dies (using hum:ChangeState)
323
local addtools = false --puts all tools from backpack to character and lets you hold them after reanimation
324
local hedafterneck = true --disable aligns for head and enable after neck is removed
325
local loadtime = game:GetService("Players").RespawnTime + 0.5 --anti respawn delay
326
local method = 1 --reanimation method
327
--methods:
328
--0 - breakJoints (takes [loadtime] seconds to laod)
329
--1 - limbs
330
--2 - limbs + anti respawn
331
--3 - limbs + breakJoints after [loadtime] seconds
332
--4 - remove humanoid + breakJoints
333
--5 - remove humanoid + limbs
334
local alignmode = 3 --AlignPosition mode
335
--modes:
336
--1 - AlignPosition rigidity enabled true
337
--2 - 2 AlignPositions rigidity enabled both true and false
338
--3 - AlignPosition rigidity enabled false
339
340
local lp = game:GetService("Players").LocalPlayer
341
local rs = game:GetService("RunService")
342
local stepped = rs.Stepped
343
local heartbeat = rs.Heartbeat
344
local renderstepped = rs.RenderStepped
345
local sg = game:GetService("StarterGui")
346
local ws = game:GetService("Workspace")
347
local cf = CFrame.new
348
local v3 = Vector3.new
349
local v3_0 = v3(0, 0, 0)
350
local inf = math.huge
351
352
local c = lp.Character
353
354
if not (c and c.Parent) then
355
return
356
end
357
358
c.Destroying:Connect(function()
359
c = nil
360
end)
361
362
local function gp(parent, name, className)
363
if typeof(parent) == "Instance" then
364
for i, v in pairs(parent:GetChildren()) do
365
if (v.Name == name) and v:IsA(className) then
366
return v
367
end
368
end
369
end
370
return nil
371
end
372
373
local function align(Part0, Part1)
374
Part0.CustomPhysicalProperties = PhysicalProperties.new(0.0001, 0.0001, 0.0001, 0.0001, 0.0001)
375
376
local att0 = Instance.new("Attachment", Part0)
377
att0.Orientation = v3_0
378
att0.Position = v3_0
379
att0.Name = "att0_" .. Part0.Name
380
local att1 = Instance.new("Attachment", Part1)
381
att1.Orientation = v3_0
382
att1.Position = v3_0
383
att1.Name = "att1_" .. Part1.Name
384
385
if (alignmode == 1) or (alignmode == 2) then
386
local ape = Instance.new("AlignPosition", att0)
387
ape.ApplyAtCenterOfMass = false
388
ape.MaxForce = inf
389
ape.MaxVelocity = inf
390
ape.ReactionForceEnabled = false
391
ape.Responsiveness = 200
392
ape.Attachment1 = att1
393
ape.Attachment0 = att0
394
ape.Name = "AlignPositionRtrue"
395
ape.RigidityEnabled = true
396
end
397
398
if (alignmode == 2) or (alignmode == 3) then
399
local apd = Instance.new("AlignPosition", att0)
400
apd.ApplyAtCenterOfMass = false
401
apd.MaxForce = inf
402
apd.MaxVelocity = inf
403
apd.ReactionForceEnabled = false
404
apd.Responsiveness = 200
405
apd.Attachment1 = att1
406
apd.Attachment0 = att0
407
apd.Name = "AlignPositionRfalse"
408
apd.RigidityEnabled = false
409
end
410
411
local ao = Instance.new("AlignOrientation", att0)
412
ao.MaxAngularVelocity = inf
413
ao.MaxTorque = inf
414
ao.PrimaryAxisOnly = false
415
ao.ReactionTorqueEnabled = false
416
ao.Responsiveness = 200
417
ao.Attachment1 = att1
418
ao.Attachment0 = att0
419
ao.RigidityEnabled = false
420
421
if type(getNetlessVelocity) == "function" then
422
local realVelocity = v3_0
423
local steppedcon = stepped:Connect(function()
424
Part0.Velocity = realVelocity
425
end)
426
local heartbeatcon = heartbeat:Connect(function()
427
realVelocity = Part0.Velocity
428
Part0.Velocity = getNetlessVelocity(realVelocity)
429
end)
430
Part0.Destroying:Connect(function()
431
Part0 = nil
432
steppedcon:Disconnect()
433
heartbeatcon:Disconnect()
434
end)
435
end
436
end
437
438
local function respawnrequest()
439
local ccfr = ws.CurrentCamera.CFrame
440
local c = lp.Character
441
lp.Character = nil
442
lp.Character = c
443
local con = nil
444
con = ws.CurrentCamera.Changed:Connect(function(prop)
445
if (prop ~= "Parent") and (prop ~= "CFrame") then
446
return
447
end
448
ws.CurrentCamera.CFrame = ccfr
449
con:Disconnect()
450
end)
451
end
452
453
local destroyhum = (method == 4) or (method == 5)
454
local breakjoints = (method == 0) or (method == 4)
455
local antirespawn = (method == 0) or (method == 2) or (method == 3)
456
457
hatcollide = hatcollide and (method == 0)
458
459
addtools = addtools and gp(lp, "Backpack", "Backpack")
460
461
local fenv = getfenv()
462
local shp = fenv.sethiddenproperty or fenv.set_hidden_property or fenv.set_hidden_prop or fenv.sethiddenprop
463
local ssr = fenv.setsimulationradius or fenv.set_simulation_radius or fenv.set_sim_radius or fenv.setsimradius or fenv.set_simulation_rad or fenv.setsimulationrad
464
465
if shp and (simradius == "shp") then
466
spawn(function()
467
while c and heartbeat:Wait() do
468
shp(lp, "SimulationRadius", inf)
469
end
470
end)
471
elseif ssr and (simradius == "ssr") then
472
spawn(function()
473
while c and heartbeat:Wait() do
474
ssr(inf)
475
end
476
end)
477
end
478
479
antiragdoll = antiragdoll and function(v)
480
if v:IsA("HingeConstraint") or v:IsA("BallSocketConstraint") then
481
v.Parent = nil
482
end
483
end
484
485
if antiragdoll then
486
for i, v in pairs(c:GetDescendants()) do
487
antiragdoll(v)
488
end
489
c.DescendantAdded:Connect(antiragdoll)
490
end
491
492
if antirespawn then
493
respawnrequest()
494
end
495
496
if method == 0 then
497
wait(loadtime)
498
if not c then
499
return
500
end
501
end
502
503
if discharscripts then
504
for i, v in pairs(c:GetChildren()) do
505
if v:IsA("LocalScript") then
506
v.Disabled = true
507
end
508
end
509
elseif newanimate then
510
local animate = gp(c, "Animate", "LocalScript")
511
if animate and (not animate.Disabled) then
512
animate.Disabled = true
513
else
514
newanimate = false
515
end
516
end
517
518
if addtools then
519
for i, v in pairs(addtools:GetChildren()) do
520
if v:IsA("Tool") then
521
v.Parent = c
522
end
523
end
524
end
525
526
pcall(function()
527
settings().Physics.AllowSleep = false
528
settings().Physics.PhysicsEnvironmentalThrottle = Enum.EnviromentalPhysicsThrottle.Disabled
529
end)
530
531
local OLDscripts = {}
532
533
for i, v in pairs(c:GetDescendants()) do
534
if v.ClassName == "Script" then
535
table.insert(OLDscripts, v)
536
end
537
end
538
539
local scriptNames = {}
540
541
for i, v in pairs(c:GetDescendants()) do
542
if v:IsA("BasePart") then
543
local newName = tostring(i)
544
local exists = true
545
while exists do
546
exists = false
547
for i, v in pairs(OLDscripts) do
548
if v.Name == newName then
549
exists = true
550
end
551
end
552
if exists then
553
newName = newName .. "_"
554
end
555
end
556
table.insert(scriptNames, newName)
557
Instance.new("Script", v).Name = newName
558
end
559
end
560
561
c.Archivable = true
562
local hum = c:FindFirstChildOfClass("Humanoid")
563
if hum then
564
for i, v in pairs(hum:GetPlayingAnimationTracks()) do
565
v:Stop()
566
end
567
end
568
local cl = c:Clone()
569
if hum and humState16 then
570
hum:ChangeState(Enum.HumanoidStateType.Physics)
571
if destroyhum then
572
wait(1.6)
573
end
574
end
575
if hum and hum.Parent and destroyhum then
576
hum:Destroy()
577
end
578
579
if not c then
580
return
581
end
582
583
local head = gp(c, "Head", "BasePart")
584
local torso = gp(c, "Torso", "BasePart") or gp(c, "UpperTorso", "BasePart")
585
local root = gp(c, "HumanoidRootPart", "BasePart")
586
if hatcollide and c:FindFirstChildOfClass("Accessory") then
587
local anything = c:FindFirstChildOfClass("BodyColors") or gp(c, "Health", "Script")
588
if not (torso and root and anything) then
589
return
590
end
591
torso:Destroy()
592
root:Destroy()
593
if shp then
594
for i,v in pairs(c:GetChildren()) do
595
if v:IsA("Accessory") then
596
shp(v, "BackendAccoutrementState", 0)
597
end
598
end
599
end
600
anything:Destroy()
601
end
602
603
for i, v in pairs(cl:GetDescendants()) do
604
if v:IsA("BasePart") then
605
v.Transparency = 1
606
v.Anchored = false
607
end
608
end
609
610
local model = Instance.new("Model", c)
611
model.Name = model.ClassName
612
613
model.Destroying:Connect(function()
614
model = nil
615
end)
616
617
for i, v in pairs(c:GetChildren()) do
618
if v ~= model then
619
if addtools and v:IsA("Tool") then
620
for i1, v1 in pairs(v:GetDescendants()) do
621
if v1 and v1.Parent and v1:IsA("BasePart") then
622
local bv = Instance.new("BodyVelocity", v1)
623
bv.Velocity = v3_0
624
bv.MaxForce = v3(1000, 1000, 1000)
625
bv.P = 1250
626
bv.Name = "bv_" .. v.Name
627
end
628
end
629
end
630
v.Parent = model
631
end
632
end
633
634
if breakjoints then
635
model:BreakJoints()
636
else
637
if head and torso then
638
for i, v in pairs(model:GetDescendants()) do
639
if v:IsA("Weld") or v:IsA("Snap") or v:IsA("Glue") or v:IsA("Motor") or v:IsA("Motor6D") then
640
local save = false
641
if (v.Part0 == torso) and (v.Part1 == head) then
642
save = true
643
end
644
if (v.Part0 == head) and (v.Part1 == torso) then
645
save = true
646
end
647
if save then
648
if hedafterneck then
649
hedafterneck = v
650
end
651
else
652
v:Destroy()
653
end
654
end
655
end
656
end
657
if method == 3 then
658
spawn(function()
659
wait(loadtime)
660
if model then
661
model:BreakJoints()
662
end
663
end)
664
end
665
end
666
667
cl.Parent = c
668
for i, v in pairs(cl:GetChildren()) do
669
v.Parent = c
670
end
671
cl:Destroy()
672
673
local noclipmodel = (noclipAllParts and c) or model
674
local noclipcon = nil
675
local function uncollide()
676
if noclipmodel then
677
for i, v in pairs(noclipmodel:GetDescendants()) do
678
if v:IsA("BasePart") then
679
v.CanCollide = false
680
end
681
end
682
else
683
noclipcon:Disconnect()
684
end
685
end
686
noclipcon = stepped:Connect(uncollide)
687
uncollide()
688
689
for i, scr in pairs(model:GetDescendants()) do
690
if (scr.ClassName == "Script") and table.find(scriptNames, scr.Name) then
691
local Part0 = scr.Parent
692
if Part0:IsA("BasePart") then
693
for i1, scr1 in pairs(c:GetDescendants()) do
694
if (scr1.ClassName == "Script") and (scr1.Name == scr.Name) and (not scr1:IsDescendantOf(model)) then
695
local Part1 = scr1.Parent
696
if (Part1.ClassName == Part0.ClassName) and (Part1.Name == Part0.Name) then
697
align(Part0, Part1)
698
break
699
end
700
end
701
end
702
end
703
end
704
end
705
706
if (typeof(hedafterneck) == "Instance") and head then
707
local aligns = {}
708
local con = nil
709
con = hedafterneck.Changed:Connect(function(prop)
710
if (prop == "Parent") and not hedafterneck.Parent then
711
con:Disconnect()
712
for i, v in pairs(aligns) do
713
v.Enabled = true
714
end
715
end
716
end)
717
for i, v in pairs(head:GetDescendants()) do
718
if v:IsA("AlignPosition") or v:IsA("AlignOrientation") then
719
i = tostring(i)
720
aligns[i] = v
721
v.Destroying:Connect(function()
722
aligns[i] = nil
723
end)
724
v.Enabled = false
725
end
726
end
727
end
728
729
for i, v in pairs(c:GetDescendants()) do
730
if v and v.Parent then
731
if v.ClassName == "Script" then
732
if table.find(scriptNames, v.Name) then
733
v:Destroy()
734
end
735
elseif not v:IsDescendantOf(model) then
736
if v:IsA("Decal") then
737
v.Transparency = 1
738
elseif v:IsA("ForceField") then
739
v.Visible = false
740
elseif v:IsA("Sound") then
741
v.Playing = false
742
elseif v:IsA("BillboardGui") or v:IsA("SurfaceGui") or v:IsA("ParticleEmitter") or v:IsA("Fire") or v:IsA("Smoke") or v:IsA("Sparkles") then
743
v.Enabled = false
744
end
745
end
746
end
747
end
748
749
if newanimate then
750
local animate = gp(c, "Animate", "LocalScript")
751
if animate then
752
animate.Disabled = false
753
end
754
end
755
756
if addtools then
757
for i, v in pairs(c:GetChildren()) do
758
if v:IsA("Tool") then
759
v.Parent = addtools
760
end
761
end
762
end
763
764
local hum0 = model:FindFirstChildOfClass("Humanoid")
765
if hum0 then
766
hum0.Destroying:Connect(function()
767
hum0 = nil
768
end)
769
end
770
771
local hum1 = c:FindFirstChildOfClass("Humanoid")
772
if hum1 then
773
hum1.Destroying:Connect(function()
774
hum1 = nil
775
end)
776
end
777
778
if hum1 then
779
ws.CurrentCamera.CameraSubject = hum1
780
local camSubCon = nil
781
local function camSubFunc()
782
camSubCon:Disconnect()
783
if c and hum1 then
784
ws.CurrentCamera.CameraSubject = hum1
785
end
786
end
787
camSubCon = renderstepped:Connect(camSubFunc)
788
if hum0 then
789
hum0.Changed:Connect(function(prop)
790
if hum1 and (prop == "Jump") then
791
hum1.Jump = hum0.Jump
792
end
793
end)
794
else
795
respawnrequest()
796
end
797
end
798
799
local rb = Instance.new("BindableEvent", c)
800
rb.Event:Connect(function()
801
rb:Destroy()
802
sg:SetCore("ResetButtonCallback", true)
803
if destroyhum then
804
c:BreakJoints()
805
return
806
end
807
if hum0 and (hum0.Health > 0) then
808
model:BreakJoints()
809
hum0.Health = 0
810
end
811
if antirespawn then
812
respawnrequest()
813
end
814
end)
815
sg:SetCore("ResetButtonCallback", rb)
816
817
spawn(function()
818
while c do
819
if hum0 and hum1 then
820
hum1.Jump = hum0.Jump
821
end
822
wait()
823
end
824
sg:SetCore("ResetButtonCallback", true)
825
end)
826
827
R15toR6 = R15toR6 and hum1 and (hum1.RigType == Enum.HumanoidRigType.R15)
828
if R15toR6 then
829
local part = gp(c, "HumanoidRootPart", "BasePart") or gp(c, "UpperTorso", "BasePart") or gp(c, "LowerTorso", "BasePart") or gp(c, "Head", "BasePart") or c:FindFirstChildWhichIsA("BasePart")
830
if part then
831
local cfr = part.CFrame
832
local R6parts = {
833
head = {
834
Name = "Head",
835
Size = v3(2, 1, 1),
836
R15 = {
837
Head = 0
838
}
839
},
840
torso = {
841
Name = "Torso",
842
Size = v3(2, 2, 1),
843
R15 = {
844
UpperTorso = 0.2,
845
LowerTorso = -0.8
846
}
847
},
848
root = {
849
Name = "HumanoidRootPart",
850
Size = v3(2, 2, 1),
851
R15 = {
852
HumanoidRootPart = 0
853
}
854
},
855
leftArm = {
856
Name = "Left Arm",
857
Size = v3(1, 2, 1),
858
R15 = {
859
LeftHand = -0.85,
860
LeftLowerArm = -0.2,
861
LeftUpperArm = 0.4
862
}
863
},
864
rightArm = {
865
Name = "Right Arm",
866
Size = v3(1, 2, 1),
867
R15 = {
868
RightHand = -0.85,
869
RightLowerArm = -0.2,
870
RightUpperArm = 0.4
871
}
872
},
873
leftLeg = {
874
Name = "Left Leg",
875
Size = v3(1, 2, 1),
876
R15 = {
877
LeftFoot = -0.85,
878
LeftLowerLeg = -0.15,
879
LeftUpperLeg = 0.6
880
}
881
},
882
rightLeg = {
883
Name = "Right Leg",
884
Size = v3(1, 2, 1),
885
R15 = {
886
RightFoot = -0.85,
887
RightLowerLeg = -0.15,
888
RightUpperLeg = 0.6
889
}
890
}
891
}
892
for i, v in pairs(c:GetChildren()) do
893
if v:IsA("BasePart") then
894
for i1, v1 in pairs(v:GetChildren()) do
895
if v1:IsA("Motor6D") then
896
v1.Part0 = nil
897
end
898
end
899
end
900
end
901
part.Archivable = true
902
for i, v in pairs(R6parts) do
903
local part = part:Clone()
904
part:ClearAllChildren()
905
part.Name = v.Name
906
part.Size = v.Size
907
part.CFrame = cfr
908
part.Anchored = false
909
part.Transparency = 1
910
part.CanCollide = false
911
for i1, v1 in pairs(v.R15) do
912
local R15part = gp(c, i1, "BasePart")
913
local att = gp(R15part, "att1_" .. i1, "Attachment")
914
if R15part then
915
local weld = Instance.new("Weld", R15part)
916
weld.Name = "Weld_" .. i1
917
weld.Part0 = part
918
weld.Part1 = R15part
919
weld.C0 = cf(0, v1, 0)
920
weld.C1 = cf(0, 0, 0)
921
R15part.Massless = true
922
R15part.Name = "R15_" .. i1
923
R15part.Parent = part
924
if att then
925
att.Parent = part
926
att.Position = v3(0, v1, 0)
927
end
928
end
929
end
930
part.Parent = c
931
R6parts[i] = part
932
end
933
local R6joints = {
934
neck = {
935
Parent = R6parts.torso,
936
Name = "Neck",
937
Part0 = R6parts.torso,
938
Part1 = R6parts.head,
939
C0 = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0),
940
C1 = cf(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
941
},
942
rootJoint = {
943
Parent = R6parts.root,
944
Name = "RootJoint" ,
945
Part0 = R6parts.root,
946
Part1 = R6parts.torso,
947
C0 = cf(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0),
948
C1 = cf(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
949
},
950
rightShoulder = {
951
Parent = R6parts.torso,
952
Name = "Right Shoulder",
953
Part0 = R6parts.torso,
954
Part1 = R6parts.rightArm,
955
C0 = cf(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),
956
C1 = cf(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
957
},
958
leftShoulder = {
959
Parent = R6parts.torso,
960
Name = "Left Shoulder",
961
Part0 = R6parts.torso,
962
Part1 = R6parts.leftArm,
963
C0 = cf(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),
964
C1 = cf(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
965
},
966
rightHip = {
967
Parent = R6parts.torso,
968
Name = "Right Hip",
969
Part0 = R6parts.torso,
970
Part1 = R6parts.rightLeg,
971
C0 = cf(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),
972
C1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
973
},
974
leftHip = {
975
Parent = R6parts.torso,
976
Name = "Left Hip" ,
977
Part0 = R6parts.torso,
978
Part1 = R6parts.leftLeg,
979
C0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),
980
C1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
981
}
982
}
983
for i, v in pairs(R6joints) do
984
local joint = Instance.new("Motor6D")
985
for prop, val in pairs(v) do
986
joint[prop] = val
987
end
988
R6joints[i] = joint
989
end
990
hum1.RigType = Enum.HumanoidRigType.R6
991
hum1.HipHeight = 0
992
end
993
end
994
995
--fling function
996
--usage: fling([part or CFrame or Vector3], [fling duration (seconds)], [rotation velocity (Vector3)])
997
998
local flingpart0 = gp(model, flingpart, "BasePart")
999
local flingpart1 = gp(c, flingpart, "BasePart")
1000
1001
local fling = function() end
1002
if flingpart0 and flingpart1 then
1003
flingpart0.Destroying:Connect(function()
1004
flingpart0 = nil
1005
fling = function() end
1006
end)
1007
flingpart1.Destroying:Connect(function()
1008
flingpart1 = nil
1009
fling = function() end
1010
end)
1011
--flingpart1.Archivable = true
1012
local att0 = gp(flingpart0, "att0_" .. flingpart0.Name, "Attachment")
1013
local att1 = gp(flingpart1, "att1_" .. flingpart1.Name, "Attachment")
1014
if att0 and att1 then
1015
fling = function(target, duration, rotVelocity)
1016
if (typeof(target) == "Instance" and target:IsA("BasePart")) or (typeof(target) == "CFrame") then
1017
target = target.Position
1018
elseif typeof(target) ~= "Vector3" then
1019
return
1020
end
1021
if type(duration) ~= number then
1022
duration = tonumber(duration) or 0.5
1023
end
1024
if typeof(rotVelocity) ~= "Vector3" then
1025
rotVelocity = v3(20000, 20000, 20000)
1026
end
1027
if not (target and flingpart0 and flingpart1 and att0 and att1) then
1028
return
1029
end
1030
local flingpart = flingpart0:Clone()
1031
flingpart.Transparency = 1
1032
flingpart.Size = v3(0.01, 0.01, 0.01)
1033
flingpart.CanCollide = false
1034
flingpart.Name = "flingpart_" .. flingpart0.Name
1035
flingpart.Anchored = true
1036
flingpart.Destroying:Connect(function()
1037
flingpart = nil
1038
end)
1039
flingpart.Parent = flingpart1
1040
if flingpart0.Transparency > 0.5 then
1041
flingpart0.Transparency = 0.5
1042
end
1043
att1.Parent = flingpart
1044
for i, v in pairs(att0:GetChildren()) do
1045
if v:IsA("AlignOrientation") then
1046
v.Enabled = false
1047
end
1048
end
1049
local con = nil
1050
con = heartbeat:Connect(function()
1051
if target and flingpart and flingpart0 and flingpart1 and att0 and att1 then
1052
flingpart0.RotVelocity = rotVelocity
1053
flingpart.Position = target
1054
else
1055
con:Disconnect()
1056
end
1057
end)
1058
local steppedRotVel = v3(
1059
((target.X > 0) and -1) or 1,
1060
((target.Y > 0) and -1) or 1,
1061
((target.Z > 0) and -1) or 1
1062
)
1063
local con = nil
1064
con = stepped:Connect(function()
1065
if target and flingpart and flingpart0 and flingpart1 and att0 and att1 then
1066
flingpart0.RotVelocity = steppedRotVel
1067
flingpart.Position = target
1068
else
1069
con:Disconnect()
1070
end
1071
end)
1072
wait(duration)
1073
target = nil
1074
if not (flingpart and flingpart0 and flingpart1 and att0 and att1) then
1075
return
1076
end
1077
flingpart0.RotVelocity = v3_0
1078
att1.Parent = flingpart1
1079
for i, v in pairs(att0:GetChildren()) do
1080
if v:IsA("AlignOrientation") then
1081
v.Enabled = true
1082
end
1083
end
1084
flingpart:Destroy()
1085
end
1086
end
1087
end
1088
end
1089
1090
--end of reanimate
1091
1092
local lp = game:GetService("Players").LocalPlayer
1093
1094
local ws = game:GetService("Workspace")
1095
1096
local c = lp.Character
1097
if not (c and c.Parent) then
1098
return print("character not found")
1099
end
1100
c:GetPropertyChangedSignal("Parent"):Connect(function()
1101
if not (c and c.Parent) then
1102
c = nil
1103
end
1104
end)
1105
1106
--getPart function
1107
1108
local function gp(parent, name, className)
1109
local ret = nil
1110
pcall(function()
1111
for i, v in pairs(parent:GetChildren()) do
1112
if (v.Name == name) and v:IsA(className) then
1113
ret = v
1114
break
1115
end
1116
end
1117
end)
1118
return ret
1119
end
1120
1121
--check if reanimate loaded
1122
1123
local model = gp(c, "Model", "Model")
1124
if not model then return print("model not found") end
1125
1126
--find body parts
1127
1128
local head = gp(c, "Head", "BasePart")
1129
if not head then return print("head not found") end
1130
1131
local torso = gp(c, "Torso", "BasePart")
1132
if not torso then return print("torso not found") end
1133
1134
local humanoidRootPart = gp(c, "HumanoidRootPart", "BasePart")
1135
if not humanoidRootPart then return print("humanoid root part not found") end
1136
1137
local leftArm = gp(c, "Left Arm", "BasePart")
1138
if not leftArm then return print("left arm not found") end
1139
1140
local rightArm = gp(c, "Right Arm", "BasePart")
1141
if not rightArm then return print("right arm not found") end
1142
1143
local leftLeg = gp(c, "Left Leg", "BasePart")
1144
if not leftLeg then return print("left leg not found") end
1145
1146
local rightLeg = gp(c, "Right Leg", "BasePart")
1147
if not rightLeg then return print("right leg not found") end
1148
1149
--find rig joints
1150
1151
local neck = gp(torso, "Neck", "Motor6D")
1152
if not neck then return print("neck not found") end
1153
1154
local rootJoint = gp(humanoidRootPart, "RootJoint", "Motor6D")
1155
if not rootJoint then return print("root joint not found") end
1156
1157
local leftShoulder = gp(torso, "Left Shoulder", "Motor6D")
1158
if not leftShoulder then return print("left shoulder not found") end
1159
1160
local rightShoulder = gp(torso, "Right Shoulder", "Motor6D")
1161
if not rightShoulder then return print("right shoulder not found") end
1162
1163
local leftHip = gp(torso, "Left Hip", "Motor6D")
1164
if not leftHip then return print("left hip not found") end
1165
1166
local rightHip = gp(torso, "Right Hip", "Motor6D")
1167
if not rightHip then return print("right hip not found") end
1168
1169
--humanoid
1170
1171
local hum = c:FindFirstChildOfClass("Humanoid")
1172
if not hum then return print("humanoid not found") end
1173
1174
local animate = gp(c, "Animate", "LocalScript")
1175
if animate then
1176
animate.Disabled = true
1177
end
1178
1179
for i, v in pairs(hum:GetPlayingAnimationTracks()) do
1180
v:Stop()
1181
end
1182
1183
--60 fps
1184
1185
local fps = 60
1186
local event = Instance.new("BindableEvent", c)
1187
event.Name = "60 fps"
1188
local floor = math.floor
1189
fps = 1 / fps
1190
local tf = 0
1191
local con = nil
1192
con = game:GetService("RunService").RenderStepped:Connect(function(s)
1193
if not c then
1194
con:Disconnect()
1195
return
1196
end
1197
tf += s
1198
if tf >= fps then
1199
for i=1, floor(tf / fps) do
1200
event:Fire(c)
1201
end
1202
tf = 0
1203
end
1204
end)
1205
local event = event.Event
1206
1207
local function stopIfRemoved(instance)
1208
if not (instance and instance.Parent) then
1209
c = nil
1210
return
1211
end
1212
instance:GetPropertyChangedSignal("Parent"):Connect(function()
1213
if not (instance and instance.Parent) then
1214
c = nil
1215
end
1216
end)
1217
end
1218
stopIfRemoved(c)
1219
stopIfRemoved(hum)
1220
for i, v in pairs({head, torso, leftArm, rightArm, leftLeg, rightLeg, humanoidRootPart}) do
1221
stopIfRemoved(v)
1222
end
1223
for i, v in pairs({neck, rootJoint, leftShoulder, rightShoulder, leftHip, rightHip}) do
1224
stopIfRemoved(v)
1225
end
1226
if not c then
1227
return
1228
end
1229
uis = game:GetService("UserInputService")
1230
local flying = false
1231
uis.InputBegan:Connect(function(keycode)
1232
if uis:GetFocusedTextBox() then
1233
return
1234
end
1235
keycode = keycode.KeyCode
1236
if keycode == Enum.KeyCode.F then
1237
flying = not flying
1238
end
1239
end)
1240
hum.WalkSpeed = 50
1241
hum.HipHeight = 5
1242
hum.JumpPower = 0
1243
hum.CameraOffset = Vector3.new(0, -3, 0)
1244
local flyspeed = 1
1245
local cf, v3, euler, sin, sine = CFrame.new, Vector3.new, CFrame.fromEulerAnglesXYZ, math.sin, 0
1246
while event:Wait() do
1247
sine += 1
1248
hum.PlatformStand = flying
1249
humanoidRootPart.Anchored = flying
1250
if flying then
1251
humanoidRootPart.Velocity = v3(0, 0, 0)
1252
local flycf = humanoidRootPart.CFrame
1253
local fb = ((uis:IsKeyDown("W") and flyspeed) or 0) + ((uis:IsKeyDown("S") and -flyspeed) or 0)
1254
local lr = ((uis:IsKeyDown("A") and -flyspeed) or 0) + ((uis:IsKeyDown("D") and flyspeed) or 0)
1255
local camcf = ws.CurrentCamera.CFrame
1256
flycf += camcf.lookVector * fb
1257
flycf += camcf.rightVector * lr
1258
humanoidRootPart.CFrame = flycf
1259
end
1260
if humanoidRootPart.Velocity.Y < -20 then
1261
humanoidRootPart.Velocity = v3(0, -20, 0)
1262
end
1263
if humanoidRootPart.Velocity.Magnitude > 1 then -- walk
1264
neck.C0 = neck.C0:Lerp(cf(0, 1, 0) * euler(-1.2217304763960306, 0.17453292519943295 * sin(sine * 0.025), -3.1590459461097367), 0.2)
1265
rootJoint.C0 = rootJoint.C0:Lerp(cf(0, -2 + 0.5 * sin(sine * 0.05), 2) * euler(-2.443460952792061 + -0.08726646259971647 * sin((sine + 10) * 0.05), 0.05235987755982989 * sin(sine * 0.025), -3.1590459461097367 + -0.08726646259971647 * sin(sine * 0.025)), 0.2)
1266
leftShoulder.C0 = leftShoulder.C0:Lerp(cf(-1, 0.5, 0) * euler(-0.12217304763960307 * sin((sine + 25) * 0.05), -1.5882496193148399 + -0.17453292519943295 * sin((sine + 20) * 0.05), -2.0943951023931953), 0.2)
1267
rightShoulder.C0 = rightShoulder.C0:Lerp(cf(1, 0.5, 0) * euler(-0.12217304763960307 * sin((sine + 25) * 0.05), 1.5707963267948966 + 0.17453292519943295 * sin((sine + 20) * 0.05), 2.0943951023931953), 0.2)
1268
leftHip.C0 = leftHip.C0:Lerp(cf(-1, -1, 0) * euler(0, -1.5882496193148399, 0.3490658503988659 + -0.17453292519943295 * sin((sine + 30) * 0.05)), 0.2)
1269
rightHip.C0 = rightHip.C0:Lerp(cf(1, -1, 0) * euler(0, 1.5707963267948966, -0.3490658503988659 + 0.17453292519943295 * sin((sine + 40) * 0.05)), 0.2)
1270
else
1271
neck.C0 = neck.C0:Lerp(cf(0, 1, 0) * euler(-2.0943951023931953 + -0.2617993877991494 * sin((sine + 20) * 0.05), 0.3490658503988659 * sin(sine * 0.025), -3.1590459461097367), 0.2)
1272
rootJoint.C0 = rootJoint.C0:Lerp(cf(0, -2 + 1 * sin(sine * 0.05), 0) * euler(-2.792526803190927 + -0.08726646259971647 * sin((sine + 10) * 0.05), 0.05235987755982989 * sin(sine * 0.025), -3.1590459461097367 + -0.08726646259971647 * sin(sine * 0.025)), 0.2)
1273
leftShoulder.C0 = leftShoulder.C0:Lerp(cf(-1, 0.5, 0) * euler(-0.12217304763960307 * sin((sine + 25) * 0.05), -1.5882496193148399 + -0.17453292519943295 * sin((sine + 20) * 0.05), -1.2217304763960306), 0.2)
1274
rightShoulder.C0 = rightShoulder.C0:Lerp(cf(1, 0.5, 0) * euler(-0.12217304763960307 * sin((sine + 25) * 0.05), 1.5707963267948966 + 0.17453292519943295 * sin((sine + 20) * 0.05), 1.2217304763960306), 0.2)
1275
leftHip.C0 = leftHip.C0:Lerp(cf(-1, -1, 0) * euler(0, -1.5882496193148399, -1.2217304763960306 + -0.17453292519943295 * sin((sine + 30) * 0.05)), 0.2)
1276
rightHip.C0 = rightHip.C0:Lerp(cf(1, -1, 0) * euler(0, 1.5707963267948966, 1.2217304763960306 + 0.17453292519943295 * sin((sine + 40) * 0.05)), 0.2)
1277
end
1278
end