Roblox/luau_corpus huggingface dataset:
--[[ -- Remove the double brackets around this part to rename and unanchor everything --

for i = 1, #c do
	if c[i].className == "Part" then
		c[i].Anchored = false;
		if c[i].Name ~= "Handle" then
			c[i].Name = "H" .. a;
			a = a + 1;
		end
	end
end

]]

if hand == nil then
	print("Handle not Found! Try again!")
	script.Disabled = true;
	script:Remove()
end

local s = script.WeldScript:Clone();
s.Disabled = false;

for i = 1, #c do
	if c[i].className == "Part" and c[i] ~= hand and c[i].Anchored == false then
		table.insert(parts, c[i])
	end
end

for i = 1, #parts do
	local c0 = hand.CFrame:inverse()
	local c1 = parts[i].CFrame:inverse()
	local val1 = Instance.new("CFrameValue")
	val1.Name = parts[i].Name .. "C0"
	val1.Value = c0
	val1.Parent = s
	local val2 = Instance.new("CFrameValue")
	val2.Name = parts[i].Name .. "C1"
	val2.Value = c1
	val2.Parent = s
	local w = Instance.new("Weld")
	w.Parent = hand
	w.Part0 = hand
	w.Part1 = parts[i]
	w.C0 = c0
	w.C1 = c1
end

s.Parent = tool

script:Remove()
--Made by Luckymaxer

Players = game:GetService("Players")
Debris = game:GetService("Debris")
UserInputService = game:GetService("UserInputService")

Player = Players.LocalPlayer
Mouse = Player:GetMouse()

ServerControl = script:WaitForChild("ServerControl").Value

function InvokeServer(mode, value)
	pcall(function()
		local ServerReturn = ServerControl:InvokeServer(mode, value)
		return ServerReturn
	end)
end

function MouseClick(Down)
	InvokeServer("MouseClick", {Down = Down})
end

function KeyPress(Key, Down)
	InvokeServer("KeyPress", {Key = Key, Down = Down})
end

Mouse.Button1Down:connect(function()
	MouseClick(true)
end)

Mouse.KeyDown:connect(function(Key)
	KeyPress(Key, true)
end)

ServerControl.Changed:connect(function(Property)
	if Property == "Parent" and not ServerControl.Parent then
		Debris:AddItem(script, 1)
	end
end)
-- Renegeration Script for the bot
-- Renegerates about 1% of max hp per second until it reaches max health
bot = script.Parent
Humanoid = bot:FindFirstChild("Humanoid")

local regen = false

function regenerate() 
	if regen then return end
	-- Lock this function until the regeneration to max health is complete by using a boolean toggle
	regen = true
	while Humanoid.Health < Humanoid.MaxHealth do
		local delta = wait(1)
		local health = Humanoid.Health
		if health > 0 and health < Humanoid.MaxHealth then 
			-- This delta is for regenerating 1% of max hp per second instead of 1 hp per second
			delta = 0.01 * delta * Humanoid.MaxHealth
			health = health + delta
			Humanoid.Health = math.min(health, Humanoid.MaxHealth)			
		end
	end	
	-- release the lock, since the health is at max now, and if the character loses health again
	-- it needs to start regenerating 
	regen = false
end	

if Humanoid then 
	-- Better than a while true do loop since it only fires when the health actually changes
	Humanoid.HealthChanged:connect(regenerate)	
end
--Functions
local function onTouched(hit)
	local Humanoid = hit.Parent:FindFirstChild("Humanoid")
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)

	if Humanoid and Debounce == false then
		local leaderstats = player:FindFirstChild("leaderstats")
		Debounce = true

		if Debounce == true and leaderstats then
			local sound = script.Parent["Game Sound Correct"]

			if not sound.IsPlaying then
				sound:Play()
			leaderstats.Guesses.Value = leaderstats.Guesses.Value + AMOUNT_GIVEN
			wait(2)
		
				wait(10)
			Debounce = false
		end
	end
end
end
-- ROBLOX deviation END chalk_supportsColor
-- ROBLOX deviation END chalk_chainable

