Run it
Copy the script and paste it into your executor.
Players = :()
RunService = :()
CollectionService = :()
player = Players.LocalPlayer
random = Random.()
MODEL_ID =
LIFE_TIME = *
START_SIZE =
FINAL_SIZE =
birthTime = ()
currentScale = START_SIZE
catIsDead =
deathCause =
SPAWN_DISTANCE =
STOP_DISTANCE =
FOLLOW_RESUME_DISTANCE =
WALK_SPEED =
RUN_SPEED =
RUN_DISTANCE =
TOO_FAR_DISTANCE =
STUCK_CHECK_TIME =
STUCK_DISTANCE =
lastStuckPosition
stuckTimer =
RECOVERY_TIME =
recovering =
recoveryUntil =
OBSTACLE_CHECK_DISTANCE =
SIDE_CHECK_DISTANCE =
HARD_BLOCK_DISTANCE =
BLOCKCAST_SIZE =
.(, , )
turningAroundWall =
wallTurnDirection
wallTurnUntil =
NORMAL_JUMP_POWER =
RECOVERY_JUMP_POWER =
JUMP_COOLDOWN =
JUMP_CONTROL_TIME =
MAX_JUMP_TIME =
LANDING_BUFFER =
jumping =
jumpStartedAt =
jumpEndTime =
lastJumpTime =
SMELL_ENABLED =
SMELL_CHANCE =
SMELL_MIN_TIME =
SMELL_MAX_TIME =
GROOM_ENABLED =
GROOM_CHANCE =
GROOM_MIN_TIME =
GROOM_MAX_TIME =
PAW_ENABLED =
PAW_CHANCE =
PAW_MIN_TIME =
PAW_MAX_TIME =
STRETCH_ENABLED =
STRETCH_CHANCE =
STRETCH_MIN_TIME =
STRETCH_MAX_TIME =
WATCH_ENABLED =
WATCH_CHANCE =
WATCH_MIN_TIME =
WATCH_MAX_TIME =
PLAY_ENABLED =
PLAY_CHANCE =
PLAY_MIN_TIME =
PLAY_MAX_TIME =
RANDOM_RUN_ENABLED =
RANDOM_RUN_CHANCE =
RANDOM_RUN_MIN_TIME =
RANDOM_RUN_MAX_TIME =
EXPLORE_ENABLED =
EXPLORE_CHANCE =
EXPLORE_MIN_DISTANCE =
EXPLORE_MAX_DISTANCE =
EXPLORE_WAIT_MIN =
EXPLORE_WAIT_MAX =
EXPLORE_TIMEOUT =
FOOD_ENABLED =
FOOD_SEARCH_CHANCE =
FOOD_EAT_TIME_MIN =
FOOD_EAT_TIME_MAX =
FOOD_SEARCH_RADIUS =
FOOD_DETECT_DISTANCE =
WATER_ENABLED =
WATER_CHANCE =
WATER_DRINK_TIME_MIN =
WATER_DRINK_TIME_MAX =
WATER_SEARCH_RADIUS =
CHASE_ENABLED =
CHASE_CHANCE =
CHASE_TIME_MIN =
CHASE_TIME_MAX =
CHASE_RADIUS =
PET_ENABLED =
PET_TIME =
PET_MAX_DISTANCE =
petting =
petUntil =
RANDOM_SOUND_ID =
MIN_SOUND_DELAY =
MAX_SOUND_DELAY =
SOUND_VOLUME =
R6_WALK =
R15_WALK =
RAGDOLL_ON_DEATH =
HIGH_SPEED_IMPACT =
HIGH_FALL_DISTANCE =
deathProcessed =
character =
player.Character player.CharacterAdded:()
playerRoot =
character:()
objects = :(MODEL_ID)
objects objects[]
()
rig = objects[]
rig.Parent =
humanoid =
rig:()
humanoid
()
rigRoot =
rig:()
rigRoot
()
humanoid.BreakJointsOnDeath =
humanoid.RequiresNeck =
_, object (rig:())
object:()
object.Anchored =
object.CanCollide =
object.CanTouch =
object.CanQuery =
object.Massless =
(()
object.CollisionGroup =
)
rigRoot.CanCollide =
rigRoot.CanTouch =
rigRoot.CanQuery =
rig:(
playerRoot.CFrame *
.(, , -SPAWN_DISTANCE)
)
(()
rig:(START_SIZE)
)
currentScale = START_SIZE
humanoid.WalkSpeed = WALK_SPEED
humanoid.AutoRotate =
humanoid.UseJumpPower =
humanoid.JumpPower = NORMAL_JUMP_POWER
humanoid.Sit =
(()
humanoid:(
.HumanoidStateType.Seated,
)
)
animator =
humanoid:()
animator
animator = .()
animator.Parent = humanoid
animation =
.()
humanoid.RigType ==
.HumanoidRigType.R15
animation.AnimationId = R15_WALK
animation.AnimationId = R6_WALK
walkTrack
(()
walkTrack =
animator:(animation)
)
walkTrack
walkTrack.Looped =
walkTrack.Priority =
.AnimationPriority.Movement
sound =
.()
sound.Name =
sound.SoundId = RANDOM_SOUND_ID
sound.Volume = SOUND_VOLUME
sound.RollOffMaxDistance =
sound.RollOffMinDistance =
sound.Parent = rigRoot
petPrompt =
.()
petPrompt.Name =
petPrompt.ActionText =
petPrompt.ObjectText =
petPrompt.KeyboardKeyCode = .KeyCode.E
petPrompt.HoldDuration =
petPrompt.MaxActivationDistance = PET_MAX_DISTANCE
petPrompt.RequiresLineOfSight =
petPrompt.Style =
.ProximityPromptStyle.Default
petPrompt.Parent = rigRoot
state =
targetPosition
stateUntil =
randomRunDirection
randomRunUntil =
watchPosition
behaviorTarget
rayParams =
RaycastParams.()
rayParams.FilterType =
.RaycastFilterType.Exclude
rayParams.FilterDescendantsInstances = {
rig,
character
}
rayParams.IgnoreWater =
lastStuckPosition =
rigRoot.Position
joints = {}
_, object (rig:())
object:()
joints[object.Name] = object
(...)
_, name ({...})
joints[name]
joints[name]
_, object (rig:())
object:()
lower =
object.Name:()
_, wanted ({...})
.(
lower,
wanted:(),
,
)
object
leftShoulder =
(
,
)
rightShoulder =
(
,
)
leftHip =
(
,
)
rightHip =
(
,
)
neck =
()
originalTransforms = {}
_, object (rig:())
object:()
originalTransforms[object] =
object.Transform
(
joint,
cframe,
weight
)
joint
original =
originalTransforms[joint]
original
original = .identity
joint.Transform =
original:(
original * cframe,
weight
)
()
catIsDead
now = ()
state ==
breathe =
.(now * ) *
.()
(
leftShoulder,
.(breathe, , ),
)
(
rightShoulder,
.(-breathe, , ),
)
state ==
state ==
state ==
sniff =
.(now * ) *
.()
head =
.(now * ) *
.()
(
neck,
.(
.(-) + head,
,
),
)
(
leftShoulder,
.(
sniff,
,
.(-)
),
)
(
rightShoulder,
.(
-sniff,
,
.()
),
)
state ==
chew =
.(now * ) *
.()
head =
.(now * ) *
.()
(
neck,
.(
.() + head,
,
),
)
(
leftShoulder,
.(
chew,
,
),
)
(
rightShoulder,
.(
-chew,
,
),
)
state ==
drink =
.(now * ) *
.()
(
neck,
.(
.() + drink,
,
),
)
state ==
paw =
.(now * ) *
.()
(
leftShoulder,
.(
.(-) + paw,
.(),
.(-)
),
)
(
neck,
.(
.(),
.(now * ) *
.(),
),
)
state ==
paw =
.(now * ) *
.()
(
leftShoulder,
.(
.(-) + paw,
,
.(-)
),
)
(
rightShoulder,
.(
.(-) - paw,
,
.()
),
)
state ==
stretch =
.(
.(
(now % ) * ,
,
) * .pi
)
(
leftShoulder,
.(
.(-) * stretch,
,
),
)
(
rightShoulder,
.(
.(-) * stretch,
,
),
)
(
leftHip,
.(
.() * stretch,
,
),
)
(
rightHip,
.(
.() * stretch,
,
),
)
state ==
state ==
head =
.(now * ) *
.()
(
neck,
.(
.(-),
head,
),
)
state ==
bounce =
.(now * ) *
.()
(
leftShoulder,
.(
bounce,
,
.(-)
),
)
(
rightShoulder,
.(
-bounce,
,
.()
),
)
state ==
state ==
run =
.(now * ) *
.()
(
leftShoulder,
.(run, , ),
)
(
rightShoulder,
.(-run, , ),
)
(
leftHip,
.(-run, , ),
)
(
rightHip,
.(run, , ),
)
state ==
state ==
walk =
.(now * ) *
.()
(
leftShoulder,
.(walk, , ),
)
(
rightShoulder,
.(-walk, , ),
)
(
leftHip,
.(-walk, , ),
)
(
rightHip,
.(walk, , ),
)
state ==
happy =
.(now * ) *
.()
(
leftShoulder,
.(
happy,
,
.(-)
),
)
(
rightShoulder,
.(
-happy,
,
.()
),
)
()
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)
direction.Magnitude <
origin =
rigRoot.Position +
.(, , )
:(
origin,
direction.Unit * distance,
rayParams
)
(direction)
direction.Magnitude <
flat =
.(
direction.X,
,
direction.Z
)
flat.Magnitude <
flat = flat.Unit
origin =
rigRoot.Position +
.(, , )
:(
.(
origin,
origin + flat
),
BLOCKCAST_SIZE,
flat * HARD_BLOCK_DISTANCE,
rayParams
)
(direction)
direction.Magnitude <
direction
forward =
.(
direction.X,
,
direction.Z
)
forward.Magnitude <
direction
forward = forward.Unit
right =
.(
-forward.Z,
,
forward.X
)
left = -right
forwardHit =
(
forward,
OBSTACLE_CHECK_DISTANCE
)
forwardHit
turningAroundWall
wallTurnDirection
() < wallTurnUntil
(
wallTurnDirection,
SIDE_CHECK_DISTANCE
)
(
forward * +
wallTurnDirection *
).Unit
turningAroundWall =
wallTurnDirection =
forward
leftHit =
(
left,
SIDE_CHECK_DISTANCE
)
rightHit =
(
right,
SIDE_CHECK_DISTANCE
)
leftHit rightHit
wallTurnDirection =
random:() <
left
right
turningAroundWall =
wallTurnUntil = () +
(
forward * +
wallTurnDirection *
).Unit
leftHit
wallTurnDirection = left
turningAroundWall =
wallTurnUntil = () +
(
forward * +
left *
).Unit
rightHit
wallTurnDirection = right
turningAroundWall =
wallTurnUntil = () +
(
forward * +
right *
).Unit
side =
random:() <
left
right
side.Unit
(force)
catIsDead
petting
jumping
humanoid.Health <=
() - lastJumpTime <
JUMP_COOLDOWN
force ()
()
lastJumpTime = ()
jumping =
jumpStartedAt = ()
jumpEndTime =
() + MAX_JUMP_TIME
()
humanoid.JumpPower =
RECOVERY_JUMP_POWER
humanoid.Jump =
humanoid:(
.HumanoidStateType.Jumping
)
.(
JUMP_CONTROL_TIME,
()
rig.Parent
catIsDead
humanoid.Health >
humanoid.JumpPower =
NORMAL_JUMP_POWER
)
()
jumping
now = ()
()
now - jumpStartedAt >
LANDING_BUFFER
jumping =
humanoid.JumpPower =
NORMAL_JUMP_POWER
now >= jumpEndTime
jumping =
humanoid.JumpPower =
NORMAL_JUMP_POWER
humanoid:(
.zero,
)
(direction, speed)
catIsDead
jumping
petting
direction.Magnitude <
()
flat =
.(
direction.X,
,
direction.Z
)
flat.Magnitude <
flat = flat.Unit
hardHit =
(flat)
hardHit
right =
.(
-flat.Z,
,
flat.X
)
left = -right
leftBlocked =
(left) ~=
rightBlocked =
(right) ~=
leftBlocked
rightBlocked
()
()
humanoid:(
.zero,
)
()
leftBlocked
flat =
(
flat * +
left *
).Unit
rightBlocked
flat =
(
flat * +
right *
).Unit
movement =
(flat)
movement.Magnitude <
humanoid:(
.zero,
)
()
humanoid.WalkSpeed = speed
humanoid:(
movement,
)
()
()
jumping
humanoid:(
.zero,
)
()
()
stuckTimer =
lastStuckPosition =
rigRoot.Position
(position)
jumping petting
current =
rigRoot.Position
target =
.(
position.X,
current.Y,
position.Z
)
difference =
target - current
difference.Magnitude <
rigRoot.CFrame =
.(
current,
target
)
()
PET_ENABLED
catIsDead
petting
humanoid.Health <=
petting =
petUntil =
() + PET_TIME
state =
targetPosition =
recovering =
jumping =
humanoid:(
.zero,
)
humanoid.WalkSpeed =
humanoid.AutoRotate =
()
()
petPrompt.Triggered:(
(triggeringPlayer)
triggeringPlayer ~= player
()
)
()
petting
()
humanoid:(
.zero,
)
humanoid.WalkSpeed =
() >= petUntil
petting =
state =
humanoid.AutoRotate =
humanoid.WalkSpeed =
WALK_SPEED
stateUntil =
() +
()
jumping petting
state =
()
humanoid.WalkSpeed =
stateUntil =
() +
random:(, )
()
jumping petting
state =
()
humanoid.WalkSpeed =
stateUntil =
() +
random:(
SMELL_MIN_TIME,
SMELL_MAX_TIME
)
()
()
humanoid:(
.zero,
)
() >= stateUntil
()
()
jumping petting
state =
()
humanoid.WalkSpeed =
stateUntil =
() +
random:(
GROOM_MIN_TIME,
GROOM_MAX_TIME
)
()
()
humanoid:(
.zero,
)
() >= stateUntil
()
()
jumping petting
state =
()
humanoid.WalkSpeed =
stateUntil =
() +
random:(
PAW_MIN_TIME,
PAW_MAX_TIME
)
()
()
humanoid:(
.zero,
)
() >= stateUntil
()
()
jumping petting
state =
()
humanoid.WalkSpeed =
stateUntil =
() +
random:(
STRETCH_MIN_TIME,
STRETCH_MAX_TIME
)
()
()
humanoid:(
.zero,
)
() >= stateUntil
()
()
jumping petting
state =
direction =
.(
random:(-, ),
,
random:(-, )
)
direction.Magnitude <
direction =
rigRoot.CFrame.LookVector
randomRunDirection =
.(
direction.X,
,
direction.Z
).Unit
stateUntil =
() +
random:(
PLAY_MIN_TIME,
PLAY_MAX_TIME
)
()
() >= stateUntil
()
(
randomRunDirection,
RUN_SPEED
)
()
jumping petting
state =
direction =
.(
random:(-, ),
,
random:(-, )
)
direction.Magnitude <
direction =
rigRoot.CFrame.LookVector
randomRunDirection =
.(
direction.X,
,
direction.Z
).Unit
randomRunUntil =
() +
random:(
RANDOM_RUN_MIN_TIME,
RANDOM_RUN_MAX_TIME
)
(
playerPosition
)
() >= randomRunUntil
()
distance =
(
rigRoot.Position -
playerPosition
).Magnitude
distance >
state =
(
randomRunDirection,
RUN_SPEED
)
()
_ = ,
angle =
random:(
,
.pi *
)
distance =
random:(
EXPLORE_MIN_DISTANCE,
EXPLORE_MAX_DISTANCE
)
offset =
.(
.(angle) * distance,
,
.(angle) * distance
)
desired =
playerRoot.Position +
offset
ground =
:(
desired +
.(, , ),
.(, -, ),
rayParams
)
ground
ground.Position +
.(, , )
playerRoot.Position +
.(
random:(-, ),
,
random:(-, )
)
()
petting
state =
targetPosition =
()
stateUntil =
() + EXPLORE_TIMEOUT
humanoid.WalkSpeed =
WALK_SPEED
(
playerPosition
)
distance =
(
rigRoot.Position -
playerPosition
).Magnitude
distance >
FOLLOW_RESUME_DISTANCE
state =
targetPosition =
targetPosition
targetPosition =
()
difference =
targetPosition -
rigRoot.Position
difference =
.(
difference.X,
,
difference.Z
)
difference.Magnitude <
() >= stateUntil
()
targetPosition =
state =
stateUntil =
() +
random:(
EXPLORE_WAIT_MIN,
EXPLORE_WAIT_MAX
)
(
difference,
WALK_SPEED *
)
()
jumping petting
state =
()
humanoid.WalkSpeed =
watchPosition =
rigRoot.Position +
.(
random:(-, ),
,
random:(-, )
)
stateUntil =
() +
random:(
WATCH_MIN_TIME,
WATCH_MAX_TIME
)
()
()
humanoid:(
.zero,
)
watchPosition
(watchPosition)
() >= stateUntil
()
()
closest
closestDistance =
FOOD_SEARCH_RADIUS
_, object (
:()
)
object:()
name =
object.Name:()
.(name, , , )
.(name, , , )
.(name, , , )
.(name, , , )
distance =
(
object.Position -
rigRoot.Position
).Magnitude
distance <
closestDistance
closest =
object
closestDistance =
distance
closest
()
FOOD_ENABLED
jumping
petting
food =
()
food
behaviorTarget = food
state =
stateUntil =
() +
()
behaviorTarget
behaviorTarget.Parent
()
difference =
behaviorTarget.Position -
rigRoot.Position
distance =
difference.Magnitude
distance <= FOOD_DETECT_DISTANCE
()
state =
stateUntil =
() +
random:(
FOOD_EAT_TIME_MIN,
FOOD_EAT_TIME_MAX
)
() >= stateUntil
()
(
difference,
WALK_SPEED
)
()
behaviorTarget
behaviorTarget.Parent
(
behaviorTarget.Position
)
humanoid:(
.zero,
)
() >= stateUntil
behaviorTarget =
()
()
closest
closestDistance =
WATER_SEARCH_RADIUS
_, object (
:()
)
object:()
name =
object.Name:()
.(name, , , )
.(name, , , )
.(name, , , )
distance =
(
object.Position -
rigRoot.Position
).Magnitude
distance <
closestDistance
closest =
object
closestDistance =
distance
closest
()
WATER_ENABLED
jumping
petting
water =
()
water
behaviorTarget = water
state =
stateUntil =
() +
()
behaviorTarget
behaviorTarget.Parent
()
difference =
behaviorTarget.Position -
rigRoot.Position
distance =
difference.Magnitude
distance <=
()
state =
stateUntil =
() +
random:(
WATER_DRINK_TIME_MIN,
WATER_DRINK_TIME_MAX
)
() >= stateUntil
()
(
difference,
WALK_SPEED *
)
()
behaviorTarget
behaviorTarget.Parent
(
behaviorTarget.Position
)
humanoid:(
.zero,
)
() >= stateUntil
behaviorTarget =
()
()
closest
closestDistance =
CHASE_RADIUS
_, object (
:()
)
object:()
object ~= rigRoot
velocity =
object.AssemblyLinearVelocity
velocity.Magnitude >
distance =
(
object.Position -
rigRoot.Position
).Magnitude
distance <
closestDistance
closest =
object
closestDistance =
distance
closest
()
CHASE_ENABLED
jumping
petting
target =
()
target
behaviorTarget = target
state =
stateUntil =
() +
random:(
CHASE_TIME_MIN,
CHASE_TIME_MAX
)
()
behaviorTarget
behaviorTarget.Parent
()
() >= stateUntil
behaviorTarget =
()
difference =
behaviorTarget.Position -
rigRoot.Position
difference.Magnitude <
()
(
difference,
RUN_SPEED
)
(moving, dt)
jumping petting
stuckTimer =
lastStuckPosition =
rigRoot.Position
moving
stuckTimer =
lastStuckPosition =
rigRoot.Position
movement =
(
rigRoot.Position -
lastStuckPosition
).Magnitude
movement < STUCK_DISTANCE
stuckTimer += dt
stuckTimer =
lastStuckPosition =
rigRoot.Position
stuckTimer >=
STUCK_CHECK_TIME
stuckTimer =
recovering =
recoveryUntil =
() + RECOVERY_TIME
()
()
highestFallY =
rigRoot.Position.Y
wasAirborne =
()
catIsDead
velocity =
rigRoot.AssemblyLinearVelocity
speed =
velocity.Magnitude
grounded =
()
grounded
wasAirborne
wasAirborne =
highestFallY =
rigRoot.Position.Y
highestFallY =
.(
highestFallY,
rigRoot.Position.Y
)
wasAirborne
fallDistance =
highestFallY -
rigRoot.Position.Y
fallDistance >=
HIGH_FALL_DISTANCE
deathCause =
wasAirborne =
highestFallY =
rigRoot.Position.Y
speed >=
HIGH_SPEED_IMPACT
deathCause =
()
RAGDOLL_ON_DEATH
deathProcessed
deathProcessed =
rig.Parent
humanoid.AutoRotate =
humanoid.WalkSpeed =
humanoid.JumpPower =
humanoid.PlatformStand =
(()
humanoid:(
.HumanoidStateType.Physics
)
)
_, joint (
rig:()
)
joint:()
joint.Part0
joint.Part1
part0 =
joint.Part0
part1 =
joint.Part1
attachment0 =
.()
attachment0.Name =
attachment0.CFrame =
joint.C0
attachment0.Parent =
part0
attachment1 =
.()
attachment1.Name =
attachment1.CFrame =
joint.C1
attachment1.Parent =
part1
constraint =
.(
)
constraint.Name =
constraint.Attachment0 =
attachment0
constraint.Attachment1 =
attachment1
constraint.LimitsEnabled =
constraint.UpperAngle =
constraint.TwistLimitsEnabled =
constraint.TwistLowerAngle = -
constraint.TwistUpperAngle =
constraint.Parent =
part0
joint.Enabled =
_, object (
rig:()
)
object:()
object.Anchored =
object.CanCollide =
object.CanTouch =
object.CanQuery =
object.Massless =
(()
object.CollisionGroup =
)
(
..
(deathCause)
)
()
catIsDead
age =
() - birthTime
age >= LIFE_TIME
deathCause =
catIsDead =
state =
targetPosition =
behaviorTarget =
jumping =
petting =
recovering =
humanoid:(
.zero,
)
humanoid.WalkSpeed =
humanoid.AutoRotate =
()
petPrompt
petPrompt.Enabled =
sound
sound:()
started =
()
duration =
.(()
rig.Parent
() - started <
duration
progress =
.(
(() - started) /
duration,
,
)
smooth =
progress *
progress *
( - * progress)
(
leftShoulder,
.(
.() *
smooth,
,
.(-) *
smooth
),
)
(
rightShoulder,
.(
.() *
smooth,
,
.() *
smooth
),
)
(
neck,
.(
.() *
smooth,
,
),
)
RunService.Heartbeat:()
rig.Parent
()
)
progress =
.(
age / LIFE_TIME,
,
)
smooth =
progress *
progress *
( - * progress)
newScale =
START_SIZE +
(FINAL_SIZE - START_SIZE) *
smooth
.(
newScale - currentScale
) >
currentScale =
newScale
(()
rig:(currentScale)
)
.(()
rig.Parent
catIsDead
.(
random:(
MIN_SOUND_DELAY,
MAX_SOUND_DELAY
)
)
rig.Parent
catIsDead
state ~=
sound:()
sound:()
)
()
petting
catIsDead
FOOD_ENABLED
random:() <
FOOD_SEARCH_CHANCE
()
WATER_ENABLED
random:() <
WATER_CHANCE
()
CHASE_ENABLED
random:() <
CHASE_CHANCE
()
roll =
random:()
roll <
SMELL_ENABLED
()
roll <
GROOM_ENABLED
()
roll <
PAW_ENABLED
()
roll <
STRETCH_ENABLED
()
roll <
WATCH_ENABLED
()
roll <
PLAY_ENABLED
()
roll <
RANDOM_RUN_ENABLED
()
roll <
EXPLORE_ENABLED
()
()
RunService.Heartbeat:(
(dt)
rig.Parent
catIsDead
character.Parent
playerRoot.Parent
humanoid.Health <=
()
catIsDead
()
()
()
petting
()
()
playerPosition =
playerRoot.Position
distance =
(
rigRoot.Position -
playerPosition
).Magnitude
()
jumping
()
state ==
()
state ==
()
state ==
()
state ==
()
state ==
()
distance >
FOLLOW_RESUME_DISTANCE
state =
state ==
()
distance >
FOLLOW_RESUME_DISTANCE
state =
state ==
()
state ==
()
state ==
()
state ==
()
distance >
state =
state ==
()
state ==
(
playerPosition
)
state ==
(
playerPosition
)
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)
random:()
<
()
(
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
newRoot =
newCharacter:(
)
playerRoot = newRoot
rayParams.FilterDescendantsInstances = {
rig,
character
}
rig.Parent
catIsDead
jumping =
recovering =
petting =
behaviorTarget =
rig:(
newRoot.CFrame *
.(
,
,
-SPAWN_DISTANCE
)
)
state =
targetPosition =
humanoid.JumpPower =
NORMAL_JUMP_POWER
humanoid.WalkSpeed =
WALK_SPEED
humanoid.AutoRotate =
()
petPrompt
petPrompt.Enabled =
)
humanoid.Died:(
()
catIsDead
deathCause ==
velocity =
rigRoot.AssemblyLinearVelocity
velocity.Magnitude >=
HIGH_SPEED_IMPACT
deathCause =
deathCause =
catIsDead =
state =
jumping =
petting =
recovering =
targetPosition =
behaviorTarget =
humanoid:(
.zero,
)
humanoid.WalkSpeed =
humanoid.JumpPower =
humanoid.AutoRotate =
()
petPrompt
petPrompt.Enabled =
sound
sound:()
.(()
rig.Parent
()
)
(
..
(deathCause)
)
)
.(()
rig.Parent
catIsDead
.()
humanoid.Health <=
()
_, object (
rig:()
)
object:()
object.Anchored =
object.CanCollide =
object.CanTouch =
object.CanQuery =
object.Massless =
(()
object.CollisionGroup =
)
jumping
petting
state ~=
state ~=
state ~=
state ~=
state ~=
state ~=
state ~=
state ~=
velocity =
rigRoot.AssemblyLinearVelocity
moving =
humanoid.MoveDirection.Magnitude
>
velocity.Magnitude <
moving
()
()
)
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()
()Get a smart cat companion!

Universal