Run it
Copy the script and paste it into your executor.
Players = :()
PathfindingService = :()
RunService = :()
localPlayer = Players.LocalPlayer
targetPlayer =
followConnection =
bodyVelocity =
bodyGyro =
STUCK_TIME_LIMIT =
AIR_THRESHOLD =
path = PathfindingService:({
AgentRadius = ,
AgentHeight = ,
AgentCanJump = ,
AgentSlope =
})
()
bodyVelocity bodyVelocity:(); bodyVelocity =
bodyGyro bodyGyro:(); bodyGyro =
(rootPart)
raycastParams = RaycastParams.()
raycastParams.FilterType = .RaycastFilterType.Exclude
raycastParams.FilterDescendantsInstances = {rootPart.Parent}
raycastResult = :(rootPart.Position, .(, -, ), raycastParams)
raycastResult
rootPart.CFrame = .(raycastResult.Position + .(, , ))
(forceGroundSnap)
followConnection followConnection:(); followConnection =
()
targetPlayer =
myChar = localPlayer.Character
myChar
myHumanoid = myChar:()
myRoot = myChar:()
myHumanoid myRoot
myHumanoid:(myRoot.Position)
myHumanoid.WalkSpeed =
forceGroundSnap
(myRoot)
(startPos, endPos, character)
raycastParams = RaycastParams.()
raycastParams.FilterType = .RaycastFilterType.Exclude
raycastParams.FilterDescendantsInstances = {character, targetPlayer.Character}
rayDirection = (endPos - startPos)
:(startPos + .(,,), rayDirection, raycastParams) ==
(rootPart)
raycastParams = RaycastParams.()
raycastParams.FilterType = .RaycastFilterType.Exclude
raycastParams.FilterDescendantsInstances = {rootPart.Parent}
result = :(rootPart.Position, .(, -AIR_THRESHOLD, ), raycastParams)
result ==
(playerToFollow)
targetPlayer = playerToFollow
followConnection followConnection:()
myChar = localPlayer.Character
targetChar = targetPlayer.Character
myChar targetChar
myRoot = myChar:()
targetRoot = targetChar:()
myRoot targetRoot
myRoot.CFrame = targetRoot.CFrame * .(, , )
lastPos = .()
stuckTimer =
followConnection = RunService.Heartbeat:(()
myChar = localPlayer.Character
targetChar = targetPlayer.Character
myChar targetChar
myHumanoid = myChar:()
targetHumanoid = targetChar:()
myRoot = myChar:()
targetRoot = targetChar:()
myHumanoid targetHumanoid myRoot targetRoot
myHumanoid.Jump =
targetSpeed = targetHumanoid.WalkSpeed
myHumanoid.WalkSpeed = targetSpeed
standTargetCFrame = targetRoot.CFrame * .(, , )
standTargetPos = standTargetCFrame.Position
myPos = myRoot.Position
(targetRoot)
bodyVelocity
bodyVelocity = .()
bodyVelocity.MaxForce = .(, , )
bodyVelocity.Velocity = .(,,)
bodyVelocity.Parent = myRoot
bodyGyro
bodyGyro = .()
bodyGyro.MaxTorque = .(, , )
bodyGyro.CFrame = targetRoot.CFrame
bodyGyro.Parent = myRoot
direction = (standTargetPos - myPos)
distance = direction.Magnitude
distance >
bodyVelocity.Velocity = direction.Unit * .(distance * , targetSpeed, targetSpeed * )
bodyVelocity.Velocity = .(,,)
bodyGyro.CFrame = targetRoot.CFrame
()
(myPos - lastPos).Magnitude <
stuckTimer = stuckTimer + RunService.Heartbeat:()
stuckTimer > STUCK_TIME_LIMIT
myHumanoid:(standTargetPos + .(.(-,), , .(-,)))
stuckTimer =
stuckTimer =
lastPos = myPos
(myPos, standTargetPos, myChar)
myHumanoid:(standTargetPos)
success, _ = (()
path:(myPos, standTargetPos)
)
success path.Status == .PathStatus.Success
waypoints = path:()
#waypoints >=
myHumanoid:(waypoints.Position)
myHumanoid:(standTargetPos)
myHumanoid:(standTargetPos)
()
)
(player, message)
cleanMessage = message:():(, ):(, ):()
player == localPlayer
cleanMessage ==
()
cleanMessage ==
(player)
cleanMessage ==
()
_, player (Players:())
player.Chatted:((message) (player, message) )
Players.PlayerAdded:((player)
player.Chatted:((message) (player, message) )
)
i made this with ai please don't be made at me im new too this stuff :C

Universal