Run it
Copy the script and paste it into your executor.
Players = :()
RunService = :()
CollectionService = :()
player = Players.LocalPlayer
rng = Random.()
MODEL_ID =
LIFE_TIME = *
GROWTH_TIME = *
START_SIZE =
FINAL_SIZE =
SPAWN_DISTANCE =
STOP_DISTANCE =
FOLLOW_RESUME_DISTANCE =
WALK_SPEED =
RUN_SPEED =
RUN_DISTANCE =
TOO_FAR_DISTANCE =
JUMP_POWER =
RECOVERY_JUMP_POWER =
JUMP_COOLDOWN =
MAX_JUMP_TIME =
LANDING_BUFFER =
JUMP_ANIMATION_TIME =
WALL_CHECK_DISTANCE =
WALL_SCRATCH_DISTANCE =
WALL_SCRATCH_CHANCE =
WALL_SCRATCH_MIN_TIME =
WALL_SCRATCH_MAX_TIME =
WALL_SCRATCH_COOLDOWN =
SMELL_CHANCE =
GROOM_CHANCE =
PAW_CHANCE =
STRETCH_CHANCE =
WATCH_CHANCE =
PLAY_CHANCE =
ZOOMIE_CHANCE =
EXPLORE_CHANCE =
FOOD_SEARCH_CHANCE =
WATER_CHANCE =
CHASE_CHANCE =
SIT_CHANCE =
SLEEP_CHANCE =
LOAF_CHANCE =
SIT_MIN_TIME =
SIT_MAX_TIME =
SLEEP_MIN_TIME =
SLEEP_MAX_TIME =
LOAF_MIN_TIME =
LOAF_MAX_TIME =
SLEEP_HEAD_DROP = .()
LOAF_FRONT_TUCK = .()
LOAF_BACK_TUCK = .()
FOOD_SEARCH_RADIUS =
WATER_SEARCH_RADIUS =
CHASE_RADIUS =
PET_TIME =
PET_COOLDOWN =
PET_TOUCH_DISTANCE =
RANDOM_SOUND_ID =
MIN_SOUND_DELAY =
MAX_SOUND_DELAY =
RAGDOLL_ON_DEATH =
HIGH_SPEED_IMPACT =
HIGH_FALL_DISTANCE =
character = player.Character player.CharacterAdded:()
playerRoot = character:()
objects = :(MODEL_ID)
objects objects[]
()
rig = objects[]
rig.Parent =
humanoid = rig:()
rigRoot = rig:()
humanoid rigRoot
()
rig:()
birthTime = ()
currentScale = START_SIZE
catIsDead =
deathProcessed =
deathCause =
humanoid.BreakJointsOnDeath =
humanoid.RequiresNeck =
humanoid.UseJumpPower =
humanoid.JumpPower = JUMP_POWER
humanoid.WalkSpeed = WALK_SPEED
humanoid.AutoRotate =
(()
humanoid:(.HumanoidStateType.Seated, )
)
()
_, obj (rig:())
obj:()
obj.Anchored =
obj.CanCollide =
obj.CanTouch =
obj.CanQuery =
obj.Massless =
(()
obj.CollisionGroup =
)
()
rig:(playerRoot.CFrame * .(, , -SPAWN_DISTANCE))
(()
rig:(START_SIZE)
)
animator = humanoid:()
animator
animator = .()
animator.Parent = humanoid
walkAnimation = .()
walkAnimation.AnimationId =
humanoid.RigType == .HumanoidRigType.R15
walkTrack
(()
walkTrack = animator:(walkAnimation)
)
walkTrack
walkTrack.Looped =
walkTrack.Priority = .AnimationPriority.Movement
sound = .()
sound.Name =
sound.SoundId = RANDOM_SOUND_ID
sound.Volume =
sound.RollOffMinDistance =
sound.RollOffMaxDistance =
sound.Parent = rigRoot
scratchSound = .()
scratchSound.Name =
scratchSound.SoundId = RANDOM_SOUND_ID
scratchSound.Volume =
scratchSound.PlaybackSpeed =
scratchSound.RollOffMinDistance =
scratchSound.RollOffMaxDistance =
scratchSound.Parent = rigRoot
petting =
petUntil =
lastPetTouch = -.huge
petConnectionList = {}
()
_, connection (petConnectionList)
connection
connection:()
.(petConnectionList)
rayParams = RaycastParams.()
rayParams.FilterType = .RaycastFilterType.Exclude
rayParams.FilterDescendantsInstances = {rig, character}
rayParams.IgnoreWater =
(...)
names = {...}
_, obj (rig:())
obj:()
_, wanted (names)
obj.Name:() == wanted:()
obj
_, obj (rig:())
obj:()
lower = obj.Name:()
_, wanted (names)
.(lower, wanted:(), , )
obj
leftShoulder = (, , )
rightShoulder = (, , )
leftHip = (, , )
rightHip = (, , )
neck = ()
joints = {leftShoulder, rightShoulder, leftHip, rightHip, neck}
originalTransforms = {}
_, joint (joints)
joint
originalTransforms[joint] = joint.Transform
(joint, offset, weight)
joint
original = originalTransforms[joint] .identity
joint.Transform = original:(original * offset, weight )
()
joint, original (originalTransforms)
joint joint.Parent
joint.Transform = original
state =
stateUntil =
targetPosition =
behaviorTarget =
randomDirection =
jumping =
jumpStartedAt =
jumpEndTime =
lastJumpTime = -.huge
scratching =
scratchUntil =
scratchNormal =
scratchWallPosition =
lastScratchTime = -.huge
resting =
restUntil =
recovering =
recoveryUntil =
lastPosition = rigRoot.Position
stuckTimer =
()
walkTrack walkTrack.IsPlaying
walkTrack:()
()
walkTrack walkTrack.IsPlaying
walkTrack:()
()
humanoid.Sit
humanoid.Sit =
humanoid:() == .HumanoidStateType.Seated
humanoid:(.HumanoidStateType.GettingUp)
()
humanoid.FloorMaterial ~= .Material.Air
result = :(
rigRoot.Position + .(, , ),
.(, -, ),
rayParams
)
result ~=
(direction, distance)
flat = .(direction.X, , direction.Z)
flat.Magnitude <
:(
rigRoot.Position + .(, , ),
flat.Unit * distance,
rayParams
)
()
jumping catIsDead
elapsed = () - jumpStartedAt
progress = .(elapsed / JUMP_ANIMATION_TIME, , )
tuck = .(progress * .pi)
frontAngle = .(-) - .() * tuck
backAngle = .() + .() * tuck
(leftShoulder,
.(frontAngle, , .(-)), )
(rightShoulder,
.(frontAngle, , .()), )
(leftHip,
.(backAngle, , ), )
(rightHip,
.(backAngle, , ), )
neck
(neck,
.(.(-) - .() * tuck, , ), )
()
catIsDead
started = ()
.(()
rig.Parent catIsDead () - started <
a = .((() - started) / , , )
squash = .(a * .pi)
(leftShoulder,
.(.() * squash, , .(-) * squash), )
(rightShoulder,
.(.() * squash, , .() * squash), )
(leftHip,
.(.(-) * squash, , ), )
(rightHip,
.(.(-) * squash, , ), )
RunService.Heartbeat:()
()
)
(force)
catIsDead petting jumping humanoid.Health <=
() - lastJumpTime < JUMP_COOLDOWN
force ()
()
jumping =
jumpStartedAt = ()
jumpEndTime = () + MAX_JUMP_TIME
lastJumpTime = ()
()
humanoid.JumpPower = force RECOVERY_JUMP_POWER JUMP_POWER
humanoid.Jump =
humanoid:(.HumanoidStateType.Jumping)
()
()
jumping
()
now = ()
() now - jumpStartedAt > LANDING_BUFFER
jumping =
humanoid.JumpPower = JUMP_POWER
()
now >= jumpEndTime
jumping =
humanoid.JumpPower = JUMP_POWER
()
humanoid:(humanoid.MoveDirection, )
(part)
part part:()
part:(rig) part:(character)
part.Transparency >= part.CanCollide
CollectionService:(part, )
n = part.Name:()
.(n, , , ) ~=
.(n, , , ) ~=
.(n, , , ) ~=
.(n, , , ) ~=
.(n, , , ) ~=
.(n, , , ) ~=
()
forward = rigRoot.CFrame.LookVector
hit = (forward, WALL_SCRATCH_DISTANCE)
hit (hit.Instance)
hit
right = rigRoot.CFrame.RightVector
_, dir ({
(forward + right * ).Unit,
(forward - right * ).Unit
})
sideHit = (dir, WALL_SCRATCH_DISTANCE)
sideHit (sideHit.Instance)
sideHit
(hit)
scratching jumping petting catIsDead
() - lastScratchTime < WALL_SCRATCH_COOLDOWN
hit hit.Instance
scratching =
lastScratchTime = ()
scratchUntil = () + rng:(WALL_SCRATCH_MIN_TIME, WALL_SCRATCH_MAX_TIME)
scratchWallPosition = hit.Position
scratchNormal = hit.Normal
state =
()
humanoid:(.zero, )
humanoid.WalkSpeed =
humanoid.AutoRotate =
p = rigRoot.Position
target = .(hit.Position.X, p.Y, hit.Position.Z)
(target - p).Magnitude >
rigRoot.CFrame = .(p, target)
()
scratching
()
humanoid:(.zero, )
scratchWallPosition
p = rigRoot.Position
target = .(scratchWallPosition.X, p.Y, scratchWallPosition.Z)
(target - p).Magnitude >
rigRoot.CFrame = .(p, target)
now = ()
phase = .(now * )
paw = .() * phase
(leftShoulder,
.(.(-) + paw, , .(-)), )
(rightShoulder,
.(.(-) - paw, , .()), )
neck
(neck,
.(.(), .(now * ) * .(), ), )
scratchSound.IsPlaying .(phase) >
scratchSound:()
now >= scratchUntil
scratching =
scratchWallPosition =
scratchNormal =
humanoid.AutoRotate =
humanoid.WalkSpeed = WALK_SPEED
()
state =
stateUntil = now +
()
catIsDead resting
now = ()
state ==
breathe = .(now * ) * .()
(leftHip,
.(.(-), , .(-)), )
(rightHip,
.(.(-), , .()), )
(leftShoulder,
.(.() + breathe, , .(-)), )
(rightShoulder,
.(.() - breathe, , .()), )
(neck,
.(.(-), .(now * ) * .(), ), )
state ==
breathe = .(now * ) * .()
(leftShoulder,
.(LOAF_FRONT_TUCK + breathe, , .(-)), )
(rightShoulder,
.(LOAF_FRONT_TUCK - breathe, , .()), )
(leftHip,
.(LOAF_BACK_TUCK, , .(-)), )
(rightHip,
.(LOAF_BACK_TUCK, , .()), )
(neck,
.(.(), , ), )
state ==
breathe = .(now * ) * .()
tinyHead = .(now * ) * .()
(leftShoulder,
.(.() + breathe, , .(-)), )
(rightShoulder,
.(.() - breathe, , .()), )
(leftHip,
.(.(), , .(-)), )
(rightHip,
.(.(), , .()), )
(neck,
.(SLEEP_HEAD_DROP + tinyHead, , ), )
()
catIsDead scratching
resting jumping
()
jumping
()
now = ()
state ==
state ==
state ==
state ==
speed = (state == state == )
amount = (state == state == )
.()
.()
swing = .(now * speed) * amount
(leftShoulder, .(swing, , ), )
(rightShoulder, .(-swing, , ), )
(leftHip, .(-swing, , ), )
(rightHip, .(swing, , ), )
state ==
paw = .(now * ) * .()
(leftShoulder,
.(.(-) + paw, .(), .(-)), )
(neck,
.(.(), .(now * ) * .(), ), )
state ==
paw = .(now * ) * .()
(leftShoulder,
.(.(-) + paw, , .(-)), )
(rightShoulder,
.(.(-) - paw, , .()), )
state ==
s = .((now % ) / * .pi)
(leftShoulder,
.(.(-) * s, , ), )
(rightShoulder,
.(.(-) * s, , ), )
(leftHip,
.(.() * s, , ), )
(rightHip,
.(.() * s, , ), )
state ==
state ==
state ==
sniff = .(now * ) * .()
(neck,
.(.(-), , ), )
(leftShoulder,
.(sniff, , .(-)), )
(rightShoulder,
.(-sniff, , .()), )
state ==
(neck,
.(.() + .(now * ) * .(), , ), )
state ==
(neck,
.(.() + .(now * ) * .(), , ), )
state == state ==
(neck,
.(.(-), .(now * ) * .(), ), )
state ==
bounce = .(now * ) * .()
(leftShoulder,
.(bounce, , .(-)), )
(rightShoulder,
.(-bounce, , .()), )
state ==
t = .(PET_TIME - .(petUntil - now, ), , PET_TIME)
cycle = t *
sway = .(cycle) * .()
headNod = .(cycle * ) * .()
leftPet = .(, .(cycle * ))
rightPet = .(, .(cycle * + .pi))
leftPawAngle = .(-) - leftPet * .()
rightPawAngle = .(-) - rightPet * .()
(leftShoulder,
.(leftPawAngle, sway * , .(-)), )
(rightShoulder,
.(rightPawAngle, -sway * , .()), )
(neck,
.(headNod, sway, ), )
breathe = .(now * ) * .()
(leftShoulder,
.(breathe, , ), )
(rightShoulder,
.(-breathe, , ), )
(direction, speed)
catIsDead jumping petting scratching resting
flat = .(direction.X, , direction.Z)
flat.Magnitude <
flat = flat.Unit
wallHit = (flat, WALL_CHECK_DISTANCE)
wallHit
(wallHit.Instance)
rng:() < WALL_SCRATCH_CHANCE
() - lastScratchTime >= WALL_SCRATCH_COOLDOWN
(wallHit)
forwardHit = (flat, WALL_CHECK_DISTANCE)
forwardHit
right = .(-flat.Z, , flat.X)
left = -right
leftHit = (left, )
rightHit = (right, )
leftHit
flat = (flat * + left * ).Unit
rightHit
flat = (flat * + right * ).Unit
()
()
humanoid.WalkSpeed = speed
humanoid:(flat, )
()
()
jumping
humanoid:(.zero, )
()
()
(position)
jumping petting scratching resting
p = rigRoot.Position
target = .(position.X, p.Y, position.Z)
(target - p).Magnitude >
rigRoot.CFrame = .(p, target)
()
jumping petting scratching resting
state =
()
humanoid.WalkSpeed =
stateUntil = () + rng:(, )
(name, minTime, maxTime)
jumping petting scratching resting
state = name
()
humanoid.WalkSpeed =
stateUntil = () + rng:(minTime, maxTime)
()
(, , )
()
(, , )
()
(, , )
()
(, , )
()
(, , )
(radius, names)
closest
closestDistance = radius
_, obj (:())
obj:()
obj:(rig)
obj:(character)
n = obj.Name:()
_, wanted (names)
.(n, wanted, , )
d = (obj.Position - rigRoot.Position).Magnitude
d < closestDistance
closest = obj
closestDistance = d
closest
()
food = (
FOOD_SEARCH_RADIUS,
{, , , }
)
food
behaviorTarget = food
state =
stateUntil = () +
()
water = (
WATER_SEARCH_RADIUS,
{, , }
)
water
behaviorTarget = water
state =
stateUntil = () +
()
behaviorTarget behaviorTarget.Parent
()
d = (behaviorTarget.Position - rigRoot.Position).Magnitude
d <=
()
state =
stateUntil = () + rng:(, )
() >= stateUntil
()
(
behaviorTarget.Position - rigRoot.Position,
WALK_SPEED
)
()
behaviorTarget behaviorTarget.Parent
(behaviorTarget.Position)
()
() >= stateUntil
behaviorTarget =
()
()
behaviorTarget behaviorTarget.Parent
()
d = (behaviorTarget.Position - rigRoot.Position).Magnitude
d <=
()
state =
stateUntil = () + rng:(, )
() >= stateUntil
()
(
behaviorTarget.Position - rigRoot.Position,
WALK_SPEED *
)
()
behaviorTarget behaviorTarget.Parent
(behaviorTarget.Position)
()
() >= stateUntil
behaviorTarget =
()
()
d = .(
rng:(-, ),
,
rng:(-, )
)
d.Magnitude <
d = rigRoot.CFrame.LookVector
.(d.X, , d.Z).Unit
()
state =
randomDirection = ()
stateUntil = () + rng:(, )
()
state =
randomDirection = ()
stateUntil = () + rng:(, )
()
angle = rng:(, .pi * )
distance = rng:(, )
desired =
playerRoot.Position
+ .(
.(angle) * distance,
,
.(angle) * distance
)
ground = :(
desired + .(, , ),
.(, -, ),
rayParams
)
ground
ground.Position + .(, , )
desired
()
state =
targetPosition = ()
stateUntil = () +
(playerPosition)
(rigRoot.Position - playerPosition).Magnitude > FOLLOW_RESUME_DISTANCE
state =
targetPosition =
targetPosition
()
d = targetPosition - rigRoot.Position
d = .(d.X, , d.Z)
d.Magnitude < () >= stateUntil
targetPosition =
()
(d, WALK_SPEED * )
()
closest
best = CHASE_RADIUS
_, obj (:())
obj:() obj:(rig)
v = obj.AssemblyLinearVelocity
v.Magnitude >
d = (obj.Position - rigRoot.Position).Magnitude
d < best
best = d
closest = obj
closest
()
target = ()
target
behaviorTarget = target
state =
stateUntil = () + rng:(, )
()
behaviorTarget
behaviorTarget.Parent
() >= stateUntil
behaviorTarget =
()
(
behaviorTarget.Position - rigRoot.Position,
RUN_SPEED
)
()
resting =
restUntil =
()
catIsDead
humanoid.AutoRotate =
humanoid.WalkSpeed = WALK_SPEED
()
catIsDead petting scratching jumping
resting =
state =
restUntil = () + rng:(SIT_MIN_TIME, SIT_MAX_TIME)
()
humanoid.WalkSpeed =
humanoid.AutoRotate =
()
()
catIsDead petting scratching jumping
resting =
state =
restUntil = () + rng:(LOAF_MIN_TIME, LOAF_MAX_TIME)
()
humanoid.WalkSpeed =
humanoid.AutoRotate =
()
()
catIsDead petting scratching jumping
resting =
state =
restUntil = () + rng:(SLEEP_MIN_TIME, SLEEP_MAX_TIME)
()
humanoid.WalkSpeed =
humanoid.AutoRotate =
()
(playerPosition)
resting
humanoid:(.zero, )
humanoid.WalkSpeed =
distance = (rigRoot.Position - playerPosition).Magnitude
distance > FOLLOW_RESUME_DISTANCE *
()
state =
() >= restUntil
()
state =
stateUntil = () + rng:(, )
()
catIsDead petting scratching jumping
(playerRoot.Position - rigRoot.Position).Magnitude > PET_TOUCH_DISTANCE
resting
()
petting =
petUntil = () + PET_TIME
state =
()
humanoid.WalkSpeed =
humanoid.AutoRotate =
()
(hit)
catIsDead hit
hitCharacter = hit:()
hitCharacter ~= character
playerRoot playerRoot.Parent
(playerRoot.Position - rigRoot.Position).Magnitude > PET_TOUCH_DISTANCE
now = ()
now - lastPetTouch < PET_COOLDOWN
lastPetTouch = now
()
(part)
part:()
.(
petConnectionList,
part.Touched:(onCatTouched)
)
_, obj (rig:())
(obj)
rig.DescendantAdded:((obj)
(obj)
)
()
petting
humanoid:(.zero, )
humanoid.WalkSpeed =
playerRoot playerRoot.Parent
distance = (playerRoot.Position - rigRoot.Position).Magnitude
distance > PET_TOUCH_DISTANCE *
() < petUntil
petUntil = .(
petUntil,
() +
)
() >= petUntil
petting =
humanoid.AutoRotate =
humanoid.WalkSpeed = WALK_SPEED
()
state =
stateUntil = () +
()
catIsDead petting scratching resting
rng:() < FOOD_SEARCH_CHANCE ()
rng:() < WATER_CHANCE ()
rng:() < CHASE_CHANCE ()
restRoll = rng:()
restRoll < SLEEP_CHANCE
()
restRoll < SLEEP_CHANCE + LOAF_CHANCE
()
restRoll < SLEEP_CHANCE + LOAF_CHANCE + SIT_CHANCE
()
wall = ()
wall
rng:() < WALL_SCRATCH_CHANCE
(wall)
roll = rng:()
roll <
()
roll <
()
roll <
()
roll <
()
roll <
()
roll <
()
roll <
()
roll <
()
()
(dt, moving)
jumping petting scratching moving
stuckTimer =
lastPosition = rigRoot.Position
moved = (rigRoot.Position - lastPosition).Magnitude
moved <
stuckTimer += dt
stuckTimer =
lastPosition = rigRoot.Position
stuckTimer >=
stuckTimer =
recovering =
recoveryUntil = () +
()
()
highestFallY = rigRoot.Position.Y
wasAirborne =
()
catIsDead
velocity = rigRoot.AssemblyLinearVelocity
velocity.Magnitude >= HIGH_SPEED_IMPACT
deathCause =
()
wasAirborne
wasAirborne =
highestFallY = rigRoot.Position.Y
highestFallY = .(
highestFallY,
rigRoot.Position.Y
)
wasAirborne
highestFallY - rigRoot.Position.Y >= HIGH_FALL_DISTANCE
deathCause =
wasAirborne =
highestFallY = rigRoot.Position.Y
()
deathProcessed RAGDOLL_ON_DEATH
deathProcessed =
humanoid.AutoRotate =
humanoid.WalkSpeed =
humanoid.JumpPower =
humanoid.PlatformStand =
(()
humanoid:(.HumanoidStateType.Physics)
)
_, joint (rig:())
joint:()
joint.Part0
joint.Part1
a0 = .()
a0.CFrame = joint.C0
a0.Parent = joint.Part0
a1 = .()
a1.CFrame = joint.C1
a1.Parent = joint.Part1
socket = .()
socket.Attachment0 = a0
socket.Attachment1 = a1
socket.LimitsEnabled =
socket.UpperAngle =
socket.TwistLimitsEnabled =
socket.TwistLowerAngle = -
socket.TwistUpperAngle =
socket.Parent = joint.Part0
joint.Enabled =
()
( .. (deathCause))
()
catIsDead
age = () - birthTime
age >= LIFE_TIME
deathCause =
catIsDead =
state =
petting =
jumping =
scratching =
recovering =
resting =
()
humanoid:(.zero, )
humanoid.WalkSpeed =
humanoid.AutoRotate =
sound:()
.(()
started = ()
rig.Parent () - started <
a = .(
(() - started) / ,
,
)
(
leftShoulder,
.(
.() * a,
,
.(-) * a
),
)
(
rightShoulder,
.(
.() * a,
,
.() * a
),
)
(
neck,
.(.() * a, , ),
)
RunService.Heartbeat:()
rig.Parent
()
)
growthProgress = .(
age / GROWTH_TIME,
,
)
smooth =
growthProgress
* growthProgress
* ( - * growthProgress)
newScale =
START_SIZE
+ (FINAL_SIZE - START_SIZE) * smooth
.(newScale - currentScale) >
currentScale = newScale
(()
rig:(currentScale)
)
.(()
rig.Parent catIsDead
.(
rng:(
MIN_SOUND_DELAY,
MAX_SOUND_DELAY
)
)
rig.Parent catIsDead
sound:()
sound:()
)
RunService.Heartbeat:((dt)
rig.Parent catIsDead
character.Parent
playerRoot.Parent
humanoid.Health <=
()
catIsDead
()
jumping
()
()
()
petting
()
scratching
()
()
playerPosition = playerRoot.Position
distance =
(rigRoot.Position - playerPosition).Magnitude
resting
(playerPosition)
state ==
()
state ==
()
state ==
()
state ==
()
state ==
state ==
state ==
state ==
state ==
()
state ==
(playerPosition)
() >= stateUntil
()
distance > FOLLOW_RESUME_DISTANCE
state =
state ==
() >= stateUntil distance >
()
(randomDirection, RUN_SPEED)
(dt, )
state ==
() >= stateUntil distance >
()
(randomDirection, RUN_SPEED)
(dt, )
state ==
(playerPosition)
(dt, )
state ==
()
(dt, )
recovering
() < recoveryUntil
(
playerPosition - rigRoot.Position,
WALK_SPEED
)
(dt, )
recovering =
distance >= TOO_FAR_DISTANCE
state =
(
playerPosition - rigRoot.Position,
RUN_SPEED
)
(dt, )
state ==
distance <= RUN_DISTANCE
state =
humanoid.WalkSpeed = WALK_SPEED
(
playerPosition - rigRoot.Position,
RUN_SPEED
)
(dt, )
state ==
distance <= STOP_DISTANCE
()
humanoid.WalkSpeed =
(playerPosition)
rng:() <
()
(
playerPosition - rigRoot.Position,
WALK_SPEED
)
(dt, )
state ==
()
humanoid.WalkSpeed =
(playerPosition)
distance > FOLLOW_RESUME_DISTANCE
state =
humanoid.WalkSpeed = WALK_SPEED
() >= stateUntil
()
)
player.CharacterAdded:((newCharacter)
character = newCharacter
playerRoot = newCharacter:()
rayParams.FilterDescendantsInstances = {rig, character}
rig.Parent catIsDead
jumping =
petting =
scratching =
recovering =
resting =
behaviorTarget =
targetPosition =
rig:(
playerRoot.CFrame
* .(, , -SPAWN_DISTANCE)
)
state =
humanoid.JumpPower = JUMP_POWER
humanoid.WalkSpeed = WALK_SPEED
humanoid.AutoRotate =
()
()
)
humanoid.Died:(()
catIsDead
deathCause ==
rigRoot.AssemblyLinearVelocity.Magnitude >= HIGH_SPEED_IMPACT
deathCause =
deathCause =
catIsDead =
state =
jumping =
petting =
scratching =
recovering =
resting =
()
humanoid.WalkSpeed =
humanoid.JumpPower =
humanoid.AutoRotate =
sound:()
.(()
rig.Parent
()
)
( .. (deathCause))
)
.(()
rig.Parent catIsDead
.()
humanoid.Health <=
()
()
jumping
petting
scratching
resting
moving =
humanoid.MoveDirection.Magnitude >
velocity =
rigRoot.AssemblyLinearVelocity
moving
velocity.Magnitude <
()
()
)
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()Get a pet cat!

Universal