Run it
Copy the script and paste it into your executor.
plr = :().LocalPlayer
(Char)
Char:() ~=
Char.Animate.Disabled =
Char:()
i,v , Char.Humanoid:()
v:()
= Char.Animate
Character = Char
Humanoid = Character:()
pose =
UserGameSettings = ():()
userNoUpdateOnLoopSuccess, userNoUpdateOnLoopValue = (() ():() )
userNoUpdateOnLoop = userNoUpdateOnLoopSuccess userNoUpdateOnLoopValue
AnimationSpeedDampeningObject = :()
HumanoidHipHeight =
humanoidSpeed =
cachedRunningSpeed =
cachedLocalDirection = {x=, y=}
smallButNotZero =
runBlendtime =
lastLookVector = .(, , )
lastBlendTime =
WALK_SPEED =
RUN_SPEED =
EMOTE_TRANSITION_TIME =
currentAnim =
currentAnimInstance =
currentAnimTrack =
currentAnimKeyframeHandler =
currentAnimSpeed =
PreloadedAnims = {}
animTable = {}
animNames = {
idle = {
{ id = , weight = },
{ id = , weight = },
},
walk = {
{ id = , weight = }
},
run = {
{ id = , weight = }
},
jump = {
{ id = , weight = }
},
fall = {
{ id = , weight = }
},
climb = {
{ id = , weight = }
},
sit = {
{ id = , weight = }
},
toolnone = {
{ id = , weight = }
},
toolslash = {
{ id = , weight = }
},
toollunge = {
{ id = , weight = }
},
wave = {
{ id = , weight = }
},
point = {
{ id = , weight = }
},
dance = {
{ id = , weight = },
{ id = , weight = },
{ id = , weight = }
},
dance2 = {
{ id = , weight = },
{ id = , weight = },
{ id = , weight = }
},
dance3 = {
{ id = , weight = },
{ id = , weight = },
{ id = , weight = }
},
laugh = {
{ id = , weight = }
},
cheer = {
{ id = , weight = }
},
}
strafingLocomotionMap = {}
fallbackLocomotionMap = {}
locomotionMap = strafingLocomotionMap
emoteNames = { wave = , point = , dance = , dance2 = , dance3 = , laugh = , cheer = }
.(())
(set, anim)
set == anim ==
idx = , set.count,
set[idx].anim.AnimationId == anim.AnimationId
idx
(name, fileList)
(animTable[name] ~= )
_, connection (animTable[name].connections)
connection:()
animTable[name] = {}
animTable[name].count =
animTable[name].totalWeight =
animTable[name].connections = {}
name == name ==
speed = name == RUN_SPEED WALK_SPEED
fallbackLocomotionMap[name] = {lv=.(, speed), speed = speed}
locomotionMap = fallbackLocomotionMap
(animTable[name].count <= )
idx, anim (fileList)
animTable[name][idx] = {}
animTable[name][idx].anim = .()
animTable[name][idx].anim.Name = name
animTable[name][idx].anim.AnimationId = anim.id
animTable[name][idx].weight = anim.weight
animTable[name].count = animTable[name].count +
animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
i, animType (animTable)
idx = , animType.count,
PreloadedAnims[animType[idx].anim.AnimationId] ==
Humanoid:(animType[idx].anim)
PreloadedAnims[animType[idx].anim.AnimationId] =
(child)
fileList = animNames[child.Name]
(fileList ~= )
(child.Name, fileList)
child:()
animNames[child.Name] = {}
(child.Name, animNames[child.Name])
.ChildAdded:(scriptChildModified)
.ChildRemoved:(scriptChildModified)
animator = Humanoid Humanoid:()
animator
animTracks = animator:()
i,track (animTracks)
track:()
track:()
name, fileList (animNames)
(name, fileList)
_,child :()
child:() animNames[child.name]
animNames[child.Name] = {}
(child.Name, animNames[child.Name])
toolAnim =
toolAnimTime =
jumpAnimTime =
jumpAnimDuration =
toolTransitionTime =
fallTransitionTime =
currentlyPlayingEmote =
()
oldAnim = currentAnim
(emoteNames[oldAnim] ~= emoteNames[oldAnim] == )
oldAnim =
currentlyPlayingEmote
oldAnim =
currentlyPlayingEmote =
currentAnim =
currentAnimInstance =
(currentAnimKeyframeHandler ~= )
currentAnimKeyframeHandler:()
(currentAnimTrack ~= )
currentAnimTrack:()
currentAnimTrack:()
currentAnimTrack =
_,v (locomotionMap)
v.track
v.track:()
v.track:()
v.track =
oldAnim
()
Humanoid
Humanoid.AutomaticScalingEnabled
scale = Humanoid.HipHeight / HumanoidHipHeight
AnimationSpeedDampeningObject ==
AnimationSpeedDampeningObject = :()
AnimationSpeedDampeningObject ~=
scale = + (Humanoid.HipHeight - HumanoidHipHeight) * AnimationSpeedDampeningObject.Value / HumanoidHipHeight
scale
(a, b)
-.(a.x * b.y - a.y * b.x, a.x * b.x + a.y * b.y)
angleWeight =
(px, p1, p2, sx, s1, s2)
avgLength = * (s1 + s2)
p_1 = {x = (sx - s1)/avgLength, y = (angleWeight * (p1, px))}
p12 = {x = (s2 - s1)/avgLength, y = (angleWeight * (p1, p2))}
denom = smallButNotZero + (p12.x*p12.x + p12.y*p12.y)
numer = p_1.x * p12.x + p_1.y * p12.y
r = .( - numer/denom, , )
r
(targetVelo, targetSpeed)
h = {}
sum =
n,v1 (locomotionMap)
targetVelo.x * v1.lv.x < targetVelo.y * v1.lv.y <
h[n] =
h[n] = .huge
j,v2 (locomotionMap)
targetVelo.x * v2.lv.x < targetVelo.y * v2.lv.y <
h[n] = .(h[n], (targetVelo, v1.lv, v2.lv, targetSpeed, v1.speed, v2.speed))
sum += h[n]
sum2 =
weightedVeloX =
weightedVeloY =
n,v (locomotionMap)
(h[n] / sum > )
sum2 += h[n]
weightedVeloX += h[n] * v.lv.x
weightedVeloY += h[n] * v.lv.y
h[n] =
animSpeed
weightedSpeedSquared = weightedVeloX * weightedVeloX + weightedVeloY * weightedVeloY
weightedSpeedSquared > smallButNotZero
animSpeed = .(targetSpeed * targetSpeed / weightedSpeedSquared)
animSpeed =
animSpeed = animSpeed / ()
groupTimePosition =
n,v (locomotionMap)
v.track.IsPlaying
groupTimePosition = v.track.TimePosition
n,v (locomotionMap)
h[n] >
v.track.IsPlaying
v.track:(runBlendtime)
v.track.TimePosition = groupTimePosition
weight = .(smallButNotZero, h[n] / sum2)
v.track:(weight, runBlendtime)
v.track:(animSpeed)
v.track:(runBlendtime)
()
walkToPoint = Humanoid.WalkToPoint
walkToPart = Humanoid.WalkToPart
Humanoid.MoveDirection ~= .zero
Humanoid.MoveDirection
walkToPart walkToPoint ~= .zero
destination
walkToPart
destination = walkToPart.CFrame:(walkToPoint)
destination = walkToPoint
moveVector = .zero
Humanoid.RootPart
moveVector = destination - Humanoid.RootPart.CFrame.Position
moveVector = .(moveVector.x, , moveVector.z)
mag = moveVector.Magnitude
mag >
moveVector /= mag
moveVector
Humanoid.MoveDirection
(currentTime)
tempDir
locomotionMap == strafingLocomotionMap
moveDirection = ()
Humanoid.RootPart
cframe = Humanoid.RootPart.CFrame
.(cframe.UpVector.Y) < smallButNotZero pose ~= humanoidSpeed <
n,v (locomotionMap)
v.track
v.track:(smallButNotZero, runBlendtime)
lookat = cframe.LookVector
direction = .(lookat.X, , lookat.Z)
direction = direction / direction.Magnitude
ly = moveDirection:(direction)
ly <= ly > -
ly = smallButNotZero
lx = direction.X*moveDirection.Z - direction.Z*moveDirection.X
tempDir = .(lx, ly)
delta = .(tempDir.x-cachedLocalDirection.x, tempDir.y-cachedLocalDirection.y)
delta:(delta) > .(humanoidSpeed - cachedRunningSpeed) > currentTime - lastBlendTime >
cachedLocalDirection = tempDir
cachedRunningSpeed = humanoidSpeed
lastBlendTime = currentTime
(cachedLocalDirection, cachedRunningSpeed)
.(humanoidSpeed - cachedRunningSpeed) > currentTime - lastBlendTime >
cachedRunningSpeed = humanoidSpeed
lastBlendTime = currentTime
(.yAxis, cachedRunningSpeed)
(speed)
currentAnim ~=
speed ~= currentAnimSpeed
currentAnimSpeed = speed
currentAnimTrack:(currentAnimSpeed)
(frameName)
(frameName == )
repeatAnim = currentAnim
(emoteNames[repeatAnim] ~= emoteNames[repeatAnim] == )
repeatAnim =
currentlyPlayingEmote
currentAnimTrack.Looped
repeatAnim =
currentlyPlayingEmote =
animSpeed = currentAnimSpeed
(repeatAnim, , Humanoid)
(animSpeed)
(animName)
roll = .(, animTable[animName].totalWeight)
origRoll = roll
idx =
(roll > animTable[animName][idx].weight)
roll = roll - animTable[animName][idx].weight
idx = idx +
idx
maxVeloX, minVeloX, maxVeloY, minVeloY
()
_,v (strafingLocomotionMap)
v.track
v.track:()
v.track:()
v.track =
_,v (fallbackLocomotionMap)
v.track
v.track:()
v.track:()
v.track =
cachedRunningSpeed =
(velo)
minVeloX =
maxVeloX =
minVeloY =
maxVeloY =
(velo)
velo
velo.x > maxVeloX maxVeloX = velo.x
velo.y > maxVeloY maxVeloY = velo.y
velo.x < minVeloX minVeloX = velo.x
velo.y < minVeloY minVeloY = velo.y
(velo)
maxVeloX == minVeloX == maxVeloY == minVeloY ==
locomotionMap == strafingLocomotionMap
()
locomotionMap = fallbackLocomotionMap
locomotionMap = strafingLocomotionMap
(anim, animName, transitionTime, humanoid)
()
n,v (locomotionMap)
v.track = humanoid:(animTable[n][].anim)
v.track.Priority = .AnimationPriority.Core
(v.lv)
()
(anim, animName, transitionTime, humanoid)
(anim ~= currentAnimInstance)
(currentAnimTrack ~= )
currentAnimTrack:(transitionTime)
currentAnimTrack:()
(currentAnimKeyframeHandler ~= )
currentAnimKeyframeHandler:()
currentAnimSpeed =
currentAnim = animName
currentAnimInstance = anim
animName ==
(anim, animName, transitionTime, humanoid)
()
currentAnimTrack = humanoid:(anim)
currentAnimTrack.Priority = .AnimationPriority.Core
currentAnimTrack:(transitionTime)
currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:(keyFrameReachedFunc)
(animName, transitionTime, humanoid)
idx = (animName)
anim = animTable[animName][idx].anim
(anim, animName, transitionTime, humanoid)
currentlyPlayingEmote =
(emoteAnim, transitionTime, humanoid)
(emoteAnim, emoteAnim.Name, transitionTime, humanoid)
currentlyPlayingEmote =
toolAnimName =
toolAnimTrack =
toolAnimInstance =
currentToolAnimKeyframeHandler =
(frameName)
(frameName == )
(toolAnimName, , Humanoid)
(animName, transitionTime, humanoid, priority)
idx = (animName)
anim = animTable[animName][idx].anim
(toolAnimInstance ~= anim)
(toolAnimTrack ~= )
toolAnimTrack:()
toolAnimTrack:()
transitionTime =
toolAnimTrack = humanoid:(anim)
priority
toolAnimTrack.Priority = priority
toolAnimTrack:(transitionTime)
toolAnimName = animName
toolAnimInstance = anim
currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:(toolKeyFrameReachedFunc)
()
oldAnim = toolAnimName
(currentToolAnimKeyframeHandler ~= )
currentToolAnimKeyframeHandler:()
toolAnimName =
toolAnimInstance =
(toolAnimTrack ~= )
toolAnimTrack:()
toolAnimTrack:()
toolAnimTrack =
oldAnim
(speed)
movedDuringEmote = currentlyPlayingEmote Humanoid.MoveDirection == .(, , )
speedThreshold = movedDuringEmote Humanoid.WalkSpeed
humanoidSpeed = speed
speed > speedThreshold
(, , Humanoid)
pose ~=
pose =
()
emoteNames[currentAnim] == currentlyPlayingEmote
(, , Humanoid)
pose =
()
pose =
()
(, , Humanoid)
jumpAnimTime = jumpAnimDuration
pose =
(speed)
scale =
(, , Humanoid)
(speed / scale)
pose =
()
pose =
()
(jumpAnimTime <= )
(, fallTransitionTime, Humanoid)
pose =
()
pose =
()
pose =
()
pose =
(speed)
speed >
pose =
pose =
()
(toolAnim == )
(, toolTransitionTime, Humanoid, .AnimationPriority.Idle)
(toolAnim == )
(, , Humanoid, .AnimationPriority.Action)
(toolAnim == )
(, , Humanoid, .AnimationPriority.Action)
(tool)
_, c (tool:())
c.Name == c.className ==
c
lastTick =
(currentTime)
amplitude =
frequency =
deltaTime = currentTime - lastTick
lastTick = currentTime
climbFudge =
setAngles =
(jumpAnimTime > )
jumpAnimTime = jumpAnimTime - deltaTime
(pose == jumpAnimTime <= )
(, fallTransitionTime, Humanoid)
(pose == )
(, , Humanoid)
(pose == )
(, , Humanoid)
(currentTime)
(pose == pose == pose == pose == pose == )
()
amplitude =
frequency =
setAngles =
tool = Character:()
tool tool:()
animStringValueObject = (tool)
animStringValueObject
toolAnim = animStringValueObject.Value
animStringValueObject.Parent =
toolAnimTime = currentTime +
currentTime > toolAnimTime
toolAnimTime =
toolAnim =
()
()
toolAnim =
toolAnimInstance =
toolAnimTime =
Humanoid.Died:(onDied)
Humanoid.Running:(onRunning)
Humanoid.Jumping:(onJumping)
Humanoid.Climbing:(onClimbing)
Humanoid.GettingUp:(onGettingUp)
Humanoid.FreeFalling:(onFreeFall)
Humanoid.FallingDown:(onFallingDown)
Humanoid.Seated:(onSeated)
Humanoid.PlatformStanding:(onPlatformStanding)
Humanoid.Swimming:(onSwimming)
:().LocalPlayer.Chatted:((msg)
emote =
(.(msg, , ) == )
emote = .(msg, )
(.(msg, , ) == )
emote = .(msg, )
(pose == emoteNames[emote] ~= )
(emote, EMOTE_TRANSITION_TIME, Humanoid)
)
:().OnInvoke = (emote)
pose ~=
emoteNames[emote] ~=
(emote, EMOTE_TRANSITION_TIME, Humanoid)
, currentAnimTrack
(emote) == emote:()
(emote, EMOTE_TRANSITION_TIME, Humanoid)
, currentAnimTrack
Character.Parent ~=
(, , Humanoid)
pose =
.(()
Character.Parent ~=
_, currentGameTime = ()
(currentGameTime)
)
(plr.Character)
plr.CharacterAdded:((Char)
(Char)
)cool

Universal