Professional Documents
Culture Documents
Script Roblox
Script Roblox
-- ok
script.Parent.PrimaryPart:SetNetworkOwner(nil)
task.wait(1)
local AgentParams = {
AgentRadius = 0.25,
AgentCanJump = true,
AgentHeight = 5.0,
WaypointSpacing = math.huge,
Costs = {
Door = 10
}
}
task.spawn(function()
while script do
task.wait(1)
if bhrp.Velocity.Magnitude <= 4 then
if not bhum.Jump and char and char ~= nil then
bhum.Jump = true
end
end
end
end)
if hit then
if hit:FindFirstChild("Humanoid") or
hit.Parent:FindFirstChild("Humanoid") or
hit.Parent.Parent:FindFirstChild("Humanoid") then
if math.abs(hit.Position.Y - bhrp.Position.Y) < 2 then
return true
else
return false
end
else
return false
end
else
return false
end
end
spawn(nearestChar)
local count = 0
RunS.Heartbeat:Connect(function()
pcall(function()
if char ~= nil and char:FindFirstChild("HumanoidRootPart") then
local sight = checkSight(char)
if sight == true then
repeat task.wait()
bhum:MoveTo(char.HumanoidRootPart.Position)
until
checkSight(char) == false or char == nil
elseif sight == false then
actPath:ComputeAsync(bhrp.Position,
char.HumanoidRootPart.Position)
for i,v in ipairs(actPath:GetWaypoints()) do
if i ~= 1 then
bhum:MoveTo(v.Position)
bhum.MoveToFinished:Wait()
end
end
end
end
end)
end)
kill script:
function onTouched(Obj)
local h = Obj.Parent:FindFirstChild("Humanoid")
if h then
h.Health = 0
end
end
script.Parent.Touched:Connect(onTouched)