exports.default = function(result: TestResult, globalConfig: Config_GlobalConfig, projectConfig: Config_ProjectConfig?)
	local testPath = result.testFilePath
	local formattedTestPath = formatTestPath(projectConfig or globalConfig, testPath)
	-- ROBLOX deviation START: no terminal-link package available just use the path
	local fileLink = formattedTestPath
	-- ROBLOX deviation END
	if result.numFailingTests == nil then
		result.numFailingTests = 0
	end
	local status = if result.numFailingTests > 0 or result.testExecError ~= nil then FAIL else PASS
	local testDetail = {}

	if result.perfStats ~= nil and Boolean.toJSBoolean(result.perfStats.slow) then
		local runTime = result.perfStats.runtime / 1000
		table.insert(testDetail, LONG_TEST_COLOR(formatTime(runTime, 0)))
	end

	if result.memoryUsage ~= nil then
		local toMB = function(bytes: number)
			return math.floor(bytes / 1024 / 1024)
		end
		table.insert(testDetail, (" %sMB heap size"):format(tostring(toMB(result.memoryUsage))))
	end

	local projectDisplayName = if projectConfig ~= nil and Boolean.toJSBoolean(projectConfig.displayName)
		then printDisplayName(projectConfig) .. " "
		else ""

	return string.format("%s %s%s %s", status, projectDisplayName, fileLink, table.concat(testDetail, " "))
end

return exports
-- Weapons Tab 
local WeaponsFrame = InventoryFrame.Main.Weapons;

local ActionsFrame = WeaponsFrame.Actions;
local EquippedFrame = WeaponsFrame.Equipped;
local ItemsFrame = WeaponsFrame.Items;

local ActionContainer = ActionsFrame.ActionContainer
local CraftingFrame = ActionContainer.Craft;

local EquipButton = ActionsFrame.Equip;
local CraftButton = ActionsFrame.Craft;
local RecycleButton = ActionsFrame.Recycle;
local RecipesFrame = InventoryFrame.Recipes;

local Sizes = {
	
	[ItemsFrame] = {
		[EquipButton] = {
			Size = ItemsFrame.Size;
			Position = ItemsFrame.Position;
		};
		[CraftButton] = {
			Size = UDim2.new(0,-427,1,-155);
			Position = ItemsFrame.Position;
		};
		[RecycleButton] = {
			Size = UDim2.new(0,-427,1,-200);
			Position = ItemsFrame.Position;
		};
	};
	
	[ActionsFrame] = {
		[EquipButton] = {
			Size = ActionsFrame.Size;
			Position = ActionsFrame.Position;
		};
		[CraftButton] = {
			Size = UDim2.new(1,0,0,160);
			Position = UDim2.new(0,0,1,-160);
		};
		[RecycleButton] = {
			Size = UDim2.new(1,0,0,205);
			Position = UDim2.new(0,0,1,-205);
		};
	};
	
	[EquippedFrame] = {
		[EquipButton] = {
			Size = EquippedFrame.Size;
			Position = EquippedFrame.Position;
		};
		[CraftButton] = {
			Size = UDim2.new(0,130,1,-155);
			Position = UDim2.new(1,0,0,0);
		};
		[RecycleButton] = {
			Size = UDim2.new(0,130,1,-200);
			Position = EquippedFrame.Position;
		};
	};
	
	[RecipesFrame] = {
		[EquipButton] = {
			Size = RecipesFrame.Size;
			Position = RecipesFrame.Position;
		};
		[CraftButton] = {
			Size = UDim2.new(0,292,1,-155);
			Position = RecipesFrame.Position; --EquippedFrame.Position;
		};
		[RecycleButton] = {
			Size = UDim2.new(0,0,1,-200);
			Position = ItemsFrame.Position;
		};
	};
	
};

local Buttons = {EquipButton,CraftButton,RecycleButton};

local function ChangeAction(Button,CustomTime)
	CurrentAction = Button.Name;
	for _,B in pairs(Buttons) do B.Style = (B==Button and Enum.ButtonStyle.RobloxRoundDefaultButton) or Enum.ButtonStyle.RobloxRoundButton; end;
	if Button.Name ~= "Equip" then for _,F in pairs(ActionContainer:GetChildren()) do F.Visible = (F.Name==Button.Name); end; end;
	for Frame,Data in pairs(Sizes) do
		Frame:TweenSizeAndPosition(
			Data[Button].Size,
			Data[Button].Position,
			Direction,Style,((tonumber(CustomTime)~=nil and CustomTime) or Time)
		);
	end
end
for _,Button in pairs(Buttons) do
	Button.MouseButton1Click:connect(function()
		ChangeAction(Button);
	end)
end
--Front Suspension
Tune.FSusDamping	= 500		-- Spring Dampening
Tune.FSusStiffness	= 9000		-- Spring Force
Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

Tune.FSusLength		= 2			-- Suspension length (in studs)
Tune.FPreCompress	= .3		-- Pre-compression adds resting length force
Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
Tune.FCompressLim	= .30		-- Max Compression Travel (in studs)
Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

Tune.FWsBoneLen		= 5			-- Wishbone Length
Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	--[[Lateral]]		-.4		,	-- positive = outward
	--[[Vertical]]		-.5		,	-- positive = upward
	--[[Forward]]		0		}	-- positive = forward
-- constants

local PLAYER_DATA	= ReplicatedStorage.PlayerData
local REMOTES		= ReplicatedStorage.Remotes

local CURRENT_SEASON	= 1
-- Local Variables
local Events = game.ReplicatedStorage.Events
local DisplayIntermission = Events.DisplayIntermission
local FetchConfiguration = Events.FetchConfiguration
local Camera = game.Workspace.CurrentCamera
local Player = game.Players.LocalPlayer
local ScreenGui = script.ScreenGui

local InIntermission = false
local IsTeams = nil
-- Fired from server after initial data is sent:
rev_ReplicaRequestData.OnClientEvent:Connect(function()
	ReplicaController.InitialDataReceived = true
	print("[ReplicaController]: Initial data received")
	ReplicaController.InitialDataReceivedSignal:Fire()
end)
--[[*
 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 ]]
--[[
	ROBLOX deviation: no equivalent in Lua. Always returning false
	original code:
	import {isCI} from 'ci-info';

	export default !!process.stdout.isTTY && process.env.TERM !== 'dumb' && !isCI;
]]
return {
	default = false,
}
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 1500		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 2000		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 9000		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 1900
	Tune.PeakSharpness	= 4.9
	Tune.CurveMult		= 0.12
	
	--Incline Compensation
	Tune.InclineComp	= 1.0			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 100		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 50		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 10			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
--------LEFT DOOR --------

game.Workspace.doorleft.l41.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
-- Localplayer
local player = Players.LocalPlayer
local PlayerGui = player:FindFirstChild("PlayerGui")
local TopBar = PlayerGui:FindFirstChild("TopBar")
local CheckpointFrame = TopBar:FindFirstChild("CheckpointFrame")
local CheckpointCount = CheckpointFrame:FindFirstChild("CheckpointCount")
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
function onRunning(speed)
	if speed>0.5 then
		playAnimation("walk", 0.2, Humanoid)
		pose = "Walking"
	elseif speed<0.5 then
		playAnimation("idle", 0.2, Humanoid)
		pose = "Standing"
	end
end
function onDied()
	pose = "Dead"
end
function onGettingUp()
	pose = "GettingUp"
end
function onFallingDown()
	pose = "FallingDown"
end
function onPlatformStanding()
	pose = "PlatformStanding"
end
local lastTick = 0
function stepAnimate(currentTime)
	local amplitude = 1
	local frequency = 1
  	local deltaTime = currentTime - lastTick
  	lastTick = currentTime
	if (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
		stopAllAnimations()
		amplitude = 0.1
		frequency = 1
	end
end
-- local MatcherHintOptions = JestMatcherUtils.MatcherHintOptions
local RECEIVED_COLOR = JestMatcherUtils.RECEIVED_COLOR
local matcherErrorMessage = JestMatcherUtils.matcherErrorMessage
local matcherHint = JestMatcherUtils.matcherHint
local printWithType = JestMatcherUtils.printWithType
local stringify = JestMatcherUtils.stringify
-- Libraries
local Libraries = Tool:WaitForChild 'Libraries'
local Support = require(Libraries:WaitForChild 'SupportLibrary')
local Signal = require(Libraries:WaitForChild 'Signal')
local Make = require(Libraries:WaitForChild 'Make')
local InstancePool = require(Libraries:WaitForChild 'InstancePool')

TargetingModule = {};
TargetingModule.TargetingMode = 'Scoped'
TargetingModule.TargetingModeChanged = Signal.new()
TargetingModule.Scope = Workspace
TargetingModule.IsScopeLocked = true
TargetingModule.TargetChanged = Signal.new()
TargetingModule.ScopeChanged = Signal.new()
TargetingModule.ScopeTargetChanged = Signal.new()
TargetingModule.ScopeLockChanged = Signal.new()

function TargetingModule:EnableTargeting()
	-- 	Begin targeting parts from the mouse

	-- Get core API
	local Core = GetCore();
	local Connections = Core.Connections;

	-- Create reference to mouse
	Mouse = Core.Mouse;

	-- Listen for target changes
	Connections.Targeting = Mouse.Move:Connect(function ()
		self:UpdateTarget(self.Scope)
	end)

	-- Listen for target clicks
	Connections.Selecting = Mouse.Button1Up:Connect(self.SelectTarget)

	-- Listen for sibling selection middle clicks
	Connections.SiblingSelecting = Support.AddUserInputListener('Began', 'MouseButton3', true, function ()
		self.SelectSiblings(Mouse.Target, not Selection.Multiselecting)
	end);

	-- Listen for 2D selection
	Connections.RectSelectionStarted = Mouse.Button1Down:Connect(self.StartRectangleSelecting);
	Connections.RectSelectionFinished = Support.AddUserInputListener('Ended', 'MouseButton1', true, self.FinishRectangleSelecting);

	-- Hide target box when tool is unequipped
	Connections.HideTargetBoxOnDisable = Core.Disabling:Connect(self.HighlightTarget);

	-- Cancel any ongoing selection when tool is unequipped
	Connections.CancelSelectionOnDisable = Core.Disabling:Connect(self.CancelRectangleSelecting);

	-- Enable scope selection
	self:EnableScopeSelection()

	-- Enable automatic scope resetting
	self:EnableScopeAutoReset()

	-- Enable targeting mode hotkeys
	self:BindTargetingModeHotkeys()

end;

function TargetingModule:SetScope(Scope)
	if self.Scope ~= Scope then
		self.Scope = Scope
		self.ScopeChanged:Fire(Scope)
	end
end

local function IsVisible(Item)
	return Item:IsA 'Model' or Item:IsA 'BasePart'
end

local function IsTargetable(Item)
	return Item:IsA 'Model' or
		Item:IsA 'BasePart' or
		Item:IsA 'Tool' or
		Item:IsA 'Accessory' or
		Item:IsA 'Accoutrement'
end
--//Controller//--
for _, Button in pairs(Buttons:GetChildren()) do
	if Button.Name == "Button" then
		local Trigger = Button:WaitForChild("ProximityPrompt")
		
		Trigger.Triggered:Connect(function()
			if Button.Color == Color3.fromRGB(255, 0, 0) then
				Button.Color = Color3.fromRGB(0, 255, 0)
				
				table.insert(ActivatedButtons, Button)
				
				if #ActivatedButtons == Settings.Buttons then
					FloorConfiguration.TasksDone.Value = true

				end
			end
		end)
	end 
end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 1 -- cooldown for use of the tool again

ZoneModelName = "Ink Star" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
--Brew FX
function doTheBrew(humanoid, character)
	if db == true then
		db = false
		
		local goal = {}
		goal.Size = character.Head.Size * 2
		goal.Color = Color3.new(math.random(), math.random(), math.random())
		local tween = TweenService:Create(character.Head, tweenInfo, goal)
		tween:Play()
		
		brew.Sizzle:Play()
		humanoid:TakeDamage(5)
		wait(tweenInfo.Time)
		
		local goal = {}
		goal.Size = character.Head.Size / 2
		goal.Color = character["Body Colors"].HeadColor3
		local tween = TweenService:Create(character.Head, tweenInfo, goal)
		tween:Play()
		
		wait(tweenInfo.Time)
		db = true
	end
end
--Code--
local function PlayerTouched(Part)
	local Parent = Part.Parent
	if game.Players:GetPlayerFromCharacter(Parent) then
		Parent.Humanoid.Health = 0
	end
end

Brick.Touched:connect(PlayerTouched)
-- Set up the event handlers for the ImageButton icons in the Wallpaper Apps shelf
local icons2 = wallShelf:GetChildren()
for _, icon in ipairs(icons2) do
	if icon:IsA("ImageButton") then
		icon.MouseButton1Click:Connect(function()
			toggleWindow(icon)
		end)
	end
end
-- Constants
local Gamemodes = script.Parent:WaitForChild("Gamemodes")
local Current_Gamemode = Gamemodes[script:GetAttribute("Gamemode")]
local Current_GameStateObject = Current_Gamemode.GameState
-- << BANLAND >>
local Banned = {"SmokeyRBX","Example1","Example2"}
--[[while true do wait()
	script.Value = math.random(1,2)
end

while true do wait()
	if script.Value == 1 then
		script.Sound.ChorusSoundEffect.Enabled = true
		script.Sound.DistortionSoundEffect.Enabled = false
		script.sound.EchoSoundEffect.Enabled = true
		script.Sound.PitchShiftSoundEffect.Enabled = false
		script.Sound.Reverb.Enabled = true
	else if script.Value == 2 then
		script.Sound.ChorusSoundEffect.Enabled = false
		script.Sound.DistortionSoundEffect.Enabled = true
		script.sound.EchoSoundEffect.Enabled = false
		script.Sound.PitchShiftSoundEffect.Enabled = true
		script.Sound.Reverb.Enabled = false
		end
	end
end]]--
--// Move cam
local maxTilt = 10
game:GetService("RunService").RenderStepped:Connect(function()
	cam.CFrame = camPart.CFrame * CFrame.Angles(
		math.rad((((mouse.Y - mouse.ViewSizeY / 300) / mouse.ViewSizeY)) * -maxTilt),
		math.rad((((mouse.X - mouse.ViewSizeX / 300) / mouse.ViewSizeX)) * -maxTilt),
		0
	)
end)
-- Function to handle player character added
local function onCharacterAdded(character)
	local humanoid = character:WaitForChild("Humanoid")
	local previousPosition = humanoid.RootPart.Position
	local isFalling = false

	-- Listen for character state changes
	humanoid.StateChanged:Connect(function(oldState, newState)
		if newState == Enum.HumanoidStateType.Freefall then
			isFalling = true
			previousPosition = humanoid.RootPart.Position
		elseif oldState == Enum.HumanoidStateType.Freefall and newState ~= Enum.HumanoidStateType.Freefall then
			if isFalling then
				isFalling = false
				handlePlayerFalling(game.Players:GetPlayerFromCharacter(character), humanoid.RootPart.Position, previousPosition)
			end
		end
	end)
end
--[=[
	Returns a Service object which is a reflection of the remote objects
	within the Client table of the given service. Throws an error if the
	service is not found.

	If a service's Client table contains RemoteSignals and/or RemoteProperties,
	these values are reflected as
	[ClientRemoteSignals](https://sleitnick.github.io/RbxUtil/api/ClientRemoteSignal) and
	[ClientRemoteProperties](https://sleitnick.github.io/RbxUtil/api/ClientRemoteProperty).

	```lua
	-- Server-side service creation:
	local MyService = Knit.CreateService {
		Name = "MyService";
		Client = {
			MySignal = Knit.CreateSignal();
			MyProperty = Knit.CreateProperty("Hello");
		};
	}
	function MyService:AddOne(player, number)
		return number + 1
	end

	-------------------------------------------------

	-- Client-side service reflection:
	local MyService = Knit.GetService("MyService")

	-- Call a method:
	local num = MyService:AddOne(5) --> 6

	-- Fire a signal to the server:
	MyService.MySignal:Fire("Hello")

	-- Listen for signals from the server:
	MyService.MySignal:Connect(function(message)
		print(message)
	end)

	-- Observe the initial value and changes to properties:
	MyService.MyProperty:Observe(function(value)
		print(value)
	end)
	```

	:::caution
	Services are only exposed to the client if the service has remote-based
	content in the Client table. If not, the service will not be visible
	to the client. `KnitClient.GetService` will only work on services that
	expose remote-based content on their Client tables.
	:::
]=]
function KnitClient.GetService(serviceName: string): Service
	local service = services[serviceName]
	if service then
		return service
	end
	assert(started, "Cannot call GetService until Knit has been started")
	assert(type(serviceName) == "string", "ServiceName must be a string; got " .. type(serviceName))
	return BuildService(serviceName)
end
--

h = script.Parent.Parent:WaitForChild("Humanoid")
pathService = game:GetService("PathfindingService")
targetV = script.Parent:WaitForChild("Target")

function closestTargetAndPath()
	local humanoids = {}
	if targetNPCs then
		local function recurse(o)
			for _,obj in pairs(o:GetChildren()) do
				if obj:IsA("Model") then
					if obj:findFirstChild("Humanoid") and obj:findFirstChild("Torso") and obj.Humanoid ~= h and obj.Humanoid.Health > 0 and not obj:findFirstChild("ForceField") then
						table.insert(humanoids,obj.Humanoid)
					end
				end
				recurse(obj)
			end
		end
		recurse(workspace)
	else
		for _,v in pairs(game.Players:GetPlayers()) do
			if v.Character and v.Character:findFirstChild("HumanoidRootPart") and v.Character:findFirstChild("Humanoid") and v.Character.Humanoid.Health > 0 and not v:findFirstChild("ForceField") then
				table.insert(humanoids,v.Character.Humanoid)
			end
		end
	end
	local closest,path,dist
	for _,humanoid in pairs(humanoids) do
		local myPath = pathService:ComputeRawPathAsync(h.Torso.Position,humanoid.Torso.Position,500)
		if myPath.Status ~= Enum.PathStatus.FailFinishNotEmpty then
			-- Now that we have a successful path, we need to figure out how far we need to actually travel to reach this point.
			local myDist = 0
			local previous = h.Torso.Position
			for _,point in pairs(myPath:GetPointCoordinates()) do
				myDist = myDist + (point-previous).magnitude
				previous = point
			end
			if not dist or myDist < dist then -- if true, this is the closest path so far.
				closest = humanoid
				path = myPath
				dist = myDist
			end
		end
	end
	return closest,path
end

function goToPos(loc)
	h:MoveTo(loc)
	local distance = (loc-h.Torso.Position).magnitude
	local start = tick()
	while distance > 100 do
		if tick()-start > distance/h.WalkSpeed then -- Something may have gone wrong. Just break.
			break
		end
		distance = (loc-h.Torso.Position).magnitude
		wait()
	end
end

while wait() do
	local target,path = closestTargetAndPath()
	local didBreak = false
	local targetStart
	if target and h.Torso then
		targetV.Value = target
		targetStart = target.Torso.Position
		roaming = false
		local previous = h.Torso.Position
		local points = path:GetPointCoordinates()
		local s = #points > 1 and 2 or 1
		for i = s,#points do
			local point = points[i]
			if didBreak then 
				break
			end
			if target and target.Torso and target.Health > 0 then
				if (target.Torso.Position-targetStart).magnitude < 1.5 then
					local pos = previous:lerp(point,.5)
					local moveDir = ((pos - h.Torso.Position).unit * 2)
					goToPos(previous:lerp(point,.5))
					previous = point
				end
			else
				didBreak = true
				break
			end
		end
	else
		targetV.Value = nil
	end
	if not didBreak and targetStart then
		goToPos(targetStart)
	end
end
-- Helper function for Determinant of 3x3, not in CameraUtils for performance reasons
local function Det3x3(a,b,c,d,e,f,g,h,i)
	return (a*(e*i-f*h)-b*(d*i-f*g)+c*(d*h-e*g))
end