Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local rs = game:GetService('RunService').RenderStepped
- local create = function(startPos, targetPos, ignore, limbs, drop)
- require(251791286)(startPos)
- local ray = Ray.new(
- startPos,
- ((targetPos - Vector3.new(0, -.4 * drop, 0)) - startPos).unit * 10
- )
- local hit, pos = workspace:FindPartOnRay(ray, ignore)
- if hit == nil or not limbs[hit.Name] or hit.CanCollide == false then
- repeat
- rs:wait()
- ray = Ray.new(
- pos,
- ((targetPos - Vector3.new(0, -.4 * drop, 0)) - pos).unit * 10
- )
- require(251791286)(pos)
- hit, pos = workspace:FindPartOnRay(ray, ignore)
- require(251791286)(pos)
- if hit ~= nil and limbs[hit.Name] then
- return hit, pos, hit.Parent:FindFirstChild('Humanoid')
- elseif hit ~= nil and hit.CanCollide then
- return hit, pos
- end
- until hit ~= nil and (hit.CanCollide ~= false or limbs[hit.Name]) or pos.Y < 100
- elseif hit ~= nil and limbs[hit.Name] then
- return hit, pos, hit.Parent:FindFirstChild('Humanoid')
- elseif hit ~= nil and hit.CanCollide == true then
- return hit, pos
- end
- end
- return create
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement