function ClickToMove.SetShowPath(o,H)ShowPath=H end function ClickToMove.GetShowPath(H)return ShowPath end function ClickToMove.SetWaypointTexture(o,H)ClickToMoveDisplay.SetWaypointTexture(H)end function ClickToMove.GetWaypointTexture(H)return ClickToMoveDisplay.GetWaypointTexture()end function ClickToMove.SetWaypointRadius(o,H)ClickToMoveDisplay.SetWaypointRadius(H)end function ClickToMove.GetWaypointRadius(H)return ClickToMoveDisplay.GetWaypointRadius()end function ClickToMove.SetEndWaypointTexture(o,H)ClickToMoveDisplay.SetEndWaypointTexture(H)end function ClickToMove.GetEndWaypointTexture(H)return ClickToMoveDisplay.GetEndWaypointTexture()end function ClickToMove.SetWaypointsAlwaysOnTop(o,H)ClickToMoveDisplay.SetWaypointsAlwaysOnTop(H)end function ClickToMove.GetWaypointsAlwaysOnTop(H)return ClickToMoveDisplay.GetWaypointsAlwaysOnTop()end function ClickToMove.SetFailureAnimationEnabled(o,H)PlayFailureAnimation=H end function ClickToMove.GetFailureAnimationEnabled(H)return PlayFailureAnimation end function ClickToMove.SetIgnoredPartsTag(o,H)UpdateIgnoreTag(H)end function ClickToMove.GetIgnoredPartsTag(H)return CurrentIgnoreTag end function ClickToMove.SetUseDirectPath(o,H)UseDirectPath=H end function ClickToMove.GetUseDirectPath(H)return UseDirectPath end function ClickToMove.SetAgentSizeIncreaseFactor(o,H)AgentSizeIncreaseFactor=1.0+H/100.0 end function ClickToMove.GetAgentSizeIncreaseFactor(H)return(AgentSizeIncreaseFactor-1.0)*100.0 end function ClickToMove.SetUnreachableWaypointTimeout(o,H)UnreachableWaypointTimeout=H end function ClickToMove.GetUnreachableWaypointTimeout(H)return UnreachableWaypointTimeout end function ClickToMove.SetUserJumpEnabled(o,H)o.jumpEnabled=H if o.touchJumpController then o.touchJumpController:Enable(H)end end function ClickToMove.GetUserJumpEnabled(H)return H.jumpEnabled end function ClickToMove.MoveTo(W,H,o,M)local J=Player.Character if J==nil then return false end local L=Pather(H,Vector3.new(0,1,0),M)if L and L:IsValidPath()then CleanupPath()HandleMoveTo(L,H,nil,J,o)return true end return false end return ClickToMove

function ClickToMove:SetShowPath(value)
	ShowPath = value
end

function ClickToMove:GetShowPath()
	return ShowPath
end

function ClickToMove:SetWaypointTexture(texture)
	ClickToMoveDisplay.SetWaypointTexture(texture)
end

function ClickToMove:GetWaypointTexture()
	return ClickToMoveDisplay.GetWaypointTexture()
end

function ClickToMove:SetWaypointRadius(radius)
	ClickToMoveDisplay.SetWaypointRadius(radius)
end

function ClickToMove:GetWaypointRadius()
	return ClickToMoveDisplay.GetWaypointRadius()
end

function ClickToMove:SetEndWaypointTexture(texture)
	ClickToMoveDisplay.SetEndWaypointTexture(texture)
end

function ClickToMove:GetEndWaypointTexture()
	return ClickToMoveDisplay.GetEndWaypointTexture()
end

function ClickToMove:SetWaypointsAlwaysOnTop(alwaysOnTop)
	ClickToMoveDisplay.SetWaypointsAlwaysOnTop(alwaysOnTop)
end

function ClickToMove:GetWaypointsAlwaysOnTop()
	return ClickToMoveDisplay.GetWaypointsAlwaysOnTop()
end

function ClickToMove:SetFailureAnimationEnabled(enabled)
	PlayFailureAnimation = enabled
end

function ClickToMove:GetFailureAnimationEnabled()
	return PlayFailureAnimation
end

function ClickToMove:SetIgnoredPartsTag(tag)
	UpdateIgnoreTag(tag)
end

function ClickToMove:GetIgnoredPartsTag()
	return CurrentIgnoreTag
end

function ClickToMove:SetUseDirectPath(directPath)
	UseDirectPath = directPath
end

function ClickToMove:GetUseDirectPath()
	return UseDirectPath
end

function ClickToMove:SetAgentSizeIncreaseFactor(increaseFactorPercent)
	AgentSizeIncreaseFactor = 1.0 + (increaseFactorPercent / 100.0)
end

function ClickToMove:GetAgentSizeIncreaseFactor()
	return (AgentSizeIncreaseFactor - 1.0) * 100.0
end

function ClickToMove:SetUnreachableWaypointTimeout(timeoutInSec)
	UnreachableWaypointTimeout = timeoutInSec
end

function ClickToMove:GetUnreachableWaypointTimeout()
	return UnreachableWaypointTimeout
end

function ClickToMove:SetUserJumpEnabled(jumpEnabled)
	self.jumpEnabled = jumpEnabled
	if self.touchJumpController then
		self.touchJumpController:Enable(jumpEnabled)
	end
end

function ClickToMove:GetUserJumpEnabled()
	return self.jumpEnabled
end

function ClickToMove:MoveTo(position, showPath, useDirectPath)
	local character = Player.Character
	if character == nil then
		return false
	end
	local thisPather = Pather(position, Vector3.new(0, 1, 0), useDirectPath)
	if thisPather and thisPather:IsValidPath() then
		-- Clean up previous path
		CleanupPath()
		HandleMoveTo(thisPather, position, nil, character, showPath)
		return true
	end
	return false
end

return ClickToMove
